Upgrading to 3.0.0

What is the recommended method of upgrading to 3.0.0? I’m running 2.4.7 on a DigitalOcean pre-made droplet (which features Ubuntu 18.04 LTS) and I’m a little discouraged that “rocketchatctrl update” breaks the installation. Until I’ve tried it, I was convinced that it was a tested and safe method of upgrading, but it broke the Rocket Chat server by upgrading it while leaving nodejs at version 8…, while it requires nodejs 12…

Manually installing nodejs v. 12 from a repo described in the Rocket.Chat manual for Ubuntu installation doesn’t solve the problem, because nodejs from this repo gets installed in /usr/bin/node, while RocketChat expects it in /usr/local/bin/node.

So… how did you manage to upgrade to 3.0.0?

It seems you won’t. This “issue” will be ignored, at least seems so this far.

I’ve got the same problem. I installed Rocket.Chat using the provided DigitalOcean droplet and upgraded which broke the installation as it required nodejs V12. I actually wiped the install and tried again because I assumed it was user error. (The first time round, I upgraded before going through the setup wizard, so thought that might be the problem)

It really isn’t a good look when you first install something and it breaks straight away.

In case anyone needs this:

How to upgrade the DigitalOcean Rocket.Chat droplet to 3.0.2

  1. Install the droplet as usual (if you’re already using it, that’s ok too).

  2. Upgrade the update tool:
    sudo rocketchatctl upgrade-rocketchatctl

  3. Upgrade Rocket.Chat:
    sudo rocketchatctl update

  4. The server is broken, doesn’t start, because it requires Nodejs 12.x
    Install it:
    sudo apt-get -y update && sudo apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
    sudo apt-get install -y nodejs

  5. Change the path to new nodejs in the service config:
    sudo nano /lib/systemd/system/rocketchat.service
    In the line beginning with “ExecStart=” replace “/usr/local/bin/node” with “/usr/bin/node”

  6. Reload the service and start the server:
    sudo systemctl daemon-reload
    sudo systemctl restart rocketchat.service

  7. Check that it’s running:
    sudo systemctl status rocketchat.service

Many thanks for this!

Step 4: Slightly different for me:

sudo apt-get -y update && sudo apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_12.x | sudo bash setup_12.x
sudo apt-get install -y nodejs

Step 5: Change was already made.

OMG thank you SO MUCH for posting your instructions! I was running 2.4.9 on DigitalOcean using their current 1-click droplet install, but clobbered my installation after doing the basic sudo rocketchatctl update. But your instructions allowed me to get everything updated. Though Step 5 was already done for me as well.

I get this issue when running step 3

root@rocketchat-ubuntu-s-1vcpu-3gb-nyc1-01:~# sudo rocketchatctl update

Updates could be risky, you can use the backup option # rocketchatctl backup, to create a backup of the rocketchat database first. Please check that you have en ough space in your system to store the backup.
/usr/local/bin/rocketchatctl: line 897: [: 3.0.5: unary operator expected
Could not determine if updates available for RocketChat server.

Different issue now, failed to start.

Thank you so much!! This worked for me :slight_smile: