Install Mattermost (with MySQL)

Mattermost is an open source, self-hosted Slack-alternative

As an alternative to proprietary SaaS messaging, Mattermost brings all your team communication into one place, making it searchable and accessible anywhere.


1 – Make sure the system is up to date

2 – Set up Database Server

We are going to use MySQL version 5.6 or newer. With version 5.5 you will get the error “The used table type doesn’t support FULLTEXT indexes” because before MySQL 5.6 Full-Text Search is supported only with MyISAM Engine.

2.1 – Download the MySQL APT repository config tool

(you can see more details here)

2.2 – Install the MySQL APT repository config tool

You will be asked to select product and version that you want to install. In the first step, select Server and next select either mysql-5.6 or mysql-5.7. Then click Apply.

2.3 – Update APT

2.4 – Install the server

2.5 – Create the database

3 – Set up Mattermost

Check for the latest release

4 – Create a system user and group to run this service as

Set the mattermost account as the directory owner:

Add your user to the mattermost group to ensure you can edit these files:

5 – Configure Mattermost

You may need to log out and log back in to be able to edit the configuration file with your user.



6 – Test the Mattermost service

You should get the message [INFO] Server is listening on :8065 letting you know that the service is running

Press Ctrl+c to stop it

7 – Create the init daemon

This is intended for systems running systemd

Paste the code:

If after the last command, mattermost is not starting, check that the mattermost.log file located in /opt/mattermost/logs is owned by the mattermost user and group

Now you should be able to access your Mattermost installation on http://yourip:8065

Leave a Reply