Skip to content

Mattermost on a VPS

Chat for dev teams

Author
Mattermost Inc.
License
AGPL-3.0
Version
11.11.1

The script is free · VPS from $10.20 per month · installs in about 4 minutes

Install over SSH

root@vps:~# command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; git clone https://github.com/mattermost/docker /opt/mattermost && cd /opt/mattermost && cp env.example .env && sed -i "s/^DOMAIN=.*/DOMAIN=$(hostname -I | awk '{print $1}')/" .env && sed -i "s/^POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=$(openssl rand -hex 16)/" .env && mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes} && chown -R 2000:2000 ./volumes/app/mattermost && docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/mattermost/mattermostok
  • Version11.11.1ok
  • Port8065/tcplisten

✓ Mattermost 11.11.1 installed · about 4 minutes

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Messenger
  • DevOps
  • Slack alternative

Mattermost is a Slack-like team messenger focused on development and DevOps: channels, threads, incident playbooks and integrations with GitLab, GitHub and Jira.

A self-hosted install keeps conversations and files on your server, while webhooks and bots let you post notifications to channels from CI, monitoring and your own services.

The command deploys the official mattermost/docker stack with PostgreSQL, without the bundled Nginx.

  • Channels, threads and direct messages
  • Incoming and outgoing webhooks, bots
  • GitLab, GitHub, Jira integrations
  • Playbooks and calls
  • Desktop and mobile apps

Recommended plan

For Mattermost: at least 4 vCPU, 4 GB RAM and 100 GB NVMe.

Minimum to run
2 vCPU · 4 GB RAM · 20 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 4 minutes.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Mattermost

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Open http://SERVER-IP:8065 and create the first user — they will become the system administrator

    The bot will send the server address and login details to the chat.

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.

Install command
command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; git clone https://github.com/mattermost/docker /opt/mattermost && cd /opt/mattermost && cp env.example .env && sed -i "s/^DOMAIN=.*/DOMAIN=$(hostname -I | awk '{print $1}')/" .env && sed -i "s/^POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=$(openssl rand -hex 16)/" .env && mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes} && chown -R 2000:2000 ./volumes/app/mattermost && docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d

Ports

Mattermost ports
PortProtocolPurpose
8065tcpWeb interface and API

After installation

  1. 1.Open http://SERVER-IP:8065 and create the first user — they will become the system administrator
  2. 2.For a domain, set DOMAIN in /opt/mattermost/.env and configure HTTPS via a proxy or the bundled Nginx (docker-compose.nginx.yml)
  3. 3.Create a team and invite your colleagues

Mattermost FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

Do I need a license?

No. The Enterprise Edition image is installed by default: without a key it runs with the free features, and paid features are unlocked with a license.

How do I update?

Change MATTERMOST_IMAGE_TAG in .env and restart the stack with the same docker compose ... up -d command.

Where is the data stored?

In /opt/mattermost/volumes: the application's files and config, as well as the PostgreSQL database.

Mattermost installs at checkout — in the bot.