{"id":1872,"date":"2024-02-19T06:11:35","date_gmt":"2022-11-26T13:53:57","guid":{"rendered":""},"modified":"2025-02-02T00:46:17","modified_gmt":"2025-02-01T23:46:17","slug":"wie-man-mattermost-mit-nginx-proxy-und-kostenlosem-let-039-s-encrypt-ssl-auf-ubuntu-24-04-installiert","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/wie-man-mattermost-mit-nginx-proxy-und-kostenlosem-let-039-s-encrypt-ssl-auf-ubuntu-24-04-installiert\/","title":{"rendered":"Wie man Mattermost mit Nginx Proxy und kostenlosem Let&#039;s Encrypt SSL auf Ubuntu 24.04 installiert"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<h1>\u00a0<\/h1>\n<p>Mattermost ist eine Open-Source-Kommunikationsplattform f\u00fcr Teams. In dieser Anleitung zeigen wir Ihnen, wie Sie Mattermost installieren, einen Nginx-Proxy einrichten und es mit einem kostenlosen SSL-Zertifikat von Let&#8217;s Encrypt auf Ubuntu 24.04 sichern.<\/p>\n<h2>Schritt 1: Systempakete aktualisieren<\/h2>\n<p>Bevor Sie beginnen, aktualisieren Sie die Paketliste, um sicherzustellen, dass alle Pakete auf dem neuesten Stand sind:<\/p>\n<pre>        sudo apt update\r\n        sudo apt upgrade -y\r\n    <\/pre>\n<h2>Schritt 2: Abh\u00e4ngigkeiten installieren<\/h2>\n<p>Installieren Sie die notwendigen Abh\u00e4ngigkeiten f\u00fcr Mattermost:<\/p>\n<pre>        sudo apt install -y curl gnupg2 lsb-release sudo\r\n    <\/pre>\n<h2>Schritt 3: PostgreSQL installieren<\/h2>\n<p>Da Mattermost PostgreSQL als Datenbank verwendet, installieren Sie PostgreSQL mit den folgenden Befehlen:<\/p>\n<pre>        sudo apt install -y postgresql postgresql-contrib\r\n    <\/pre>\n<p>Starten Sie den PostgreSQL-Dienst:<\/p>\n<pre>        sudo systemctl start postgresql\r\n        sudo systemctl enable postgresql\r\n    <\/pre>\n<h2>Schritt 4: Mattermost installieren<\/h2>\n<p>Laden Sie Mattermost vom offiziellen Server herunter und installieren Sie es:<\/p>\n<pre>        wget https:\/\/releases.mattermost.com\/7.9.0\/mattermost-7.9.0-linux-amd64.tar.gz\r\n        tar -xvzf mattermost-7.9.0-linux-amd64.tar.gz\r\n        sudo mv mattermost \/opt\r\n    <\/pre>\n<p>Erstellen Sie einen symbolischen Link, um es global zug\u00e4nglich zu machen:<\/p>\n<pre>        sudo ln -s \/opt\/mattermost\/bin\/mattermost \/usr\/local\/bin\/mattermost\r\n    <\/pre>\n<h2>Schritt 5: Mattermost konfigurieren<\/h2>\n<p>Erstellen Sie eine neue PostgreSQL-Datenbank und einen Benutzer f\u00fcr Mattermost:<\/p>\n<pre>        sudo -u postgres psql\r\n        CREATE DATABASE mattermost;\r\n        CREATE USER mmuser WITH PASSWORD 'password';\r\n        ALTER ROLE mmuser SET client_encoding TO 'utf8';\r\n        ALTER ROLE mmuser SET default_transaction_isolation TO 'read committed';\r\n        ALTER ROLE mmuser SET timezone TO 'UTC';\r\n        GRANT ALL PRIVILEGES ON DATABASE mattermost TO mmuser;\r\n        \\q\r\n    <\/pre>\n<p>Bearbeiten Sie die Mattermost-Konfigurationsdatei und f\u00fcgen Sie die Datenbankdetails ein:<\/p>\n<pre>        sudo nano \/opt\/mattermost\/config\/config.json\r\n    <\/pre>\n<p>\u00c4ndern Sie den Abschnitt f\u00fcr die Datenbankverbindung wie folgt:<\/p>\n<pre>        \"DriverName\": \"postgres\",\r\n        \"DataSource\": \"postgres:\/\/mmuser:password@localhost:5432\/mattermost?sslmode=disable&amp;connect_timeout=10\",\r\n    <\/pre>\n<h2>Schritt 6: Mattermost starten<\/h2>\n<p>Starten Sie Mattermost mit folgendem Befehl:<\/p>\n<pre>        sudo systemctl start mattermost\r\n        sudo systemctl enable mattermost\r\n    <\/pre>\n<h2>Schritt 7: Nginx installieren<\/h2>\n<p>Installieren Sie Nginx, um als Reverse Proxy f\u00fcr Mattermost zu fungieren:<\/p>\n<pre>        sudo apt install -y nginx\r\n    <\/pre>\n<h2>Schritt 8: Nginx konfigurieren<\/h2>\n<p>Erstellen Sie eine neue Nginx-Konfigurationsdatei, um den Traffic an Mattermost weiterzuleiten:<\/p>\n<pre>        sudo nano \/etc\/nginx\/sites-available\/mattermost\r\n    <\/pre>\n<p>F\u00fcgen Sie die folgende Konfiguration ein:<\/p>\n<pre>        server {\r\n            listen 80;\r\n            server_name yourdomain.com;\r\n            location \/ {\r\n                proxy_pass http:\/\/localhost:8065;\r\n                proxy_http_version 1.1;\r\n                proxy_set_header Upgrade $http_upgrade;\r\n                proxy_set_header Connection 'upgrade';\r\n                proxy_set_header Host $host;\r\n                proxy_cache_bypass $http_upgrade;\r\n            }\r\n        }\r\n    <\/pre>\n<p>Aktivieren Sie die Konfiguration und starten Sie Nginx neu:<\/p>\n<pre>        sudo ln -s \/etc\/nginx\/sites-available\/mattermost \/etc\/nginx\/sites-enabled\/\r\n        sudo systemctl restart nginx\r\n    <\/pre>\n<h2>Schritt 9: Certbot f\u00fcr SSL installieren<\/h2>\n<p>Installieren Sie Certbot, um ein kostenloses SSL-Zertifikat von Let&#8217;s Encrypt zu erhalten:<\/p>\n<pre>        sudo apt install -y certbot python3-certbot-nginx\r\n    <\/pre>\n<h2>Schritt 10: SSL-Zertifikat erhalten<\/h2>\n<p>F\u00fchren Sie den folgenden Befehl aus, um ein SSL-Zertifikat f\u00fcr Ihre Domain zu erhalten und Nginx automatisch zu konfigurieren:<\/p>\n<pre>        sudo certbot --nginx -d yourdomain.com\r\n    <\/pre>\n<p>Folgen Sie den Anweisungen, um die SSL-Konfiguration abzuschlie\u00dfen und das Zertifikat zu installieren.<\/p>\n<h2>Schritt 11: Mattermost testen<\/h2>\n<p>\u00d6ffnen Sie Ihren Browser und navigieren Sie zu Ihrer Domain (z.B. https:\/\/yourdomain.com). Sie sollten nun den Mattermost-Login-Bildschirm sehen, der mit einer sicheren HTTPS-Verbindung angezeigt wird.<\/p>\n<h2>VPS-Empfehlung<\/h2>\n<p>Wenn Sie einen zuverl\u00e4ssigen VPS suchen, besuchen Sie den folgenden Link f\u00fcr Windows VPS-Dienste: <a href=\"https:\/\/de.netcloud24.com\/\" target=\"_blank\" rel=\"follow\">Windows VPS von NetCloud24<\/a>.<\/p>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Mattermost ist eine Open-Source-Kommunikationsplattform f\u00fcr Teams. In dieser Anleitung zeigen wir Ihnen, wie Sie Mattermost installieren, einen Nginx-Proxy einrichten und es mit einem kostenlosen SSL-Zertifikat von\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-1872","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1872"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1872\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}