---
title: "Deploy Mattermost (with Calls)"
description: "Slack alternative with voice calls; files and settings survive redeploys"
category: "Other"
url: https://railway.com/deploy/mattermost-with-calls
---

# Deploy Mattermost (with Calls)

Slack alternative with voice calls; files and settings survive redeploys

**[Deploy Mattermost (with Calls) on Railway](https://railway.com/template/mattermost-with-calls)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/mattermost-with-calls/manifest.json

- **Creator:** Auromations
- **Category:** Other
- **Total deploys:** 1

## Template content

### Mattermost https://cdn.simpleicons.org/mattermost

- **Image:** mattermost/mattermost-team-edition:12.0.1
- **Health check:** /api/v4/system/ping
- **Public domain:** Yes

### Postgres https://cdn.simpleicons.org/postgresql

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:17

### setup https://cdn.simpleicons.org/mattermost

- **Image:** python:3.12-slim
- **Start command:** `/bin/sh -c "printenv SETUP_SCRIPT > /tmp/setup.py && exec python -u /tmp/setup.py"`

## Documentation

# Deploy and Host Mattermost on Railway

Mattermost is open source team chat: channels, direct messages, threads, file sharing, search, and integrations, in an app your team runs itself. This template runs Mattermost Team Edition 12 with voice calls switched on and everything your team creates kept safe across redeploys.

## About Hosting Mattermost

The template deploys three services:

- **Mattermost**: the server and web app, with a volume for uploaded files and installed plugins
- **Postgres**: messages, accounts, and Mattermost's own settings
- **setup**: a one-shot job that creates your admin account and turns voice calls on for everyone, then shows Completed

What it does differently:

- **Your files survive redeploys.** Uploads and installed plugins live on a volume. Templates without one lose every attachment on the next redeploy.
- **Your settings survive redeploys.** System Console changes are stored in Postgres instead of a file inside the container.
- **Voice calls work out of the box.** Mattermost ships its Calls plugin in test mode, where only admins can start a call. Here every user can, with no extra networking.
- **Nobody can claim your server.** The admin account is created for you with a generated password, instead of going to whoever opens the URL first. Open signup is off; people join through invite links.
- **Pinned to Mattermost 12.0.1**, so a redeploy never pulls a surprise upgrade.

## Common Use Cases

- A private Slack replacement for a team or company, with no per-seat fees
- Voice calls between teammates without a separate meeting tool
- Chat for communities, clubs, or classes that want to own their data
- Incident and on-call channels next to the infrastructure they cover

## Dependencies for Mattermost Hosting

- PostgreSQL 17 on a Railway volume
- The official `mattermost/mattermost-team-edition` image

### Deployment Dependencies

- [Mattermost documentation](https://docs.mattermost.com)
- [Mattermost Calls documentation](https://docs.mattermost.com/collaborate/audio-and-screensharing.html)

### Implementation Details

**The only question at deploy time** is your email, `MM_ADMIN_EMAIL`. Everything else is generated.

**First login (about 2 minutes after deploy)**

1. Wait until `Mattermost` is green and `setup` shows Completed.
2. Open the `setup` service's Variables tab and copy `MM_ADMIN_PASSWORD`.
3. Open the `Mattermost` service's public URL and sign in as `admin` (or your email) with that password. Change the password under Profile.
4. Create your team, then invite people with the invite link. Open signup is off because the URL is public; turn it on under System Console, Signup if you want it.

**Voice calls**

Open a direct message and click **Start call**. Calls connect over UDP straight to Railway.

- Mattermost Team Edition allows calls in 1:1 direct messages only. Calls in channels and group messages need a Mattermost Professional license.
- A network that blocks outgoing UDP (some offices and VPNs) needs a TURN relay. Add `MM_CALLS_ICE_SERVERS_CONFIGS` to the `Mattermost` service with your TURN provider's details, for example `[{"urls":["turn:turn.example.com:443?transport=tcp"],"username":"...","credential":"..."}]`, and redeploy.
- To turn calls off, disable the Calls plugin under System Console, Plugins.

**Email notifications (optional, any time)**

Mattermost sends no email until you configure it. Use your provider's SMTP details (Resend, Postmark, SES and others offer SMTP) under System Console, SMTP, or as variables on the `Mattermost` service: `MM_EMAILSETTINGS_SENDEMAILNOTIFICATIONS=true`, `MM_EMAILSETTINGS_SMTPSERVER`, `MM_EMAILSETTINGS_SMTPPORT`, `MM_EMAILSETTINGS_SMTPUSERNAME`, `MM_EMAILSETTINGS_SMTPPASSWORD`, `MM_EMAILSETTINGS_CONNECTIONSECURITY` (`TLS` or `STARTTLS`) and `MM_EMAILSETTINGS_FEEDBACKEMAIL` (the sender address).

**Custom domain**

Add the domain to the `Mattermost` service, then set `MM_SERVICESETTINGS_SITEURL` to `https://your.domain` and redeploy. Links in notifications and the mobile apps use that URL.

**After the first deploy: change things in Mattermost, not in variables**

- Change passwords and accounts in Mattermost. The `setup` variables only matter on the first deploy; editing them later changes nothing, and you can delete the `setup` service once it shows Completed.
- Settings changed in the System Console persist. A setting also set as a variable on the `Mattermost` service is locked to that variable's value, which is how this template pins its own choices.

**Back these up**

- The `Postgres` volume holds messages, accounts and settings.
- The `Mattermost` volume holds uploaded files and installed plugins.

**Troubleshooting**

- A call never connects (spins on Connecting): your network probably blocks UDP. See Voice calls above for the TURN setting.
- No Start call button in a channel: Team Edition only allows calls in 1:1 direct messages.
- `setup` ends with `Cannot sign in as admin`: the admin was changed or created by someone else before `setup` ran, so it left the server alone. Nothing is broken.
- The mobile app cannot connect: make sure `MM_SERVICESETTINGS_SITEURL` matches the address you type in the app, including `https://`.

**Upgrades**

Change the `Mattermost` image tag to a newer version and redeploy; Mattermost migrates its database on start. Read the release notes first for versions that need a newer Postgres.

## Why Deploy Mattermost on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Mattermost on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/mattermost-with-calls
