Mattermost configuration on Ubuntu 14.x.x on vps



Note:Things needed for configuration mattermost online

2gb ram .and Ubuntu 14.x.x version


Install Mattermost on an Ubuntu VPS


In this article, we will show you how to install Mattermost on an Ubuntu 14.04 VPS with PostgreSQL and Nginx. Mattermost is an open source, on-prem Slack-alternative written in Golang and React. This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 14.04 VPS.


Login to your VPS via SSH

Login through putty: ssh user@vps


Update the system and install necessary packages

[user]$ sudo apt-get update && sudo apt-get -y upgrade

[user]$ sudo apt-get install software-properties-common wget

Create a new user

To create a new system user called mmuser run the following commands:

[user]$ sudo adduser –home /opt/mmuser –shell /bin/bash –gecos ‘Mattermost application’ mmuser [user]$ sudo install -d -m 755 -o mmuser -g mmuser /opt/mmuser



Install PostgreSQL

To install PostgreSQL on your Ubuntu VPS, just run:

[user]$ sudo apt-get install postgresql postgresql-contrib



After the PostgreSQL installation is complete, login to the psql shell and create a new mmuser user:

[user]$ sudo -i -u postgres

[postgres]$ psql

postgres=# CREATE DATABASE mmdb;

postgres=# CREATE USER mmuser WITH PASSWORD ‘mmuser_password’;

postgres=# GRANT ALL PRIVILEGES ON DATABASE mmdb to mmuser;

postgres=# \q

[postgres]$ exit


Install Mattermost

Create a new mattermost directory and change to it:

[user]$ mkdir -p /opt/mmuser/mattermost

[user]$ cd /opt/mmuser/mattermost



Download the latest stable branch of the Mattermost (At the time of the writing of this article, the stable version is 1.1)

wget -q -O – | tar -xzf – –strip 1 -C /opt/mmuser/mattermost


Create the storage directory using the following command:

[user]$  mkdir -p /opt/mmuser/mattermost/data


Edit the config/config.json file

[user]$ nano /opt/mmuser/mattermost/config/config.json


and change the database information as follows:

DriverName”: “postgres”,“DataSource”: “postgres://mmuser:mmuser_password@”,

and enter your SMTP server settings.

Change ownership to mmuser user and group:

[user]$ sudo chown mmuser: -R /opt/mmuser

Test the Mattermost server for the first time by typing:

[user]$ sudo -u mmuser bin/platform 

You should see something like below :

[10/16/15 17:40:49] [INFO] Starting Server…[10/16/15 17:40:49] [INFO] Server is listening on :8065 

Hit CTRL-C to stop the server.

Create a systemd service

To create a new systemd service for Mattermost, open your editor of choice

[user]$ sudo nano /etc/init/mattermost.conf

and create a new file with the follwing content:

description “Mattermost Service” start on filesystem or runlevel [2345]stop on runlevel [!2345] setuid mmusersetgid mmuser respawn chdir /opt/mmuser/mattermostexec bin/platform

You can now start your Mattermost service with:

[user]$ sudo service mattermost start

and check the status with

[user]$ sudo service mattermost status  

Final steps

Open http://myour_mattermost_site in your favorite web browser and create a team and user. Administrative access is automatically granted to the first registered user.

That’s it. You have successfully installed Mattermost on your Ubuntu 14.04 VPS. For more information about Mattermost, please refer to the official Mattermost documentation.



Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen − 3 =