Back to all templates
Mattermost logo

Mattermost

Application1024MB+ RAM

Open-source Slack alternative for team communication

chatcollaborationslack-alternative

Deploy Mattermost in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Mattermost

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy Mattermost on a VPS with Server Compass

Use the Mattermost template in Server Compass to deploy an open-source team chat workspace with PostgreSQL on your VPS, then verify the workspace setup screen in a browser.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a Mattermost app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Mattermost

Use the template picker search to find Mattermost in the Server Compass template catalog.

Searching for Mattermost in the Server Compass template picker
4
Step 4

Select the Mattermost template

Choose the Mattermost template. Server Compass fills the Mattermost service, PostgreSQL database, persistent Mattermost volumes, site URL, and generated database password.

Mattermost template selected in Server Compass
5
Step 5

Review the Mattermost settings

Confirm the app name and compose service. In this run, the app was named mattermost-demo and used host port 8065.

Reviewing Mattermost project settings and compose services
6
Step 6

Deploy Mattermost

Review the generated environment values, keep the database password masked, confirm the web port is available, and click Deploy Now.

Reviewing Mattermost environment variables and port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Mattermost and PostgreSQL images, starts the containers, and verifies the stack.

Server Compass deploying the Mattermost template on the VPS
8
Step 8

Confirm Mattermost is running

After deployment finishes, return to the Apps tab and confirm the Mattermost app is marked Running with its application URL available.

Mattermost template running in the Server Compass Apps tab
9
Step 9

Open Mattermost in the browser

Open the application URL in a browser. The Mattermost workspace setup screen confirms the team chat service is reachable and ready for first-user setup.

The deployed Mattermost workspace setup screen loaded in a browser

After Mattermost Opens

  • Create the first administrator account and workspace.
  • Configure a domain and HTTPS before inviting users.
  • Review email, invitation, and authentication settings before production use.
  • Limit access while the initial workspace is being configured.
  • Back up the Mattermost volumes and PostgreSQL volume before relying on it for production chat history.

Verified Result

The Mattermost web app loaded successfully in a browser and displayed the workspace setup screen.

Mattermost deployment questions

What does the Mattermost template deploy?

It deploys the Mattermost Team Edition container with PostgreSQL 16, persistent Mattermost data/config/log/plugin volumes, and a persistent PostgreSQL data volume.

Which port did the tutorial use?

The tutorial used host port 8065, which maps to the Mattermost web UI on container port 8065.

Why does the browser verification stop at the workspace setup screen?

A fresh Mattermost deployment is considered reachable when the workspace setup or login screen loads. The public guide stops before creating real administrator credentials.

Should this become a blog post?

No. The deployment guide should live on the Mattermost template detail page and be linked from the reusable template deployment docs page.

Terminal Deployment

Mattermost CLI Deployment

Deploy Mattermost the traditional way with SSH and Docker Compose.

1

Open a Terminal Connection

Start by opening a terminal window and connecting to your VPS via SSH.

terminal
# Connect to your VPS
ssh root@your-server-ip

# Or with a specific SSH key
ssh -i ~/.ssh/your-key root@your-server-ip

First time? Docker required! Install it with: curl -fsSL https://get.docker.com | sh

2

Create Application Directory

Create a dedicated space for your application deployment.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/mattermost
cd ~/apps/mattermost
3

Create Deployment Configuration

Create a docker-compose.yml file with the following configuration:

docker-compose.yml
services:
  mattermost:
    image: mattermost/mattermost-team-edition:latest
    ports:
      - "8065:8065"
    environment:
      - MM_SQLSETTINGS_DRIVERNAME=postgres
      - MM_SQLSETTINGS_DATASOURCE=postgres://mattermost:<your-db-password>@db:5432/mattermost?sslmode=disable&connect_timeout=10
      - MM_SERVICESETTINGS_SITEURL=<your-site-url>
    volumes:
      - mattermost_data:/mattermost/data
      - mattermost_logs:/mattermost/logs
      - mattermost_config:/mattermost/config
      - mattermost_plugins:/mattermost/plugins
    restart: unless-stopped
    depends_on:
      - db

  db:
    image: postgres:16-alpine
    environment:
      - POSTGRES_USER=mattermost
      - POSTGRES_PASSWORD=<your-db-password>
      - POSTGRES_DB=mattermost
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped

volumes:
  mattermost_data:
  mattermost_logs:
  mattermost_config:
  mattermost_plugins:
  postgres_data:
Deployment Settings
PORTHost port(default: 8065)
SITE_URLSite URL
DB_PASSWORDDB password
4

Launch Your Application

Deploy the stack and monitor the startup process.

terminal
# Spin up containers
docker compose up -d

# Verify deployment
docker compose ps

# Check logs for errors
docker compose logs -f
5

Enable External Access

Set up firewall rules to permit incoming connections.

terminal
# Allow the application port through firewall
sudo ufw allow 8065/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:8065
Skip the Terminal

Skip the command line. Deploy visually.

Server Compass makes deploying Mattermost effortless. Visual setup, one-click deploy, done.

  • Visual config editor
  • Instant deployment
  • Automatic HTTPS
  • Smooth updates
  • Live monitoring
  • Quick rollbacks
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Mattermost with Server Compass, complete these steps to finish setup

1

Create admin account

2

Create teams and channels

Need help? Check out our documentation for detailed guides.

Mattermost FAQ

Common questions about self-hosting Mattermost

How do I deploy Mattermost with Server Compass?

Simply download Server Compass, connect to your VPS, and select Mattermost from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Mattermost?

Mattermost requires a minimum of 1024MB RAM. We recommend a VPS with at least 2048MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Mattermost data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Mattermost backup and restore procedures.

How do I update Mattermost to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Mattermost image will be pulled and deployed with zero downtime.

Is Mattermost free to self-host?

Mattermost is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Mattermost?

Download Server Compass and deploy Mattermost to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass