0% found this document useful (0 votes)
962 views

RocketChat Upgrade Steps

The document summarizes the steps to upgrade RocketChat to a newer version. It involves stopping the existing RocketChat services, backing up the existing installation and MongoDB database, downloading and extracting the new RocketChat version, installing dependencies, moving the new files into place, configuring MongoDB replication and the RocketChat systemd service, and restarting the RocketChat services. It also provides an example Nginx load balancer configuration for a multi-instance RocketChat deployment.

Uploaded by

girmiti its
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
962 views

RocketChat Upgrade Steps

The document summarizes the steps to upgrade RocketChat to a newer version. It involves stopping the existing RocketChat services, backing up the existing installation and MongoDB database, downloading and extracting the new RocketChat version, installing dependencies, moving the new files into place, configuring MongoDB replication and the RocketChat systemd service, and restarting the RocketChat services. It also provides an example Nginx load balancer configuration for a multi-instance RocketChat deployment.

Uploaded by

girmiti its
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

####RocketChat Upgrade

1. Stop the existing RocketChat.

systemctl stop rocketchat


systemctl stop rocketchat1
systemctl stop rocketchat2
systemctl stop rocketchat3

1. Move the existing /opt/Rocket.Chat to /opt/Rocket.Chat.backup


2. Backup the Mongo database
mkdir /root/chatdb
mongodump -d rocketchat -o /root/chatdb/

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


4. cd /tmp; tar -zxvhf /tmp/rocket.chat.tgz
5. cd /tmp/bundle/programs/server && npm install
If npm install gives error note that below command will come handy
cd /tmp/bundle/programs/server && npm audit fix
cd /tmp/bundle/programs/server && npm install -g npm --> To Upgrade npm
cd /tmp/bundle/programs/server && npm install meteor
cd /tmp/bundle/programs/server && npm install --unsafe-perm
6. cd /tmp
sudo mv /tmp/bundle /opt/Rocket.Chat
sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat
7. In the root prompt
MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
8. Enabled Opslog in mongodb, as it requires for multi instance setup of RocketChat
App

vi /etc/mongod.conf
replication:
replSetName: rs01

sudo systemctl enable mongod && sudo systemctl start mongod


mongo --eval "printjson(rs.initiate())"

9. Edit the RocketChat systemd service file

Vi /usr/lib/systemd/system/rocketchat.service --> Comment out below Environment


and Add as shown below.

#Environment=INSTANCE_IP=192.168.0.11
MONGO_URL=mongodb://localhost:27017/rocketchat
ROOT_URL=http://chat.girmitisoftware.com:3000/ PORT=3000
Environment=INSTANCE_IP=192.168.0.11
MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
ROOT_URL=http://chat.girmitisoftware.com:3000/ PORT=3000

10. start the RocketChat


systemctl start rocketchat --> At first time it upgrade the RocketChat db and
Opslog DB
systemctl start rocketchat1 --> At first time it update RocketChat DB and OpsLog DB
systemctl start rocketchat2 --> At first time it update RocketChat DB and OpsLog DB

11. Just of Records -- here is nginx lb configurations for rocketchat


[root@chat ~]# cat /etc/nginx/nginx.conf | grep -v '#'
user nginx;
worker_processes auto;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
multi_accept on;
use epoll;
}

http {

client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 32m;
large_client_header_buffers 2 1k;

sendfile on;
tcp_nopush on;

keepalive_timeout 30;
keepalive_requests 100000;

send_timeout 120;

gzip on;

reset_timedout_connection on;

tcp_nodelay on;

types_hash_max_size 2048;

upstream open.rocket.chat.backend {
server 192.168.0.11:5000 weight=1;
server 192.168.0.11:4000 weight=1;
server 192.168.0.11:3000 weight=1;
}

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name chat.girmitisoftware.com;
root /opt/Rocket.Chat/programs/web.browser/app/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_set_header Host $host:$server_port;
proxy_set_header Referer $http_referer;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
location / {
proxy_pass http://open.rocket.chat.backend;
}
}
}
--------------------------------------------------------------------

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy