Deploy Mattermost on Docker


This unofficial guide is maintained by the Mattermost community and this deployment configuration is not yet officially supported by Mattermost, Inc. Community testing, feedback and improvements are welcome and greatly appreciated. You can edit this page on GitHub.

Deploy Mattermost using a multi-node production configuration with Docker Compose. Experience with Docker Compose is recommended.

For a single-node preview of Mattermost (without email) see Local Machine Setup using Docker.

If you have any problems installing, see the troubleshooting guide. To submit an improvement or correction, click Edit at the top of this page.

Production Docker Setup on Ubuntu

  1. Install Docker using the Ubuntu online guide or these instructions:

    sudo apt-get update
    sudo apt-get install wget
    wget -qO- | sh
    sudo usermod -aG docker <username>
    sudo service docker start
    newgrp docker
  2. Install Docker Compose using the online guide. You have to download the latest release from the Docker Compose Github page and put the binary on your /usr/local/bin folder. Usually, you can use the following command, replacing $dockerComposeVersion with the Docker Compose version to install:

    sudo curl -L "$dockerComposeVersion/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
  3. Deploy the Mattermost Production Docker setup by running:

    sudo apt-get install git
    git clone
    cd mattermost-docker
    docker-compose build
    mkdir -pv ./volumes/app/mattermost/{data,logs,config,plugins,client-plugins}
    sudo chown -R 2000:2000 ./volumes/app/mattermost/
    docker-compose up -d
  4. Configure TLS by following the instructions.

  5. Configure Email by following the SMTP email setup guide.

  6. (Optional) To enable enterprise features under System Console > Edition and License upload your trial license or subscription license file received via email.

  7. Configure your Server based on the configuration settings documentation.

Additional Guides:

Production Docker Setup on Arch Linux

To install on Arch Linux, see the installation guide on the Arch Linux wiki.

Production Docker Setup on macOS

You can run a production deployment on macOS by installing Docker Compose using the online guide then following the above instructions.

Other Options

To install Mattermost Team Edition instead of Mattermost Enterprise Edition, open docker-compose.yaml and uncomment the following lines:

# args:
#   - edition=team