How to Install Rocket.Chat on CentOS 7

Using a Different System?

  • How to Install Rocket.Chat on Debian 9

Are we missing a guide for your target system? Request one, or submit your own!

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 -yyum update -yshutdown -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:

[mongodb-org-3.2]name=MongoDB Repositorybaseurl=$releasever/mongodb-org/3.2/x86_64/gpgcheck=1enabled=1gpgkey=

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 -ynpm install -g inherits nn 0.10.40

Step 4: Install Rocket.Chat

Download and install Rocket.Chat:

cd /optcurl -L -o -zxvf bundle Rocket.Chatcd Rocket.Chat/programs/servernpm 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:

[Unit]Description=The Rocket.Chat[Service]ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.jsStandardOutput=syslogStandardError=syslogSyslogIdentifier=rocketchatUser=rootEnvironment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL= PORT=3000[Install]

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.servicesystemctl enable mongod.service

Start the Rocket.Chat service:

systemctl start rocketchat.servicesystemctl enable rocketchat.service

Allow web access from port 3000:

firewall-cmd --zone=public --permanent --add-port=3000/tcpfirewall-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.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.