Mattermost is an open source team chat server, often used as a self-hosted Slack alternative. To run Mattermost self hosted on Out Plane, deploy the official mattermost/mattermost-team-edition:12.0.2 Docker image on port 8065, connect it to a managed PostgreSQL database, and mount a volume at /mattermost/data for uploaded files. HTTPS comes with the app's URL.
This guide maps the official container guide to Out Plane, then covers email, a custom domain, upgrades and backups. For other apps, see all templates.
What You Need to Install Mattermost
- An Out Plane plan. Starter and Pro both start with a 14 day free trial.
- An op-34 instance (1 vCPU, 2 GB). Mattermost sizes a single server at 1 vCPU and 2 GB RAM for up to 1,000 users, and 2 vCPUs with 4 GB for 1,000 to 2,000 users. The closest size for the second case is op-46 (2 vCPU, 3.9 GB).
- A managed PostgreSQL database, version 15 or newer. Mattermost 12 requires PostgreSQL 15, and MySQL support is deprecated since Mattermost 11. Out Plane offers 14 to 18, so keep the default, 17.
- A 10 GB volume at
/mattermost/data. Mattermost stores attachments, images and installed plugin bundles there. The size is fixed at creation.
Team Edition or Enterprise Edition Image
Mattermost publishes two images. mattermost-team-edition is free, MIT licensed and meant for teams under 250 activated users, without single sign-on. mattermost-enterprise-edition runs as the free Mattermost Entry plan until you add a license. Entry includes SSO but only shows the latest 10,000 channel messages, and Mattermost suggests it for teams under 50. This guide uses Team Edition 12.0.2, the latest stable release.
Deploy the Mattermost Docker Image on Out Plane
- Create the database. Open Create → Database, name it
chatdb, choose Frankfurt (apps run in Germany), keep version 17 and select Create database. - Add a role and a database. On the Access tab, create a role
mmuser, then a databasemattermostowned bymmuser. Mattermost's own setup guide makesmmuserthe owner so it can create tables on PostgreSQL 15 and newer. - Build the connection string. In the Connection panel, pick
mmuserandmattermost, choose the.envformat, and copyPGHOSTandPGPASSWORDinto this form. Keep thepostgres://scheme, which Mattermost expects, and URL-encode any symbols in the password.
postgres://mmuser:<PGPASSWORD>@<PGHOST>/mattermost?sslmode=require&connect_timeout=10- Create the app. Open Create → Application, choose the Image source, enter
mattermost/mattermost-team-edition:12.0.2and name itteamchat. Names use letters and numbers only and cannot be changed later. - Set compute and port. Pick op-34 under Compute. Under Ports, change the default
8080to8065, protocol HTTP, with Public on. Mattermost listens on:8065, all interfaces, by default. - Add the volume. Under Volumes, select Create volume, name it
mattermostdata, size 10 GB, mount path/mattermost/data. - Paste the environment variables. Use the connection string from step 3 twice, and replace
acmewith your team's slug:
MM_SQLSETTINGS_DRIVERNAME=postgres
MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:<PGPASSWORD>@<PGHOST>/mattermost?sslmode=require&connect_timeout=10
MM_CONFIG=postgres://mmuser:<PGPASSWORD>@<PGHOST>/mattermost?sslmode=require&connect_timeout=10
MM_SERVICESETTINGS_SITEURL=https://teamchat-8065-acme.outplane.app- Deploy. Select Deploy app. The first start creates the database tables. If the final URL differs from the Site URL, fix the variable and deploy again.
- Create the admin account. Open the URL and sign up. This first account is your system admin. Open sign-up is off by default on self-hosted servers, so other people join through invites.
The same app with the outplane CLI, after you create the database in the console:
DSN='postgres://mmuser:<PGPASSWORD>@<PGHOST>/mattermost?sslmode=require&connect_timeout=10'
outplane volume create mattermostdata --size 10 --json --fields id
outplane app create teamchat --image mattermost/mattermost-team-edition:12.0.2 \
--port 8065:http:public --size op-34 --volume <VOLUME_ID>:/mattermost/data \
--env MM_SQLSETTINGS_DRIVERNAME=postgres \
--env MM_SQLSETTINGS_DATASOURCE="$DSN" --env MM_CONFIG="$DSN" \
--env MM_SERVICESETTINGS_SITEURL=https://teamchat-8065-acme.outplane.app
outplane app get teamchatThe last command confirms the volume is mounted.
Configure Mattermost With Environment Variables
Every setting in config.json has an environment variable: add MM_, uppercase the path and replace the dot with an underscore, so ServiceSettings.SiteURL becomes MM_SERVICESETTINGS_SITEURL. A setting set this way is greyed out in the System Console.
Why MM_CONFIG matters. By default Mattermost saves System Console changes to /mattermost/config/config.json inside the container, which a redeploy replaces. With MM_CONFIG set to the connection string, the active configuration lives in the database and survives every deployment. Plugins survive too, because Mattermost reinstalls them from /mattermost/data at startup.
Email. Invites, password resets and notifications need SMTP:
MM_EMAILSETTINGS_SENDEMAILNOTIFICATIONS=true
MM_EMAILSETTINGS_SMTPSERVER=smtp.example.com
MM_EMAILSETTINGS_SMTPPORT=587
MM_EMAILSETTINGS_ENABLESMTPAUTH=true
MM_EMAILSETTINGS_SMTPUSERNAME=<user>
MM_EMAILSETTINGS_SMTPPASSWORD=<password>
MM_EMAILSETTINGS_CONNECTIONSECURITY=STARTTLS
[email protected]
[email protected]Outlook 365 will not work, because it dropped the basic SMTP authentication Mattermost uses. Set variables in Settings → Environment and select Save & deploy.
Calls. Calls sends media on port 8443, UDP first and TCP as a fallback, and clients need one of them to connect. Out Plane has no UDP ports and this setup publishes only 8065, so do not count on Calls here.
From Mattermost Docker Compose to Out Plane
| Compose setting | On Out Plane |
|---|---|
mattermost service image | Image source, same tag |
postgres service | Managed PostgreSQL, no database container |
nginx service and certificates | Not needed, HTTPS is automatic |
./volumes/app/mattermost/data | Volume at /mattermost/data |
config, logs, plugins, client/plugins volumes | Not needed: config lives in the database, plugins reinstall from /mattermost/data |
sudo chown -R 2000:2000 | Not needed |
Custom Domain and HTTPS
- Open Domains → Add domain, enter
chat.example.comwithout a scheme, and pickteamchatand port 8065. - Open the DNS dialog and create the record it shows: a CNAME for a subdomain, or an A record named
@for an apex domain. DNS takes 5 to 30 minutes, then HTTPS is issued automatically. - Set
MM_SERVICESETTINGS_SITEURL=https://chat.example.comand select Save & deploy. Mattermost requires the Site URL to match the address people use.
From the CLI: outplane domain add chat.example.com --app teamchat --port 8065, then outplane domain dns chat.example.com.
Update and Back Up Mattermost
Updates. Image apps never update themselves. Read Mattermost's important upgrade notes first, and pin exact version tags, as Mattermost advises for production. Then open Deployments → Deploy and enter the full reference, or run:
outplane deploy create teamchat --image mattermost/mattermost-team-edition:<new-version> --waitMattermost migrates the database schema on start, and its downgrade guide advises against going back more than one major version. Plan upgrades for a quiet hour, because the single instance restarts.
Backups. Managed PostgreSQL includes automated backups, which cover messages, users and, with MM_CONFIG, your configuration. Before an upgrade, also take your own dump from your machine:
pg_dump "postgres://mmuser:<PGPASSWORD>@<PGHOST>/mattermost?sslmode=require" -Fc -f mattermost.dumpOut Plane does not snapshot volumes, so files in /mattermost/data are yours to copy. Mattermost's backup guide treats the database and this directory as one backup set, so copy them at the same time.
What Mattermost Costs on Out Plane
| Item | Rate | 30 day month |
|---|---|---|
| op-34 instance | $0.0004167 per minute | $18.00 |
| 10 GB volume | $0.30 per GB a month | $3.00 |
| Managed PostgreSQL | $6.00 per database a month | $6.00 |
| Usage | $27.00 |
- Starter, $9 a month with $9 of usage included: about $27 a month.
- Pro, $29 a month with $15 included: about $41 a month.
On op-46 for 1,000 to 2,000 users, usage is $45, so about $45 on Starter and $59 on Pro. Starter and Pro both start with a 14 day free trial, and there is no per-user fee. Rates are on the pricing page.
Self-hosted vs Mattermost Cloud. Mattermost's pricing page lists no public prices on 2026-11-11. Paid plans are annual per-seat subscriptions through sales, and the hosted option is Mattermost Cloud Enterprise, a single-tenant service.
FAQ
Is self-hosted Mattermost free?
Yes. Team Edition is free under the MIT license, and the Enterprise image runs free as Mattermost Entry with the limits above. You pay only for hosting, about $27 a month here on Starter, after a 14 day free trial.
Do the iOS and Android apps work with a self-hosted server?
Yes. The store apps connect to your Site URL. Push notifications use Mattermost's hosted service on paid plans. Non-commercial servers can use its free test service, which Mattermost does not recommend for production.
Can I use the Mattermost Docker Compose file?
Not directly. Out Plane runs one image per app, so its services map to the app, managed PostgreSQL and built-in HTTPS, as in the table above.
Can Mattermost run on more than one instance?
Not in this setup. An app with a volume runs one instance, and Mattermost's clustered high availability needs an Enterprise license.