Levelrail
Skip to content

Self-host Mattermost with Docker ​

An open-source, self-hosted alternative to Slack for team messaging and collaboration.

This page describes the Levelrail template for Mattermost (Communication). It deploys the services below as one Docker Compose app on your own server.

Project site: https://docs.mattermost.com.

Recommended memory: about 1024 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
dbpostgres:16-alpinenone
mattermost_db_data -> /var/lib/postgresql/data
mattermostmattermost/mattermost-team-edition:release-108065
mattermost_data -> /mattermost/data

Environment variables ​

ServiceVariableValue
dbPOSTGRES_DBPreset in the template
dbPOSTGRES_PASSWORDGenerated at deploy
dbPOSTGRES_USERPreset in the template
mattermostMM_SERVICESETTINGS_SITEURLPreset in the template
mattermostMM_SQLSETTINGS_DATASOURCEGenerated at deploy
mattermostMM_SQLSETTINGS_DRIVERNAMEPreset in the template

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

Deploy Mattermost with Levelrail ​

In the dashboard, open Apps, choose New app, then Browse templates, and select Mattermost. Review the Compose body and deploy.

With the CLI:

levelrail-cli templates deploy mattermost --name my-mattermost

See Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.

More Communication templates ​

All templates are listed in the self-host gallery.

Released under the Apache 2.0 License.