<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mattermost Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/mattermost/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/mattermost/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Mon, 09 Jan 2023 14:23:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.linuxtuto.com/wp-content/uploads/2022/01/cropped-LT_faveicon-32x32.png</url>
	<title>Mattermost Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/mattermost/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install Mattermost on Ubuntu 22.04</title>
		<link>https://www.linuxtuto.com/how-to-install-mattermost-on-ubuntu-22-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-mattermost-on-ubuntu-22-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 09 Jan 2023 14:00:36 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Mattermost]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1013</guid>

					<description><![CDATA[<p>Mattermost is an open-source, self-hosted chat and collaboration platform that is designed for modern teams. Mattermost is an alternative to Slack. In this tutorial, we...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-mattermost-on-ubuntu-22-04/">How to Install Mattermost on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Mattermost is an open-source, self-hosted chat and collaboration platform that is designed for modern teams. Mattermost is an alternative to Slack.</p>
<p>In this tutorial, we will show you the complete steps to install <code>Mattermost</code> on Ubuntu 22.04 with PostgreSQL database server.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu</strong> <strong>22.04</strong> operating system to the latest version with the following command:</p>
<pre><code># apt update &amp;&amp; sudo apt upgrade -y</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Nginx webserver</span></h2>
<p>You can install Nginx via <code>apt</code> package manager by executing the following command.</p>
<pre><code># apt install nginx</code></pre>
<p>You can start the Nginx service and configure it to run on startup by entering the following commands:</p>
<pre><code># systemctl start nginx
# systemctl enable nginx</code></pre>
<p>Verify the status of the <code>Nginx</code> service using <code>systemctl status</code> command:</p>
<pre><code># systemctl status nginx</code></pre>
<p>Output:</p>
<pre><code><span style="color: #00ff00;">●</span> nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: <span style="color: #00ff00;">active (running)</span>
       Docs: man:nginx(8)
    Process: 5421 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 5422 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 5423 (nginx)
      Tasks: 2 (limit: 2196)
     Memory: 6.7M
        CPU: 327ms
     CGroup: /system.slice/nginx.service
             ├─5423 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             └─5424 "nginx: worker process"</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install PostgreSQL Database Server</span></h2>
<p>Run the apt command to install:</p>
<pre><code># apt install postgresql postgresql-contrib</code></pre>
<p>Once successfully installed, enable PostgreSQL (to start automatically upon system boot), start, and verify the status using the commands below:</p>
<pre><code># systemctl enable postgresql
# systemctl start postgresql
# systemctl status postgresql</code></pre>
<p>Next, run the command below to log in to the PostgreSQL you just installed above:</p>
<pre><code>su postgres
psql</code></pre>
<p>Then, we create the <code>Mattermost</code> database:</p>
<pre><code>postgres=# CREATE DATABASE mattermostdb; 
postgres=# CREATE USER mattermost WITH PASSWORD 'Mattermost-Strong-Password'; 
postgres=# GRANT ALL PRIVILEGES ON DATABASE mattermostdb to mattermost; 
postgres=# \q</code></pre>
<p>Return to your <code>root</code> user account.</p>
<pre><code># exit</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Create mattermost System user and group</span></h2>
<p>We need to set up a system user and group called mattermost that will run service.</p>
<pre><code># useradd --system --user-group mattermost</code></pre>
<p>You can confirm it is a system user since its ID is less than 1000.</p>
<pre><code># <span class="has-inline-color has-pale-pink-color">id mattermost</span>
uid=998(mattermost) gid=998(mattermost) groups=998(mattermost)</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Installing Mattermost on Ubuntu 22.04</span></h2>
<p>By default, <code>Mattermost</code> is not available on Ubuntu 22.04 base repository. Please visit the <a href="https://github.com/mattermost/mattermost-server/releases">official releases</a> page to get the latest release.</p>
<p>Run the following command to download the latest version of Mattermost to your Ubuntu system:</p>
<pre><code># wget https<span class="pun">:</span><span class="com">//releases.mattermost.com/7.5.2/mattermost-7.5.2-linux-amd64.tar.gz</span></code></pre>
<p>Extract the downloaded file to <code>/opt</code> directory using <code>tar</code> command:</p>
<pre><code># tar xpvf <span class="com">mattermost-7.5.2-linux-amd64.tar.gz</span> -C /opt</code></pre>
<p>Create the data storage directory for the Mattermost server.</p>
<pre><code># mkdir /opt/mattermost/data</code></pre>
<p>Set the correct permissions on files and directories:</p>
<pre><code># chown mattermost:mattermost /opt/mattermost/ -R</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Configure Mattermost Server</span></h2>
<p>Edit the configuration file to set up the database driver.</p>
<pre><code># nano /opt/mattermost/config/config.json
</code></pre>
<p>Locate <strong>SqlSettings</strong> section and configure PostgreSQL database settings like bellow:</p>
<pre><code>"DriverName": "postgres",

"DataSource": "postgres://mattermost:Mattermost-Strong-Password@localhost:5432/mattermostdb?sslmode=disable&amp;connect_timeout=10",</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Create a Systemd service file</span></h2>
<p>Create systemd unit for <code>Mattermost</code> to start / stop and restart service.</p>
<pre><code># nano /etc/systemd/system/mattermost.service</code></pre>
<p>Paste following lines:</p>
<pre><code>[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
BindsTo=postgresql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
KillMode=mixed
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
  WantedBy=multi-user.target</code></pre>
<p>Reload system daemon and start Mattermost Service:</p>
<pre><code># systemctl daemon-reload
# systemctl start mattermost
# systemctl enable mattermost</code></pre>
<p>To confirm everything is working normally, check the status of service:</p>
<pre><code># systemctl status mattermost</code></pre>
<p>Output:</p>
<pre><code><span style="color: #00ff00;">●</span> mattermost.service - Mattermost
     Loaded: loaded (/etc/systemd/system/mattermost.service; disabled; vendor preset: enabled)
     Active: <span style="color: #00ff00;">active (running)</span>
   Main PID: 4366 (mattermost)
      Tasks: 49 (limit: 2196)
     Memory: 539.5M
        CPU: 13.944s
     CGroup: /system.slice/mattermost.service
             ├─4366 /opt/mattermost/bin/mattermost
             ├─4395 plugins/com.mattermost.plugin-channel-export/server/dist/plugin-linux-amd64
             ├─4406 plugins/com.mattermost.calls/server/dist/plugin-linux-amd64
             ├─4419 plugins/playbooks/server/dist/plugin-linux-amd64
             ├─4427 plugins/focalboard/server/dist/plugin-linux-amd64
             └─4443 plugins/com.mattermost.nps/server/dist/plugin-linux-amd64
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 8: Configure Nginx for Mattermost</span></h2>
<p>Then, create an virtual host configuration file:</p>
<pre><code># nano /etc/nginx/sites-available/mattermost.conf</code></pre>
<p>Add the following code to the file:</p>
<pre><code>server {
        listen 80;

        server_name mattermost.your-domain.com;
        root /opt/mattermost;

        error_log /var/log/nginx/mattermost.error;
        access_log /var/log/nginx/mattermost.access;

               location / {

        proxy_pass http://localhost:8065;

    }
}</code></pre>
<p>Remember to replace <strong><code>your-domain.com</code></strong> with the domain name of your server.</p>
<p>Save and exit the configuration file.</p>
<p>Enable the new configuration file.</p>
<pre><code># ln -s /etc/nginx/sites-available/mattermost.conf /etc/nginx/sites-enabled/mattermost.conf</code></pre>
<p>Check Nginx syntax:</p>
<pre><code># nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
</code></pre>
<p>To implement the changes, restart Nginx webserver:</p>
<pre><code># systemctl restart nginx</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 9: Mattermost Setup and Configurations</span></h2>
<p>Now open your web browser and go to <code>http://mattermost.your-domain.com</code> and you will see the following screen:</p>
<p><img fetchpriority="high" decoding="async" class="size-large wp-image-1050 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-900x508.jpg" alt="Mattermost create account" width="900" height="508" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-900x508.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-300x169.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-768x433.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-1536x867.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-1222x690.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-897x506.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup-684x386.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_setup.jpg 1914w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Next, you will be taken to the Team creation page:</p>
<p><img decoding="async" class="size-large wp-image-1051 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-900x427.jpg" alt="Mattermost create team" width="900" height="427" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-900x427.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-300x142.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-768x364.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-1536x728.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-1222x579.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-897x425.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team-684x324.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_create_team.jpg 1915w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Click the <strong><code>Create a team</code></strong> button to create your first team:</p>
<p><img decoding="async" class="size-large wp-image-1052 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-900x413.jpg" alt="Mattermost Team" width="900" height="413" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-900x413.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-300x138.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-768x352.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-1536x704.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-1222x560.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-897x411.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team-684x314.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost-team.jpg 1915w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Then you will be asked to set a public URL for the team:</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-1053 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-900x429.jpg" alt="Mattermost Team URL" width="900" height="429" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-900x429.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-300x143.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-768x366.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-1536x732.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-1222x582.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-897x427.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url-684x326.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/01/mattermost_team_url.jpg 1914w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<p>Click the <strong>Finish</strong> button to open the Mattermost Dashboard:</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-1057 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-900x428.jpg" alt="Mattermost Dashboard" width="900" height="428" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-900x428.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-300x143.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-768x365.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-1536x730.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-1222x581.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-897x426.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard-684x325.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/01/Mattermost_dashboard.jpg 1905w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed <code>Mattermost</code> on Ubuntu 22.04 with Nginx. For additional information, you can check <a href="https://docs.mattermost.com/" target="_blank" rel="noopener">the official Mattermost documentation</a>.</p>
<p>If you have any questions please leave a comment below.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-mattermost-on-ubuntu-22-04/">How to Install Mattermost on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-mattermost-on-ubuntu-22-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1013</post-id>	</item>
	</channel>
</rss>
