How to Install Rocket.Chat on CentOS 7

Updated on September 13, 2016
How to Install Rocket.Chat on CentOS 7 header image

Rocket.Chat is an open source Slack-like team communication solution which can be deployed on your own server. With Rocket.Chat, you can chat with your team members and friends over audio and video, interact with website visitors in real time, share files, transmit voice messages, and do many more.

In this tutorial, I will explain how to install Rocket.Chat on a CentOS 7 server.


  • A fresh Vultr CentOS 7 server instance with at least 1G of memory. Say its IP address is
  • A domain pointing to your server instance. Say it is

Step 1: Update the system

Log in as root, and then update the system to the latest stable status:

yum install epel-release -y
yum update -y
shutdown -r now

Step 2: Install MongoDB

Setup the MongoDB YUM repo:

vi /etc/yum.repos.d/mongodb-org-3.2.repo

Populate the file with:

name=MongoDB Repository

Save and quit:


Install the latest stable version of MongoDB:

yum install mongodb-org mongodb-org-server -y

Step 3: Install Node.js, GraphicsMagick, npm and other dependencies

yum install nodejs curl GraphicsMagick npm -y
npm install -g inherits n
n 0.10.40

Step 4: Install Rocket.Chat

Download and install Rocket.Chat:

cd /opt
curl -L -o
tar -zxvf
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install

For your convenience, you need to create the RocketChat systemd service unit. Make sure to replace the domain "" with your own one.

vi /usr/lib/systemd/system/rocketchat.service

Populate the file with:

Description=The Rocket.Chat server
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL= PORT=3000

Save and quit:



  1. In ROOT_URL and PORT, You can replace 3000 with the port number of your choosing.
  2. In ROOT_URL, you can replace with your server's IP address, if your domain is not available.

Start the MongoDB service:

systemctl start mongod.service
systemctl enable mongod.service

Start the Rocket.Chat service:

systemctl start rocketchat.service
systemctl enable rocketchat.service

Allow web access from port 3000:

firewall-cmd --zone=public --permanent --add-port=3000/tcp
firewall-cmd --reload

Step 5: Access Rocket.Chat in the web browser

Point your web browser to, and then register the first user for administration. By default, only the first user will get administrative privileges. Enjoy it!

That concludes this tutorial. Thank you for reading.