docs/main/administration-guide/onboard/migrate-gitlab-omnibus.mdx
GitLab has announced the deprecation of Mattermost from the GitLab Omnibus package with GitLab 19.0. As part of this transition, GitLab will continue to support Mattermost up to version 10.11 ESR within the Omnibus installation until the final removal date.
To ensure continuity and long-term support, organizations using Mattermost within GitLab Omnibus should plan to migrate to a standalone Mattermost installation. This approach provides ongoing access to the latest Mattermost releases, security updates, and enterprise capabilities independent of GitLab’s release cycle.
Migrating to a standalone deployment also enables greater flexibility in managing infrastructure, upgrading PostgreSQL, and scaling Mattermost independently to meet performance and compliance requirements.
Before you begin:
Follow the steps below to safely migrate from GitLab Omnibus to a standalone Mattermost installation.
<Note>The following procedure assumes your Mattermost database name is mattermost_production and your PostgreSQL user is mmuser. Adjust as needed for your environment.
Use the GitLab Omnibus PostgreSQL tools to create a dump of the Mattermost database. Run this command on the GitLab server:
sudo gitlab-psql -- /opt/gitlab/embedded/bin/pg_dump -h /var/opt/gitlab/postgresql --no-owner mattermost_production | gzip > mattermost_dbdump_$(date --rfc-3339=date).sql.gz
This will create a compressed SQL dump file of your Mattermost database.
Set up your new PostgreSQL server following the official Mattermost database preparation guidelines. This includes:
Transfer the database dump file to your new PostgreSQL server, then restore it:
zcat /tmp/mattermost_dbdump.sql.gz | psql -U mmuser -d mattermost
Verify that the database restoration completes successfully without errors.
On your standalone Mattermost server, update the config.json file to point to the new PostgreSQL server. Locate the SqlSettings.DataSource parameter and update it as follows:
"SqlSettings": {
"DriverName": "postgres",
"DataSource": "postgres://mmuser:password@new-postgres-server:5432/mattermost?sslmode=disable&connect_timeout=10"
}
Ensure that credentials, hostnames, and connection settings match your new PostgreSQL configuration.
To move Mattermost application files from the GitLab server to a new standalone server:
Install the same or newer version of Mattermost on the new server. See the Server Deployment Planning.
Copy your existing configuration and data from the GitLab Omnibus instance:
# On the GitLab server
sudo cp /var/opt/gitlab/mattermost/config/config.json /tmp/
sudo cp -r /var/opt/gitlab/mattermost/data /tmp/mattermost_data
# Transfer to new Mattermost server
scp /tmp/config.json mattermost@new-server:/opt/mattermost/config/
scp -r /tmp/mattermost_data mattermost@new-server:/opt/mattermost/data/
Ensure permissions are correctly set on the new server:
sudo chown -R mattermost:mattermost /opt/mattermost
Start the Mattermost service on your new standalone installation:
sudo systemctl start mattermost
Mattermost will now connect to your standalone PostgreSQL database.
After starting Mattermost, perform the following checks:
If you encounter errors during the migration:
config.json file contains the correct database connection string.mattermost.log for detailed errors.