We're Hiring!

Mattermost, Inc.

How to upgrade Mattermost server?

Hello how to upgrade matter most version from 5.22 to 5.29 ?

Hi @DhruvitSoni,

You can upgrade by following these steps:

  1. Review the upgrade notes and release notes for changes and features releases.
  2. Backup your Mattermost database using standard MySQL or PostgreSQL procedures depending on your database version, when Mattermost is shutdown.
  3. Backup and upgrade the Mattermost Server from the CLI using these steps below:

cd /tmp
wget https://releases.mattermost.com/5.29.1/mattermost-5.29.1-linux-amd64.tar.gz
tar -xzf mattermost*.gz
cp -R /opt/mattermost/config/* /tmp/mattermost/config/
sudo su
mv /opt/mattermost/data /tmp/mattermost/data
rsync -au /opt/mattermost/plugins/ /tmp/mattermost/plugins
rsync -au /opt/mattermost/client/plugins/ /tmp/mattermost/client/plugins
systemctl stop mattermost
mv /opt/mattermost /opt/old.mattermost
mv /tmp/mattermost /opt/mattermost
chown -R mattermost:mattermost /opt/mattermost
(If you have setup TLS) sudo setcap cap_net_bind_service=+ep ./bin/mattermost
systemctl start mattermost

Confirm Mattermost is working

rm /tmp/mattermost*.gz
rm -rf /opt/old.mattermost/

2 Likes

Are there plans to make upgrading a bit user friendly? I feel like there’s a lot that could go wrong in the above steps. Just my two cents.

1 Like

I’ll write you a program that you can just run with one command if you’d like, although it will be basically the same as the steps above, just executed for you - automated.