Sunday, November 22, 2026
TR
Linux

Updating Rocket Chat and MongoDB

Updating Rocket Chat and MongoDB

To update Rocket Chat from 4.2 to 5.4.6, the following steps must be performed in order.

sudo systemctl stop mongod

sudo systemctl stop rocketchat

sudo systemctl stop mongod

sudo apt-get install -y build-essential graphicsmagick

sudo apt autoremove

sudo n install 14.0.0

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


curl -L https://releases.rocket.chat/5.4.6/download -o /tmp/rocket.chat.tgz


tar -xzf /tmp/rocket.chat.tgz -C /tmp

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

npm uninstall node-pre-gyp --save

npm install @mapbox/node-pre-gyp --save

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

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

sudo systemctl start mongod

sudo systemctl status mongod

sudo systemctl start rocketchat

sudo systemctl status rocketchat

To update MongoDB from 4.2 to 4.4, the following steps need to be performed.

mongo

curl -fsSL https://pgp.mongodb.com/server-4.4.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg \
   --dearmor

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

sudo systemctl stop mongod


sudo apt-get update

sudo apt-get install -y mongodb-org

mongod --version

sudo apt-get upgrade

mongod --version

sudo systemctl start mongod

sudo systemctl status mongod


mongo

db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )

db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )

Kerim Koç

Systems and infrastructure engineer. I write about Linux, open source, high availability and security.