---
title: "Deploy Mattermost"
description: "Open-source team chat with channels, threads and file sharing"
category: "Other"
url: https://railway.com/deploy/mattermost-2
---

# Deploy Mattermost

Open-source team chat with channels, threads and file sharing

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

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

- **Creator:** Agaz Self-Host
- **Category:** Other
- **Total deploys:** 2

## Template content

### Mattermost https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/mattermost.png

- **Source:** https://github.com/aalfath/mattermost-chat-railway-template
- **Health check:** /api/v4/system/ping
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

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

## Documentation

# Deploy and Host Mattermost on Railway

Mattermost is an open-source team chat platform, an alternative to Slack and Microsoft Teams. It offers public and private channels, threads, direct messages, file sharing, search, and integrations through webhooks, bots and plugins. Teams self-host it to keep their conversations and files on infrastructure they control.

## About Hosting Mattermost

Hosting Mattermost needs the Mattermost server, a PostgreSQL database and persistent storage for uploaded files and plugins. This template deploys Mattermost Team Edition 12.0.2, built from a public GitHub repository that pins the official image by digest, next to Railway PostgreSQL. A volume at `/mattermost/data` keeps files, plugins, logs and search indexes, and Mattermost stores its own settings in Postgres, so System Console changes survive redeploys. The Site URL comes from the Railway domain. Open the URL right after deploying and create your account: the first account becomes the system admin, and later users join by invitation.

## Common Use Cases

* Private team chat for companies that want their messages on their own infrastructure
* Engineering and DevOps channels with webhooks and bots for alerts, CI and incident response
* Community or project workspaces with public channels, threads and file sharing

## Dependencies for Mattermost Hosting

* PostgreSQL (Railway Postgres, included)
* A persistent volume for uploaded files and plugins (included)

### Deployment Dependencies

* [Mattermost deployment documentation](https://docs.mattermost.com/deployment-guide/server/deploy-containers.html)
* [Mattermost 12.0.2 release](https://github.com/mattermost/mattermost/releases/tag/v12.0.2)
* [Template repository](https://github.com/aalfath/mattermost-chat-railway-template)

### Implementation Details

The official image has no shell, so the repository adds a pinned static busybox to run a short start script. It converts Railway's `DATABASE_URL` into the form Mattermost expects, listens on `PORT` (8065), fixes the volume's ownership once and then runs Mattermost as its own user, not root. The health check is `/api/v4/system/ping`.

Email is not configured. To send notifications and password-reset emails, set SMTP in System Console → Environment → SMTP. When you add a custom domain, change `MM_SERVICESETTINGS_SITEURL` to `https://YOUR-DOMAIN`. Any other setting can be set as an `MM_SECTION_SETTING` variable. Version updates arrive through the repository: read its CHANGELOG and back up Postgres before applying one.

## 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) — Self-hosted virtual tabletop for role-playing games (license required)
- [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-2
