In this tutorial, we will show you how to install Mattermost on Ubuntu 18.04 LTS. For those of you who didn’t know, Mattermost is an open-source, private cloud Slack-alternative. A workplace messaging system for web, PCs, and phones, released under the MIT license.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Mattermost on a Ubuntu 18.04 LTS (Bionic Beaver) server.
Install Mattermost on Ubuntu 18.04 LTS Bionic Beaver
Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
Step 2. Install LAMP (Linux, Apache, MariaDB, and PHP) server.
A Ubuntu 18.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also, install all required PHP modules:
The first thing to do is to go to Mattermost’s download page and download the latest stable version of Mattermost, At the moment of writing this article it is version 5.1.0:
Unpack the Mattermost archive to the document root directory on your server:
Next, create a storage directory for file:
Set up a system user and group called mattermost that will run this service, and set the ownership and permissions:
Set up the database driver through the /opt/mattermost/config/config.json file. In it, search for “DriverName” and “DataSource” lines and change as follows:
Create a systemd file for Mattermost, /etc/systemd/system/mattermost.service and, in it, paste the following configuration:
Add the following content:
Next, run the commands below to start Mattermost service:
Mattermost will be available on HTTP port 8065 by default. Open your favorite browser and navigate to http://your-domain.com:8065 or http://ip-address:8065 and continue to configure Mattermost by entering an email address and creating an account. If you are using a firewall, please open port 8065 to enable access to the control panel.
Congratulations! You have successfully installed Mattermost. Thanks for using this tutorial for installing Mattermost on your Ubuntu 18.04 LTS (Bionic Beaver) system. For additional help or useful information, we recommend you to check the official Mattermost website.