Self-host Mattermost
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
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
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:8065What you take on
Mattermost's own Docker guide calls containers an evaluation path, and several defaults trip a first install: