Rocket.Chat is a JavaScript-based Web Chat Server developed with the Meteor full-stack framework, offering a private, self-hosted Slack alternative for communities, companies, or developers. This guide demonstrates how to install Rocket.Chat on a CentOS 7 server, perfect for VPS Sell's self-managed virtual private servers.
0. Preliminary Requirements:
1. Install Dependencies
1.1. Install the EPEL repository and update the system:
yum install epel-release nano -y && yum update -y
1.2. Add the MongoDB repository by creating a new file:
nano /etc/yum.repos.d/mongodb-org-4.0.repo
Paste the following content:
1.3. Install the necessary dependencies:
yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++
1.4. Install Node.js 4.8.4:
npm install -g inherits n
n 4.8.4
2. Install Rocket.Chat
2.1. Download and install Rocket.Chat:
cd /opt
curl -L https://releases.rocket.chat/stable -o rocket.chat.tgz
tar zxvf rocket.chat.tgz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
3. Create Auto-Start for Rocket.Chat
3.1. Create a systemd service file for Rocket.Chat:
nano /usr/lib/systemd/system/rocketchat.service
Add the following content:
[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: Replace server-hostname
with your server's hostname.
3.2. Enable the Rocket.Chat service:
systemctl enable rocketchat.service
4. Launch Rocket.Chat
4.1. Start the Rocket.Chat service:
systemctl start rocketchat.service
4.2. Open your browser and navigate to http://server-hostname
to register a new account.
For detailed Rocket.Chat user guides, visit the official documentation.