Deploy Mattermost on Linux#

Mattermost Server can be deployed on various Linux distributions, providing a flexible and robust platform for smaller teams and non-commercial customers. We don’t recommend deploying Mattermost Server and database on a single system for production use, but it is a good option for development and testing purposes.

This page covers deployment options for major Linux distributions and installation methods. Choose your preferred platform below for specific deployment instructions:

Minimum system requirements:

  • Operating System: 20.04 LTS, 22.04 LTS, 24.04 LTS
  • Hardware: 1 vCPU/core with 2GB RAM (support for up to 1,000 users)
  • Database: PostgreSQL v13+
  • Network:
    • Application 80/443, TLS, TCP Inbound
    • Administrator Console 8065, TLS, TCP Inbound
    • SMTP port 10025, TCP/UDP Outbound

You can deploy Mattermost server using our .deb signed packages using the Mattermost PPA (Personal Package Archive). This is the quickest way to install a Mattermost Server that provides automatic updates. This install method is used for both single and clustered installations, as you can tools like Packer for a clustered deployment.

Tip

Alternatively, an Omnibus Package deployment bundles together all required components to greatly reduce setup and ongoing maintenance, including Mattermost Server, a PostgreSQL database, NGINX as the application proxy, a custom CLI, and ansible recipes to configure and connect these components.

This Mattermost deployment includes 4 steps: add the PPA repository, install Mattermost server, configure the server, and update the server.

Step 1: Add the Mattermost Server PPA repository

Important

The GPG public key has changed. You can import the new public key or run the automatic Mattermost PPA repository setup script provided below. Depending on your setup, additional steps may also be required, particularly for installations that didn’t rely on the repository setup script. We recommend deleting the old key from /etc/apt/trusted.gpg.d before adding the apt repository.

  • For Ubuntu Focal - 20.04 LTS:

    sudo apt-key del A1B31D46F0F3A10B02CF2D44F8F2C31744774B28

    curl -sL -o- https://deb.packages.mattermost.com/pubkey.gpg | gpg --dearmor | sudo apt-key add

  • For Ubuntu Jammy - 22.04 LTS and Ubuntu Noble - 24.04 LTS:

    sudo rm /usr/share/keyrings/mattermost-archive-keyring.gpg

    curl -sL -o- https://deb.packages.mattermost.com/pubkey.gpg |  gpg --dearmor | sudo tee /usr/share/keyrings/mattermost-archive-keyring.gpg > /dev/null

In a terminal window, run the following repository setup command to add the Mattermost Server repositories:

curl -o- https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s mattermost

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

Step 2: Instal Mattermost server

Ahead of installing the Mattermost Server, it’s good practice to update all your repositories and, where required, update existing packages by running the following command:

sudo apt update

After any updates and system reboots are complete, you can install the Mattermost Server by running:

sudo apt install mattermost -y

You now have the latest Mattermost Server version installed on your system.

The installation path is /opt/mattermost. The package will have added a user and group named mattermost. The required systemd unit file has also been created but will not be set to active.

Note

Since the signed package from the Mattermost repository is used for mulitple installation types, we don’t add any dependencies in the systemd unit file. If you are installing the Mattermost server on the same system as your database, you may want to add both After=postgresql.service and BindsTo=postgresql.service to the [Unit] section of the systemd unit file.

Step 3: Configure the server

Before you start the Mattermost Server, you need to edit the configuration file. A sample configuration file is located at /opt/mattermost/config/config.defaults.json.

Rename this configuration file with correct permissions:

sudo install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json

