Mattermost is an open source enterprise communication platform designed for internal communication of teams and organizations. It supports text chats, file sharing, video calls and integration with various third-party services. Mattermost can be deployed on your own servers for complete data control and security. It is an alternative to solutions such as Slack, with the ability to customize, automate and integrate with DevOps processes.
1. A virtual server (VPS) with Ubuntu 24.04 installed.
2. Root permissions or an account with sudo.
3. (Optional) We strongly recommend using a proxy server before Mattermost to support up to 200 concurrent users. If you have less than 200 concurrent users, you can configure TLS. If you have more than 200 concurrent users, you will need a proxy server such as NGINX in front of Mattermost to manage traffic.
First, you need to connect to your server via SSH under the root user. Run the following command, replacing IP_Address with the IP address of your server and Port_number with the SSH port number:
To make sure you have the correct version of Ubuntu installed, run the command:
Expected Outcome:
Updating the OS:
Now let's create a PostgreSQL database for use by the Mattermost server. Enter the command (this command will install postgresql):
Let's go to PostgreSQL:
Create a Mattermost base:
Create the mmuser user (instead of the mmuser-password we use a more secure password):
Authorize the mmuser user:
Exit PostgreSQL
Make changes to the pg_hba.conf file giving the Mattermost server access to the PostgreSQL database. Open the file:
We find the lines:
Replace with:
Save the changes, close the file and update the PostgreSQL configuration:
Check that we can connect to the database from the mmuser user:
Enter the password we created instead of mmuser-password.
If we have done everything correctly - the PostgreSQL mattermost=> console will appear.
Let's get out:
Download the latest version of Mattermost server:
Unpacking:
Move it to the /opt directory:
By default, the Mattermost server uses the /opt/mattermost/data directory.
Let's create it:
Now let's create a group and user mattermost:
We'll give you your license:
To manage the Mattermost server, let's create a system service.
Open the editor to create the service file:
Fill the opened, empty file with the following content:
[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
Update the systemd configuration:
Before starting the Mattermost server, you must configure it.
Back up the configuration file:
Open the Mattermost server configuration file in a text editor:
We need to make a change.
Find it:
Replace with:
Where
<mmuser-password> - mmuser password for PostgreSQL.
<host-name-or-IP> - IP address of the server or its hostname.
<mattermost> - PostgreSQL database.
Save the file and exit the editor.
Activate the service to run at system startup and start it now:
To check the status of the server, use the command:
Open <IP address of your server or its hostname> in the browser: 8065
Follow the instructions on the page that opens.
Mattermost server is now installed and running on your Ubuntu 24.04 server.
Apply the discount by inserting the promo code in the special field at checkout: