How to Update Rocket Chat Installed via Docker

Keeping your Rocket Chat instance up-to-date is essential to ensure you benefit from the latest features, security patches, and performance improvements. If you’ve deployed Rocket Chat using Docker, updating it is a straightforward process that involves a few steps. In this guide, I’ll walk you through the process of how to update Rocket Chat installed via Docker seamlessly.

Want to update Rocket Chat installed via Snap?

Backup database

As usual, the first thing we will do is back up our database.

To obtain the MongoDB container name, execute the following command:

docker ps -a

Here, rocketchat-mongodb-1 is the MongoDB container name, and rc-db-18-11-2023 is the dump name. You can change the dump name to anything you would like.

docker exec rocketchat-mongodb-1 sh -c 'mongodump --archive' > rc-db-18-11-2023.dump

Update Rocket Chat

If you are using the latest version for your Rocket Chat Docker container, the process is straightforward. However, if you are using a specific tagged version, the steps remain similar; just replace latest with the tag of the version you want to update to. You can find the versions here.

Note: Do not skip major versions when using tag updates.

Follow any of the following option based on your setup.

1- Update using latest

Double-check your composer.yml file to ensure that latest is used for the RELEASE.

Now run the following command to pull the latest container.

docker pull

The next steps are simple and will deploy the new version. -d is used to start the container in the background.

docker compose stop rocketchat
docker compose rm rocketchat
docker compose up -d rocketchat

2- Update using tag

Commands for tags are similar to the latest version, with the only change being to update the composer.yml file with the desired tag or version.

Suppose you are running version 6.3.5 and wish to update to the latest stable version, 6.4.6.

Update the composer file with the correct version, and then execute this command.

docker pull

And finally, stop, remove, and start the Rocket Chat instance.

docker compose stop rocketchat
docker compose rm rocketchat
docker compose up -d rocketchat

Leave a Reply

Your email address will not be published. Required fields are marked *