Configure the following properties in this file:

  • Under SqlSettings, set DriverName to "postgres". This is the default and recommended database for all Mattermost installations.

  • Under SqlSettings, set DataSource to "postgres://mmuser:<mmuser-password>@<host-name-or-IP>:5432/mattermost?sslmode=disable&connect_timeout=10" replacing mmuser, <mmuser-password>, <host-name-or-IP> and mattermost with your database name.

  • Under ServiceSettings, set "SiteURL": The domain name for the Mattermost application (e.g. https://mattermost.example.com).

We recommend configuring the Support Email under SupportSettings, set "SupportEmail". This is the email address your users will contact when they need help.

After modifying the config.json configuration file, you can now start the Mattermost Server:

sudo systemctl start mattermost

Verify that Mattermost is running: curl http://localhost:8065. You should see the HTML that’s returned by the Mattermost Server.

The final step, depending on your requirements, is to run sudo systemctl enable mattermost.service so that Mattermost will start on system boot.

Note

The value of the sslmode property in the DataSource configuration is entirely dependent on your native environment. Please consult the native environment setup documentation for guidance on its value. The available options for sslmode are disable or require. For example, if you are using Amazon Lightsail as your data source, you must set sslmode to require to successfully connect to the database.

Step 4: Update the server

When a new Mattermost version is released, run: sudo apt update && sudo apt upgrade to download and update your Mattermost instance.

Note

When you run the sudo apt upgrade command, mattermost-server will be updated along with any other packages. We strongly recommend you stop the Mattermost Server before running the apt command using sudo systemctl stop mattermost.

Remove Mattermost

Run the following command to remove the Mattermost Server:

sudo apt remove --purge mattermost

Minimum system requirements:

  • Operating System: Enterprise Linux 7+, Oracle Linux 6+, Oracle Linux 7+
  • Hardware: 1 vCPU/core with 2GB RAM (support for up to 1,000 users)
  • Database: PostgreSQL v13+
  • Network:
    • Application 80/443, TLS, TCP Inbound
    • Administrator Console 8065, TLS, TCP Inbound
    • SMTP port 10025, TCP/UDP Outbound

You can deploy Mattermost Server using our rpm signed packages available through the Mattermost Yum repository.

This Mattermost deployment includes 4 steps: download, install Matermost server, set up the server, and update the server.

Step 1: Download the latest Mattermost Server tarball

In a terminal window, ssh onto the system that will host the Mattermost Server.

Using wget, download the Mattermost Server release you want to install.

wget https://releases.mattermost.com/10.6.1/mattermost-10.6.1-linux-amd64.tar.gz
wget https://releases.mattermost.com/10.5.2/mattermost-10.5.2-linux-amd64.tar.gz

If you are looking for an older release, Enterprise and Team Edition releases can be found in our version archive documentation.

Step 2: Install Mattermost server

  1. Ahead of installing the Mattermost Server, we recommend updating all your repositories and, where required, update existing packages by running the following commands:

sudo dnf update
sudo dnf upgrade
  1. After any updates, and any system reboots, are complete, install the Mattermost Server by extracting the tarball, creating users and groups, and setting file/folder permissions.

  1. First extract the tarball:

tar -xvzf mattermost*.gz
  1. Now move the entire folder to the /opt directory (or whatever path you require):

sudo mv mattermost /opt

Note

If you choose a custom path, ensure this alternate path is used in all steps that follow.`

  1. Create the default storage folder. By default the Mattermost Server uses /opt/mattermost/data as the folder for files. This can be changed in the System Console during setup (even using alternative storage such as S3):

sudo mkdir /opt/mattermost/data
  1. Set up a user and group called mattermost:

sudo useradd --system --user-group mattermost

Note

If you choose a custom user and group name, ensure it is used in all the steps that follow.

  1. Set the file and folder permissions for your installation:

sudo chown -R mattermost:mattermost /opt/mattermost
  1. Give the mattermost group write permissions to the application folder:

sudo chmod -R g+w /opt/mattermost

You will now have the latest Mattermost Server version installed on your system. Starting and stopping the Mattermost Server is done using systemd.

  1. Create the systemd unit file:

sudo touch /lib/systemd/system/mattermost.service
  1. As root, edit the systemd unit file to add the following lines:

[Unit]
Description=Mattermost
After=network.target

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
KillMode=mixed
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target
  1. Save the file and reload systemd using sudo systemctl daemon-reload. Mattermost Server is now installed and is ready for setup.

Step 3: Set up the server

Before you start the Mattermost Server, you need to edit the configuration file. A default configuration file is located at /opt/mattermost/config/config.json. We recommend taking a backup of this default config ahead of making changes:

sudo cp /opt/mattermost/config/config.json /opt/mattermost/config/config.defaults.json

Configure the following properties in this file:

  • Under SqlSettings, set DriverName to "postgres". This is the default and recommended database for all Mattermost installations.

  • Under SqlSettings, set DataSource to "postgres://mmuser:<mmuser-password>@<host-name-or-IP>:5432/mattermost?sslmode=disable&connect_timeout=10" replacing mmuser, <mmuser-password>, <host-name-or-IP> and mattermost with your database name.

  • Under ServiceSettings, set "SiteURL": The domain name for the Mattermost application (e.g. https://mattermost.example.com).

Note

We recommend configuring the Support Email under SupportSettings, set "SupportEmail". This is the email address your users will contact when they need help.

After modifying the config.json configuration file, you can now start the Mattermost server:

sudo systemctl start mattermost

Verify that Mattermost is running: curl http://localhost:8065. You should see the HTML that’s returned by the Mattermost Server.

The final step, depending on your requirements, is to run sudo systemctl enable mattermost.service so that Mattermost will start on system boot. If you don’t receive an error when starting Mattermost after the previous step, you are good to go. If you did receive an error, continue on.

Important

Modify SELinux settings: When deploying Mattermost from RHEL9, which has SELinux running with enforceing mode enabled by default, additional configuration is required.

  • SELinux is a security module that provides access control security policies. It’s enabled by default on RHEL and CentOS systems. SELinux can block access to files, directories, and ports, which can cause issues when starting Mattermost. To resolve these issues, you’ll need to set the appropriate SELinux contexts for the Mattermost binaries and directories, and allow Mattermost to bind to ports.

  • Ensure that SELinux is enabled and in enforcing mode by running the sestatus command. If it’s enforcing, you’ll need to configure it properly.

  • Set bin contexts for /opt/mattermost/bin: SELinux enforces security contexts for binaries. To label the Mattermost binaries as safe, you’ll need to set them to the below SELinux context.

    sudo semanage fcontext -a -t bin_t "/opt/mattermost/bin(/.*)?"
    sudo restorecon -RF /opt/mattermost/bin
    

    Now, try starting Mattermost again with

    sudo systemctl start mattermost
    

    If you don’t receive an error, verify that Mattermost is running: curl http://localhost:8065. You should see the HTML that’s returned by the Mattermost Server. You’re all set!

    If on starting Mattermost you receive an error, before moving on, check for the existence of a file in /opt/mattermost/logs - if mattermost.log exists in that directory, it’s more likely you’re dealing with a configuration issue in config.json. Double check the previous steps before continuing

    Try different contexts for /opt/mattermost: SELinux enforces security contexts for files and directories. To label your Mattermost directory as safe, you’ll need to set an appropriate SELinux context.

    1. Check current context by running ls -Z /opt/mattermost. When you see something like drwxr-xr-x. root root unconfined_u:object_r:default_t:s0 mattermost returned, the default_t indicates that SELinux doesn’t know what this directory is for.

    2. Set a safe context by assigning a SELinux type that’s compatible with web services or applications by running sudo semanage fcontext -a -t httpd_sys_content_t "/opt/mattermost(/.*)?". A common one is httpd_sys_content_t, used for serving files. Ensure you match the directory and its contents recursively. Run the sudo restorecon -R /opt/mattermost to apply the changes.

    Allow Mattermost to bind to ports: When Mattermost needs specific ports (e.g., 8065), ensure that SELinux allows it by allowing Mattermost to bind to ports. Run the sudo semanage port -l | grep 8065 command, and if the port’s not listed, you’ll need to add it by running sudo semanage port -a -t http_port_t -p tcp 8065, replacing the 8065 with the required port.

    Handle custom policies: If Mattermost requires actions that SELinux blocks, you’ll need to generate a custom policy.

    1. Check for SELinux denials first in the logs by running sudo ausearch -m avc -ts recent, or by checking the audit log: sudo cat /var/log/audit/audit.log | grep denied.

    2. If needed, generate a policy module by installing audit2allow to generate policies automatically.

    sudo yum install -y policycoreutils-python-utils
    sudo grep mattermost /var/log/audit/audit.log | audit2allow -M mattermost_policy
    sudo semodule -i mattermost_policy.pp
    

    Test the configuration: Restart Mattermost to confirm the configuation works as expected by running sudo systemctl restart mattermost. In the case of failures, revisit the logs to identify other SELinux-related issues.

    Need Mattermost working quickly for testing purposes?

    • You can change SELinux to permissive mode by running the sudo setenforce 0. command where policies aren’t enforced, only logged.

    • This command changes the SELinux mode to “permissive”. While in permissive mode, policies aren’t enforced, and violations are logged instead of being blocked. This can be helpful for debugging and troubleshooting issues related to SELinux policies.

    • Ensure you re-enable enforcing mode once context is working as needed by running the sudo setenforce 1 command.

    See the following SELinux resources for additional details:

Step 3: Update the server

Updating your Mattermost Server installation when using the tarball requires several manual steps. See the upgrade Mattermost Server documentation for details.

Remove Mattermost

To remove the Mattermost Server, you must stop the Mattermost Server, back up all important files, and then run this command:

sudo rm /opt/mattermost

Note

Depending on your configuration, there are several important folders in /opt/mattermost to backup. These are config, logs, plugins, client/plugins, and data. We strongly recommend you back up these locations before running the rm command.

You may also remove the Mattermost systemd unit file and the user/group created for running the application.

Minimum system requirements:

  • Hardware: 1 vCPU/core with 2GB RAM (support for up to 1,000 users)
  • Database: PostgreSQL v13+
  • Network:
    • Application 80/443, TLS, TCP Inbound
    • Administrator Console 8065, TLS, TCP Inbound
    • SMTP port 10025, TCP/UDP Outbound

You can install the Mattermost Server on any 64-bit Linux system using the tarball. This is the most flexible installation method, but it comes with the highest effort, typically favored by advanced system administrators.

This Mattermost deployment includes 3 steps: download, install Mattermost server, and set up the server.

Step 1: Download

In a terminal window, ssh onto the system that will host the Mattermost Server.

Using wget, download the Mattermost Server release you want to install.

wget https://releases.mattermost.com/10.6.1/mattermost-10.6.1-linux-amd64.tar.gz
wget https://releases.mattermost.com/10.5.2/mattermost-10.5.2-linux-amd64.tar.gz

If you are looking for an older release, Enterprise and Team Edition releases can be found in our version archive documentation.

Step 2: Install Mattermost server

Install the Mattermost Server by extracting the tarball, creating users and groups, and setting file/folder permissions.

  1. First extract the tarball:

tar -xvzf mattermost*.gz
  1. Move the entire folder to the /opt directory (or whatever path you require):

sudo mv mattermost /opt

Note

If you choose a custom path, ensure this alternate path is used in all steps that follow.

  1. Create the default storage folder. By default the Mattermost Server uses /opt/mattermost/data as the folder for files. This can be changed in the System Console during setup (even using alternative storage such as S3).

sudo mkdir /opt/mattermost/data
  1. Set up a user and group called mattermost:

sudo useradd --system --user-group mattermost

Note

If you choose a custom user and group name, ensure it is used in all the steps that follow.

  1. Set the file and folder permissions for your installation:

sudo chown -R mattermost:mattermost /opt/mattermost
  1. Give the mattermost group write permissions to the application folder:

sudo chmod -R g+w /opt/mattermost

You will now have the latest Mattermost Server version installed on your system. Starting and stopping the Mattermost Server is done using systemd.

  1. Create the systemd unit file:

sudo touch /lib/systemd/system/mattermost.service
  1. As root, edit the systemd unit file to add the following lines:

[Unit]
Description=Mattermost
After=network.target

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
KillMode=mixed
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target

Note

If you are installing the Mattermost server on the same system as your database, you may want to add both After=postgresql.service and BindsTo=postgresql.service to the [Unit] section of the systemd unit file.

  1. Save the file and reload systemd using sudo systemctl daemon-reload. Mattermost Server is now installed and is ready for setup.

Step 3: Set up the server

Before you start the Mattermost Server, you need to edit the configuration file. A default configuration file is located at /opt/mattermost/config/config.json. We recommend taking a backup of this default config ahead of making changes:

sudo cp /opt/mattermost/config/config.json /opt/mattermost/config/config.defaults.json

Configure the following properties in this file:

  • Under SqlSettings, set DriverName to "postgres". This is the default and recommended database for all Mattermost installations.

  • Under SqlSettings, set DataSource to "postgres://mmuser:<mmuser-password>@<host-name-or-IP>:5432/mattermost?sslmode=disable&connect_timeout=10" replacing mmuser, <mmuser-password>, <host-name-or-IP> and mattermost with your database name.

  • Under ServiceSettings, set "SiteURL": The domain name for the Mattermost application (e.g. https://mattermost.example.com).

We recommend configuring the Support Email under SupportSettings, set "SupportEmail". This is the email address your users will contact when they need help.

After modifying the config.json configuration file, you can now start the Mattermost server:

sudo systemctl start mattermost

Verify that Mattermost is running: curl http://localhost:8065. You should see the HTML that’s returned by the Mattermost Server.

The final step, depending on your requirements, is to run sudo systemctl enable mattermost.service so that Mattermost will start on system boot.

Step 4: Update the server

Updating your Mattermost Server installation when using the tarball requires several manual steps. See the upgrade Mattermost Server documentation for details.

Remove Mattermost

To remove the Mattermost Server for any reason, you must stop the Mattermost Server, back up all important files, and then run this command:

sudo rm - rf /opt/mattermost

Note

Depending on your configuration, there are several important folders in /opt/mattermost to backup. These are config, logs, plugins, client/plugins, and data. We strongly recommend you back up these locations before running the rm command.

You may also remove the Mattermost systemd unit file and the user/group created for running the application.

Minimum system requirements:

  • Hardware: 1 vCPU/core with 2GB RAM (support for up to 1,000 users)
  • Operating System: Ubuntu 20.04 or greater
  • Database: PostgreSQL v13+
  • Network ports required:
    • Application ports 80/443, TLS, TCP Inbound
    • Administrator Console port 8065, TLS, TCP Inbound
    • SMTP port 10025, TCP/UDP Outbound

Mattermost Omnibus packages together all required components: the free version Mattermost Enterprise, a PostgreSQL database, and NGINX as the application proxy. It uses a custom CLI (mmomni) and ansible recipes to configure and connect these components. Omnibus supports Ubuntu distributions only.

This Mattermost deployment includes 4 steps: add the Mattermost PPA repositories, install Mattermost Omnibus, and set up Omnibus, and update Omnibus.

Step 1: Add the Mattermost PPA repositories

In a terminal window, run the following repository setup command:

curl -o- https://deb.packages.mattermost.com/repo-setup.sh | sudo bash

This command sets up all required repositories and configures:

  • PostgreSQL database

  • NGINX web server as a proxy

  • Certbot for SSL certificate management

  • Mattermost Omnibus repository

Step 2: Install Mattermost Omnibus

  1. When installing Mattermost Omnibus, SSL is enabled by default to provide a secure connection between the Mattermost server and the Mattermost client. To install with SSL, run the following command:

// Install Mattermost Omnibus with SSL enabled
sudo apt install mattermost-omnibus -y

Tip

Just looking to try out Mattermost? Run the following command to install Omnibus without SSL:

// Install Mattermost Omnibus without SSL
sudo MMO_HTTPS=false apt install mattermost-omnibus -y
  1. You’re prompted to specify a domain name and email address that will be used to generate the SSL certificate, and deliver related communications.

  2. After all the packages are installed, Omnibus runs ansible scripts that configure all the platform components and starts the server.

  3. 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.

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

Step 3: Configure Mattermost Omnibus

Note

Plugin uploads, local mode, and HTTPS are enabled by default. These settings are modified in the yaml file as described below.

Unlike traditional Mattermost installations, Omnibus stores its configuration directly in a database, eliminating the need for a config.json file. However, Omnibus itself requires a configuration file located at /etc/mattermost/mmomni.yml to manage its own settings and service interconnections.

To modify Mattermost server settings within an Omnibus environment (with the exception of those listed below), you’ll need to utilize the mmctl command-line tool. Specifically, the mmctl --local config edit command allows you to make the necessary adjustments. For detailed instructions and options, refer to the mmctl documentation.

Please note that certain configuration parameters, such as the Mattermost server port, must remain unchanged to ensure optimal Omnibus functionality. The following parameters must be configured directly using the mmomni.yml file:

  • db_user: The PostgreSQL database user. This value is generated during the Omnibus installation and should not be changed.

  • db_password: The PostgreSQL database password. This value is generated during the Omnibus installation and should not be changed.

  • fqdn: The domain name for the Mattermost application. This is the value you’re prompted for during the install process, and it’s used to populate the ServiceSettings.SiteURL Mattermost configuration property, as well as to retrieve and configure the SSL certificate for the server.

  • email: The email address used for certificate communications. This is the value you’re prompted for during the install process, and it won’t used if HTTPS is disabled.

  • https: This indicates whether the platform should be configured to use HTTPS or HTTP with values true or false. The recommended way to install Mattermost is to use HTTPS, but you can disable it if necessary.

  • data_directory: This is the directory where Mattermost stores its data.

  • enable_plugin_uploads: This setting can be true or false, and is used to configure the PluginSettings.EnableUploads Mattermost configuration property.

  • enable_local_mode: This setting can be true or false and is used to configure the ServiceSettings.EnableLocalMode Mattermost configuration property.

  • nginx_template: Optional path to a custom NGINX template.

After modifying the mmomni.yml configuration file, run mmomni reconfigure to apply the changes, and then restart the Mattermost server with systemctl restart mattermost.

Step 4: Update Mattermost Omnibus

Mattermost Omnibus is integrated with the apt package manager.

Before updating Mattermost , we strongly recommend stopping the Mattermost server by running the command sudo systemctl stop mattermost.

Run the following command to download and update your Mattermost instance (along with any other packages):

sudo apt update && sudo apt upgrade

Backup and restore

The Mattermost Omnibus CLI tool mmomni simplifies server and domain migration, as well as backup and restore. You can easily create snapshots of your entire Mattermost server, including all content, users, plugins, configurations, and databases. These snapshots can be restored to the same server or a different one.

To back up the contents of your Mattermost server, run the following command:

mmomni backup -o /tmp/mm_backup_datetime.tgz

To restore the contents of your Mattermost server, run the following two commands:

mmomni restore /tmp/mm_backup_datetime.tgz
mmomni reconfigure

Remove Mattermost Omnibus

Run the following command to remove Mattermost and Mattermost Omnibus completely:

sudo apt remove --purge mattermost mattermost-omnibus

Frequently asked questions

Can I use a license with Omnibus? Yes. Mattermost Omnibus bundles the free, unlicensed Mattermost Enterprise Edition, and Enterprise features are unlocked when you purchase and upload a license.

Can I use an Omnibus server as part of a cluster? No. Omnibus is designed to be a self-contained single server Mattermost platform. It expects all the necessary components to be on the same server.

Does the SSL Certificate automatically renew? Yes. The SSL certificate automatically updated and renewed. Omnibus installs the certbot package to manage the certificate, and it comes with a cron job that you can find at /etc/cron.d/certbot that automatically launches the renewal process.

How do I fix an EXPKEYSIG error on upgrades? This error indicates that your certificate is expired. Run the following commands to obtain a new certificate:

sudo apt-key remove 44774B28
sudo curl -o- https://deb.packages.mattermost.com/pubkey.gpg | sudo apt-key add -
sudo apt update

Can I use a custom NGINX template? Yes. Mattermost Omnibus supports using a custom NGINX template to generate its configuration.

  • To use this feature, you need to copy and modify the original template located at /opt/mattermost/mmomni/ansible/playbooks/mattermost.conf to a new location.

  • Use caution when using this feature. Making changes to the custom template can cause the reconfigure process to fail, or the generated NGINX configuration to be invalid.

  • Then, you can either use the variables and internal logic already bundled in the template and modify the parts that you need, or use a fully static configuration instead.

  • After the template has been customized, add an nginx_template property to the /etc/mattermost/mmomni.yml configuration file, and then run mmomni reconfigure. The reconfigure process will use the new template to generate the NGINX final configuration. You can check the contents of the /etc/nginx/conf.d/mattermost.conf file to validate that the changes were applied successfully.

What mmomni commands are available?

  • mmomni backup: Takes a complete snapshot of your Mattermost server and places the backup file in a specified file location.

  • mmomni restore: Restores specified backup file to your Mattermost server.

  • mmomni reconfigure: Reruns the process that changes domain, SSL, or any Omnibus-specified restrictions such as the ability to upload plugins. It also applies any changes made to the mmomni.yml configuration file.

  • mmomni status: Shows current status of all Omnibus components.

  • mmomni tail: Runs a join tail of logs of all Omnibus components.

Secure your Mattermost deployment#

Configuring TLS and setting up an NGINX proxy ensures secure communication between clients and your Mattermost server. This setup allows you to serve HTTPS traffic while proxying requests to Mattermost. You don’t need TLS enabled within Mattermost itself as NGINX will handle HTTPS traffic.

  1. Install NGINX on the host server. See the set up NGINX proxy documentation for details.

  2. Obtain a TLS certificate from a trusted certificate authority (CA) or use a self-signed certificate for testing purposes.

  3. Configure NGINX with TLS certificates to serve HTTPS traffic. NGINX serves as a proxy, forwarding requests to the Mattermost application running locally or on a separate server.

Note

  • Your Mattermost Server deployments requires a PostgreSQL database. See the database preparation documentation for details on this prerequisite.

  • See the deployment troubleshooting documentation for resolutions to common deployment issues.