Deploy Mattermost

A complete Mattermost installation consists of three main components: a proxy server, a database server, and the Mattermost server. You can install all components on one machine, or you can install each component on its own machine. If you have only two machines, then install the proxy and the Mattermost server on one machine, and install the database on the other machine.

For the database, you can install either MySQL or PostgreSQL. The proxy is NGINX.

To install Mattermost server for production use, you can deploy using an RPM package, deploy using a DEB package, deploy from a compressed tarball, deploy using Kubernetes, or deploy using Docker.

plans-img Available on all plans

deployment-img self-hosted deployments

Mattermost bundles the components of a Mattermost deployment into a single installation, called Omnibus. Mattermost Omnibus currently supports Ubuntu’s bionic and focal distributions. The package bundles the free, unlicensed Mattermost Enterprise version of Mattermost, and leverages the apt package manager to install and update the platform components. A custom CLI and ansible recipes link the components together and configures them.

Minimum system requirements

  • Hardware: 2 vCPUs/cores with 4GB RAM (support for 1,000-2,000 users)

  • Database: MySQL v8+ or PostgreSQL v12+

  • Network ports required:

    • Application ports 80/443, TLS, TCP Inbound

    • Administrator Console port 8065, TLS, TCP Inbound

    • SMTP port 10025, TCP/UDP Outbound

Deploy Omnibus

  1. In a terminal window, run the following command to configure the repositories needed for a PostgreSQL database, configure an NGINX web server to act as a proxy, configure certbot to issue and renew the SSL certificate, and configure the Mattermost Omnibus repository so that you can run the install command.

    curl -o- https://deb.packages.mattermost.com/repo-setup.sh | sudo bash
    
  2. Install the Omnibus package.

    sudo apt install mattermost-omnibus -y
    

To issue the certificate, the installer requests a domain name and an email address from you. These are used to generate the certificate and deliver any related communications. After all the packages are installed, Omnibus runs ansible scripts that configure all the platform components and starts the server.

Note

If you encounter EXPKEYSIG, this indicates that the certificate is expired. To obtain a new certificate, run the following commands:

sudo apt-key remove 44774B28
sudo curl -o- https://deb.packages.mattermost.com/pubkey.gpg | sudo apt-key add -
sudo apt update
  1. Open a browser and navigate to your Mattermost domain either by domain name (e.g. mymattermostserver.com), or by the server’s IP address if you’re not using a domain name.

  2. Create your first Mattermost user, invite more users, and explore the Mattermost platform.

    Note

    We recommend installing and configuring Omnibus with SSL enabled; however, you can run the following command to disable SSL: sudo MMO_HTTPS=false apt install mattermost-omnibus.

See Configure Mattermost Omnibus documentation for configuration details, details on using a custom NGINX template, how to remove Mattermost Omnibus, how to back up and restore using the Mattermost Omnibus CLI, and frequently asked questions.

Update Mattermost Omnibus

Mattermost Omnibus is integrated with the apt package manager. When a new Mattermost version is released, run: sudo apt update && sudo apt upgrade to download and update your Mattermost instance.

Tip

  • See the MM Server configuration documentation for details on reqired configuration & setup.

  • See the configuration settings documentation to learn more about customizing your production deployment.

  • Encountering issues with your deployment? See the deployment troubleshooting documentation for details.