
Rocket.Chat is a Web Chat Server, developed in JavaScript, using the Meteor fullstack framework as a Slack alternative
It is a great solution for communities and companies wanting to privately host their own chat service or for developers looking forward to building and evolve their own chat platforms.
The tutorial was prepared with our "CentOS 7" template and is meant to work on our self-managed virtual private servers.
0. Preliminary requirements:
"CentOS 7" template installed on the server;
Removed Apache (yum remove httpd -y).
1. Installation of dependencies
The first thing we need to do is to install epel repository. For this enter command:
yum install epel-release nano -y && yum update -y
Now we need to add MongoDB repository. Create new file "mongodb.repo" and paste repository info in it:
nano /etc/yum.repos.d/mongodb-org-4.00.re
We are now ready to install all the necessary dependencies:
yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++
npm install -g inherits n
n 4.8.4
2. Rocket.Chat installation
The following commands will download and install the latest Rocket.Chat instance:
cd /opt
curl -L https://releases.rocket.chat/stable -o rocket.chat.tar
tar zxvf rocket.chat.tgz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
3. Creating auto start
We don't want for server restart to intervene with our Rocket.Chat accessibility. For that we have to enable Rocket.Chat auto start. Just create service file:
nano /usr/lib/systemd/system/rocketchat.service
With a text:
[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
[Service]
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=root
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://server-hostname/ PORT=80
[Install]
WantedBy=multi-user.target
NOTE: do not forget to change server-hostname with your server hostname.
And enable this service by running:
systemctl enable rocketchat.service
4. Launching Rocket.Chat
We are finally ready to launch our Rocket:
systemctl start rocketchat.service
Open http://server-hostname with your favorite browser and register a new account:

For Rocket.Chat user guides please visit - https://rocket.chat/docs/user-guides/