Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host Mattermost
updated Sep 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 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.
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.
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 + PostgreSQLgit clone https://github.com/mattermost/dockercd dockercp env.example .env# edit .env: at minimum set DOMAIN to your Mattermost hostnamemkdir -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
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}.
Mattermost used 256 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.8.1 (first boot, measured Sep 2026). We list a minimum of 2048 MB.
Is the Mattermost install snippet verified?
The Mattermost install snippet is marked verified on Ubuntu 26.04 (Nov 2026).