Mattermost is an open-source, self-hosted online chat service written in Go and JavaScript.


For this guide you should be familiar with the basic concepts of


You’ll need your MySQL credentials. Get them with my_print_defaults:

[isabell@stardust ~]$ my_print_defaults client
[isabell@stardust ~]$

Your URL needs to be setup:

[isabell@stardust ~]$ uberspace web domain list
[isabell@stardust ~]$


Download the most recent Linux TAR archive from the Mattermost website:

[isabell@stardust ~]$ wget
--2019-12-23 13:27:01--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 155306557 (148M) [application/x-gzip]
Saving to: ‘mattermost-5.18.0-linux-amd64.tar.gz’

100%[====================================================================>] 155,306,557 22.5MB/s   in 6.6s

2019-12-23 13:27:08 (22.6 MB/s) - ‘mattermost-5.18.0-linux-amd64.tar.gz’ saved [155306557/155306557]

[isabell@stardust ~]$

Extract the archive:

[isabell@stardust ~]$ tar xfv mattermost-5.18.0-linux-amd64.tar.gz
[isabell@stardust ~]$


Set up a Database

Run the following code to create the database <username>_mattermost in MySQL:

[isabell@stardust ~]$ mysql -e "CREATE DATABASE ${USER}_mattermost COLLATE utf8mb4_unicode_ci;"
[isabell@stardust ~]$

Change the configuration

You need to set up your URL, and MySQL settings in ~/mattermost/config/config.json.

First, set your site URL:

"SiteURL": ""

Then find the SqlSettings block and change the database driver to mysql, replace mmuser with your username, mostest with your MySQL password and isabell_mattermost with the name of the database you created earlier:

   "SqlSettings": {
     "DriverName": "mysql",
     "DataSource": "isabell:MySuperSecretPassword@tcp(localhost:3306)/isabell_mattermost?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",
     "DataSourceReplicas": [],
     "DataSourceSearchReplicas": [],
     "MaxIdleConns": 20,
     "ConnMaxLifetimeMilliseconds": 3600000,
     "MaxOpenConns": 300,
     "Trace": false,
     "AtRestEncryptKey": "",
     "QueryTimeout": 30

Configure web server


Mattermost is running on port 8065.

To make the application accessible from the outside, configure a web backend:

[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Setup daemon

Create ~/etc/services.d/mattermost.ini with the following content:


After creating the configuration, tell supervisord to refresh its configuration and start the service:

[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE                            RUNNING   pid 26020, uptime 0:03:14
[isabell@stardust ~]$

If it’s not in state RUNNING, check your configuration.

Setup a user

You can now point your browser to your URL and setup a user.

Further customisation

To further customise your configuration, you can open the system console in your browser and adapt any settings to your wishes. Setting the SMTP server is a good idea.


Stop your service, backup your /home/isabell/mattermost/client/plugins, /home/isabell/mattermost/config, /home/isabell/mattermost/data, /home/isabell/mattermost/logs and /home/isabell/mattermost/plugins directory and rename/delete your /home/isabell/mattermost directory. Proceed with the installation steps and restore the client/plugins, config, data, logs and plugins directories. Then you can start your service again.

When upgrading to Mattermost 6.4 or newer you need to change the collation of the database:

[isabell@stardust ~]$ mysql -e "ALTER DATABASE isabell_mattermost COLLATE = utf8mb4_general_ci;"
[isabell@stardust ~]$

Tested with Mattermost 7.4.0 and Uberspace 7.13.0

Written by: Nico Graf <>