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 much more.
Log in as root and update the system to the latest stable status:
apt update apt upgrade -y shutdown -r now
Install the latest stable version of MongoDB:
apt install mongodb
Rocket.Chat 0.60 and higher needs version 8.9.3 LTS of Node.js to work. So first add the NodeSource Debian binary distributions repository:
curl -sL https://deb.nodesource.com/setup_8.x | bash -
Then we can install Node.js and other packages:
apt install nodejs curl graphicsmagick -y npm install -g n
n to install Node.js version 8.9.3:
Download and install Rocket.Chat:
cd /opt curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz tar -zxvf rocket.chat.tgz mv bundle Rocket.Chat cd Rocket.Chat/programs/server npm install
For your convenience, you need to create the RocketChat systemd service unit:
Populate the file. Make sure to replace the domain
www.example.com with your own:
[Unit] Description=RocketChat Server After=network.target remote-fs.target nss-lookup.target mongod.target nginx.target # Remove or Replace nginx with your proxy [Service] ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js # Specify the location of node and location of main.js Restart=always # If set to always, the service will be restarted regardless of whether it exited cleanly or not, got terminated abnormally by a signal, or hit a timeout. RestartSec=10 # Restart service after 10 seconds if node service crashes StandardOutput=syslog # Output to syslog StandardError=syslog # Output to syslog SyslogIdentifier=nodejs-example #User=<alternate user> #Group=<alternate group> Environment=NODE_ENV=production PORT=3000 ROOT_URL=https://www.example.com MONGO_URL=mongodb://localhost:27017/rocketchat [Install] WantedBy=multi-user.target
PORT, you can replace
3000 with the port number of your choosing. In
ROOT_URL, you can replace
www.example.com with your server's IP address
192.168.100.100, if your domain is not available.
Save and quit, CTRL + X, Y.
Start the MongoDB service:
systemctl start mongodb
Start the Rocket.Chat service:
systemctl start rocketchat
Point your web browser to
http://www.example.com:3000, and then register the first user for administration. By default, only the first user will get administrative privileges.