{"id":3316,"date":"2022-08-21T19:11:45","date_gmt":"2025-07-07T20:20:58","guid":{"rendered":""},"modified":"2025-02-02T00:46:20","modified_gmt":"2025-02-01T23:46:20","slug":"how-to-install-mattermost-on-debian-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-mattermost-on-debian-12\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 Mattermost on Debian 12"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<h1>\u00a0<\/h1>\n<h2>Introduction<\/h2>\n<p>Mattermost is an open-source messaging platform designed for team collaboration. In this guide, we will walk you through the installation of Mattermost on a Debian 12 server.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>A server running Debian 12.<\/li>\n<li>Root access or a user with <code>sudo<\/code> privileges.<\/li>\n<li>Basic knowledge of the command line.<\/li>\n<\/ul>\n<h2>Step 1: Update the System<\/h2>\n<p>Ensure that your system is up to date. Run the following commands:<\/p>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<h2>Step 2: Install Required Dependencies<\/h2>\n<p>Install the necessary packages:<\/p>\n<pre><code>sudo apt install -y wget curl vim<\/code><\/pre>\n<h2>Step 3: Install PostgreSQL Database<\/h2>\n<p>Mattermost requires a database to function. We will use PostgreSQL for this purpose:<\/p>\n<pre><code>sudo apt install -y postgresql postgresql-contrib<\/code><\/pre>\n<p>After installation, start the PostgreSQL service:<\/p>\n<pre><code>sudo systemctl start postgresql\r\nsudo systemctl enable postgresql<\/code><\/pre>\n<p>Log in to the PostgreSQL prompt:<\/p>\n<pre><code>sudo -u postgres psql<\/code><\/pre>\n<p>Create a new database and user for Mattermost:<\/p>\n<pre><code>CREATE DATABASE mattermost_db;\r\nCREATE USER mattermost_user WITH PASSWORD 'your_password';\r\nGRANT ALL PRIVILEGES ON DATABASE mattermost_db TO mattermost_user;\r\n\\q<\/code><\/pre>\n<p>Make sure to replace <code>your_password<\/code> with a strong and secure password.<\/p>\n<h2>Step 4: Install Mattermost<\/h2>\n<p>Download the latest version of Mattermost:<\/p>\n<pre><code>wget https:\/\/releases.mattermost.com\/x.x.x\/mattermost-x.x.x-linux-amd64.tar.gz<\/code><\/pre>\n<p>Replace <code>x.x.x<\/code> with the latest version number from the <a href=\"https:\/\/mattermost.com\/download\/#self-hosted\" target=\"_blank\" rel=\"follow\">Mattermost download page<\/a>.<\/p>\n<p>Extract the downloaded file:<\/p>\n<pre><code>tar -xvzf mattermost-x.x.x-linux-amd64.tar.gz<\/code><\/pre>\n<p>Move the extracted files to the appropriate directory:<\/p>\n<pre><code>sudo mv mattermost \/opt\/mattermost<\/code><\/pre>\n<p>Create a data directory for Mattermost:<\/p>\n<pre><code>sudo mkdir \/opt\/mattermost\/data<\/code><\/pre>\n<h2>Step 5: Configure Mattermost<\/h2>\n<p>Edit the Mattermost configuration file:<\/p>\n<pre><code>sudo vim \/opt\/mattermost\/config\/config.json<\/code><\/pre>\n<p>Locate the following section and update it:<\/p>\n<pre><code>\"DriverName\": \"postgres\",\r\n\"DataSource\": \"mattermost_user:your_password@tcp(localhost:5432)\/mattermost_db?sslmode=disable\",\r\n<\/code><\/pre>\n<p>Make sure to replace <code>your_password<\/code> with the password you set for the PostgreSQL user earlier.<\/p>\n<h2>Step 6: Set Permissions<\/h2>\n<p>Set the correct permissions for the Mattermost directory:<\/p>\n<pre><code>sudo chown -R www-data:www-data \/opt\/mattermost\/*<\/code><\/pre>\n<h2>Step 7: Start Mattermost<\/h2>\n<p>Start the Mattermost server:<\/p>\n<pre><code>sudo \/opt\/mattermost\/bin\/mattermost<\/code><\/pre>\n<h2>Step 8: Access Mattermost Web Interface<\/h2>\n<p>Open a web browser and navigate to <code>http:\/\/your_server_ip:8065<\/code>. You should see the Mattermost setup page. Follow the prompts to configure your Mattermost instance.<\/p>\n<h2>Step 9: Enable Mattermost to Start on Boot (Optional)<\/h2>\n<p>If you want Mattermost to start automatically on system boot, create a systemd service file:<\/p>\n<pre><code>sudo vim \/etc\/systemd\/system\/mattermost.service<\/code><\/pre>\n<p>Paste the following content into the file:<\/p>\n<pre><code>[Unit]\r\nDescription=Mattermost\r\nAfter=network.target\r\n\r\n[Service]\r\nType=simple\r\nUser=www-data\r\nGroup=www-data\r\nExecStart=\/opt\/mattermost\/bin\/mattermost\r\nWorkingDirectory=\/opt\/mattermost\r\nRestart=on-failure\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/code><\/pre>\n<p>Save and exit the editor, then enable and start the service:<\/p>\n<pre><code>sudo systemctl enable mattermost\r\nsudo systemctl start mattermost<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>You have successfully installed Mattermost on Debian 12. You can now use the Mattermost messaging platform for team collaboration.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/mattermost.com\/download\/#self-hosted\" target=\"_blank\" rel=\"follow\">Mattermost Download Page<\/a><\/li>\n<li><a href=\"https:\/\/docs.mattermost.com\/\" target=\"_blank\" rel=\"follow\">Official Mattermost Documentation<\/a><\/li>\n<\/ul>\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 Introduction Mattermost is an open-source messaging platform designed for team collaboration. In this guide, we will walk you through the installation of Mattermost on a Debian\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-3316","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\/3316","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=3316"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3316\/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=3316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=3316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=3316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}