Code in this video_How to Install and Configure RocketChat Server on Debian

Code in this video_How to Install and Configure RocketChat Server on Debian 11/10

Note: Replace the highlighted information with your own details.

📌 Check for the compatible versions of MongoDB and Node.js 👉 https://github.com/RocketChat/Rocket.Chat/releases

	sudo apt install -y curl wget tar ufw net-tools build-essential graphicsmagick -y

	wget -O /tmp/rocket.chat.tgz https://releases.rocket.chat/latest/download

	sudo useradd -M rocketchat && sudo usermod -L rocketchat

	sudo vim /lib/systemd/system/rocketchat.service

[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service
[Service]
ExecStart=PATH_of_Node.js /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat
Environment=ROOT_URL=http://IP_of_Server:3000
Environment=PORT=3000
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
Environment=MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
[Install]
WantedBy=multi-user.target

	wiredTiger

	replSetName: rs01
	
	mongosh --eval "printjson(rs.initiate())"

Leave a Reply

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