Deploy Mattermost on Linux
Mattermost Server runs on any 64-bit Linux system. For production, run Mattermost and the PostgreSQL database on separate hosts. A single-host install is suitable for development and testing.
Choose an install method
Install from the signed Mattermost APT repository (deb). Recommended for Ubuntu 22.04 / 24.04 / 26.04 LTS — provides automatic security updates via apt. On Debian, use the manual tarball install.
Install from the release tarball with manual systemd setup, including SELinux contexts. Covers RHEL, Rocky, Alma, Oracle Linux, and CentOS Stream 9+.
Install on any 64-bit Linux distribution from the release tarball. Maximum flexibility — typically chosen by advanced administrators and air-gapped environments.
Deploy a production-ready Mattermost stack from the Azure Marketplace, provisioned into your own Azure subscription with managed compute, database, storage, and load balancing.
Before you install
The Ubuntu/Debian, Red Hat (RHEL), and manual (tarball) methods all require you to bring your own host and database:
- A 64-bit Linux host with at least 1 vCPU and 2 GB RAM (supports up to ~1,000 users)
- PostgreSQL 15+ — either local to the host, on a separate server, or a managed service. See Set up the database, or PostgreSQL Migration if you're moving from MySQL.
- Inbound ports 80 and 443 (HTTPS) and 8065 (System Console). See Network ports for the full list, and Prepare for the pre-install checklist.
- Outbound access to your SMTP server's port (commonly 587) if you'll send email.
The Azure Native VM method provisions its own compute, managed PostgreSQL, and storage from the Azure Marketplace — see its prerequisites instead.
After you install
Once Mattermost is running, complete these steps before exposing it to users:
- Set up an NGINX reverse proxy and terminate TLS at the proxy. Don't run Mattermost as an internet-facing service without a proxy.
- Configure pre-authentication secrets if your environment requires them.
- Work through Configure Mattermost and onboard your users.
:::tip Air-gapped environments If you're deploying into a network-isolated enclave, see Air-Gapped Operations instead of the connected install paths above. It covers package mirroring and the configuration changes needed on top of the standard install. :::
See Deployment troubleshooting for common install failures.