To keep your Rocket Chat installation running smoothly and secure, it’s crucial to stay up to date with the latest software updates. In this guide, I’ll walk you through the process of how to update Rocket Chat when it’s installed via Snap, making sure you can take advantage of the newest features and security enhancements without a hitch.
Want to update Rocket Chat installed via Docker?
Without further ado, let’s dive right in.
Backup the database
The first thing we would do is back up our database. It’s a common practice, not just for Rocket Chat. Always take backups.
Stop the Rocket Chat service:
service snap.rocketchat-server.rocketchat-server stop
Backup the Rocket Chat database with:
snap run rocketchat-server.backupdb
If the above command has successfully completed, you will receive the following message.
[+] A backup of your data can be found at /var/snap/rocketchat-server/common/backup/rocketchat_backup_20231102.0747.tar.gz
Start the service again.
service snap.rocketchat-server.rocketchat-server start
Update
Now, it will depend on which channel you are on and which version of Rocket Chat you have. For default installations, the channel will be latest.
To get more info about the available channels and the current channel used, you can run the following command.
snap info rocketchat-server
Let’s say you are on Rocket Chat version 5.4.x and would like to update to version 6.x.x using the stable channel. To accomplish this, you need to switch to the stable channel of 6.x.
snap switch rocketchat-server --channel=6.x/stable
Once you’ve completed the previous step, the last and final step is to refresh your snap.
snap refresh rocketchat-server
This process will take a few minutes, and upon completion, you will be on the latest stable release of version 6.x.