Rocket.Chat's Community Open Call 🎤 Jan 19th, 2022 Join us!

[HOW TO] Upgrading 4.2.x to Latest (4.3.1) - Ubuntu (Manual mode)

Backup your complete installation before proceeding! You’ve been WARNED! :slight_smile:

1. Stop MongoDB and Rocket.Chat service

sudo systemctl stop mongod
sudo systemctl stop rocketchat

2. Rename your current Rocket.Chat Folder (for backup purposes in case upgrade fails)

sudo mv /opt/Rocket.Chat /opt/Rocket.Chat_bk

From here you can follow the normal Ubuntu installation.

3. Download the latest Rocket.Chat release.

curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz
	
tar -xzf /tmp/rocket.chat.tgz -C /tmp

4. Install

cd /tmp/bundle/programs/server && npm install

5. Move new installation to /opt folder.

sudo mv /tmp/bundle /opt/Rocket.Chat

No need to add rocketchat user and group since this has been already established.

6. Change owner of the Rocket.Chat folder back to rocketchat.

sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat

7. Restart MongoDB and Rocket.Chat Services

sudo systemctl start mongod
sudo systemctl start rocketchat

Done! If everything is functioning as intended, you can delete your old Rocket.Chat backup folder.

1 Like

Thank you for this guide. I have not been successful in moving our installation to either Docker or Snap, so this guide is very helpful when staying on manual installation.

I assume the process is the same for Debian?

Edit: Just ran the the commands, and it worked fine. I do get an npm audit note, stating that ‘underscore’ should be updated. Is it safe to do so?

According to Rocket.Chat installation debian manual, step 4 would be:

(cd /tmp/bundle/programs/server; npm i)

I wouldn’t know what the ‘underscore’ is referencing. You can try it. If it breaks, redo and leave it in.