Skip to content

Self-host Mattermost

updated Sep 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A polished, Slack-style team chat you fully own — channels, threads, DMs, integrations, and a solid mobile app. The go-to self-hosted Slack replacement for teams that want their messages on their own server. The default Docker image is the Enterprise build: without a licence it runs as the free Entry edition, which keeps only the latest 10,000 channel messages. Set MATTERMOST_IMAGE=mattermost-team-edition in .env for the MIT-licensed Team Edition.

Key facts

CategoryTeam chat
LicenseAGPL-3.0
StackGo, React, PostgreSQL
Min RAM2048 MB
Official imageyes
Measured idle RAM256 MB
Difficulty
Our recommendation

Pick Mattermost when you want a Slack-style team chat for up to about 1,000 users on one modest box: upstream's sizing is 1 vCPU and 2 GB of RAM for 1–1,000 registered users, 2 vCPUs and 4 GB for 1,000–2,000. The official compose is two containers — the Go server and PostgreSQL 14+ (MySQL is deprecated from v11) — with an optional NGINX third. Licensing is split: the source is AGPLv3, the compiled binaries Mattermost ships are MIT, and the image `env.example` defaults to (`mattermost-enterprise-edition`) runs free in the limited "Entry" mode. If you need voice, video and omnichannel in one product and can give it roughly four times the RAM, Rocket.Chat is the other team-chat entry in the catalog.

Follow the Mattermost deploy guide →

What you need

  • Any VPS with at least 2048 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • About an afternoon — budget time for troubleshooting
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# Mattermost — official Docker deployment guide (docs → Deploy containers): app + PostgreSQL
git clone https://github.com/mattermost/docker
cd docker
cp env.example .env
# edit .env: at minimum set DOMAIN to your Mattermost hostname
mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes}
sudo chown -R 2000:2000 ./volumes/app/mattermost
# the base file publishes no ports — the docs always chain a second file: without-nginx (below) or nginx (TLS)
docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d  #  →  http://DOMAIN:8065

What you take on

Mattermost's own Docker guide calls containers an evaluation path, and several defaults trip a first install:

non-negotiableUpstream's words: the Docker deployment "shouldn't be used in production environments" because it has no clustering or high availability out of the box, and Kubernetes is what they recommend for HA. It runs a single team fine — but that is the support stance you are accepting.
non-negotiableThe base docker-compose.yml publishes no ports; 8065 is only exposed by an overlay, so the documented start is docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d (or the docker-compose.nginx.yml overlay for TLS on 80/443). Before the first start you must also run mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes} and sudo chown -R 2000:2000 ./volumes/app/mattermost; DOMAIN is the one .env value you must edit.
non-negotiableenv.example pins MATTERMOST_IMAGE=mattermost-enterprise-edition (at 11.7.0 as of September 2026), which runs as free "Entry": all Enterprise Advanced features, but a 10,000-message viewable history across all channels, no HA, no compliance features, community support only, and upstream says it is "best suited for teams less than 50 users". mattermost-team-edition is the MIT-licensed image; upstream is removing SSO from it and scopes it to hobbyists and small teams under 250 users.
non-negotiablePostgreSQL 14.0+ is required as of September 2026 and 15+ from v12.0 (due October 2026); MySQL is deprecated from v11 and MariaDB is unsupported. The example .env creates a Postgres superuser mmuser / mmuser_password — change both. For production upstream says pin tags like release-10.5, because generic release-10 tags "do not automatically receive new patch releases".
non-negotiableThe 2 GB floor is upstream's figure for 1–1,000 users (Software and hardware requirements), and it assumes the default 50 MB maximum file size; the compose file caps the app container with mem_limit: 4G. Behind a proxy the site URL must match — env.example derives MM_SERVICESETTINGS_SITEURL as https://${DOMAIN}.

An alternative to

Head-to-head

More self-hosted tools

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.