X

How To Install Rocket.Chat On Ubuntu 18.04 TLS

Rocket.Chat is an open source communication software. This software provide your local company communication. So I provide installation guide for Ubuntu 18.04. After the complete installation process, then follow the setup ssl free, let’s encrypt using nginx.

How To Setup Rocket Chat SSL Configuration Using Letsencrypt For Nginx
Send Mail Notification From Zabbix Server Using Gmail
  • Server IP address : 10.66.30.10
  • Server OS : Ubuntu 18.04 LTS
  • RAM : 2 GB
  • Disk : 50 GB
  • vCPU : 2
  • CPU op-mode(s) : 64-bit

Step #01: Must be your server latest update installed.

root@Rocket-Chat:~# vi /etc/resolv.conf
root@Rocket-Chat:~# apt -y update
root@Rocket-Chat:~# apt upgrade
root@Rocket-Chat:~# reboot

Step #02: Install Mongodb database server for install Rocket Chat.

root@Rocket-Chat:~# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
root@Rocket-Chat:~# echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
root@Rocket-Chat:~# sudo apt-get -y update && sudo apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
root@Rocket-Chat:~# sudo apt-get install -y build-essential mongodb-org nodejs graphicsmagick
root@Rocket-Chat:~# apt-get install node-which node-underscore node-tar node-slide node-sha node-semver node-rimraf node-retry node-request node-read-package-json node-read node-osenv node-once node-npmlog node-nopt node-gyp node-mkdirp node-minimatch node-lru-cache node-lockfile node-ini node-inherits node-graceful-fs node-glob node-github-url-from-git node-fstream-ignore node-fstream node-block-stream node-archy node-ansi-color-table node-ansi node-abbrev nodejs -y

Step #03: Download Rocket Chat latest version and install this.

root@Rocket-Chat:~# curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
root@Rocket-Chat:~# apt install nodejs -y
root@Rocket-Chat:~# curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz
root@Rocket-Chat:~# tar -xzf /tmp/rocket.chat.tgz -C /tmp
root@Rocket-Chat:~# cd /tmp/bundle/programs/server && npm install
root@Rocket-Chat:/tmp# cd
root@Rocket-Chat:~# mv /tmp/bundle /opt/Rocket.Chat
root@Rocket-Chat:~# sudo useradd -M rocketchat && sudo usermod -L rocketchat
root@Rocket-Chat:~# sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat
root@Rocket-Chat:~# vi /lib/systemd/system/rocketchat.service

Then insert below all lines into service file.

[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=rocketchat
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:3000/ PORT=3000
[Install]
WantedBy=multi-user.target

Step #04: Setup  Mongodb url and port for install Rocket Chat.

root@Rocket-Chat:~# MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
root@Rocket-Chat:~# MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
root@Rocket-Chat:~# ROOT_URL=http://10.66.30.10:3000
root@Rocket-Chat:~# PORT=3000
root@Rocket-Chat:~# sudo sed -i "s/^#  engine:/  engine: mmapv1/"  /etc/mongod.conf
root@Rocket-Chat:~# sudo sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf
root@Rocket-Chat:~# sudo systemctl enable mongod && sudo systemctl start mongod
root@Rocket-Chat:~# mongo --eval "printjson(rs.initiate())"
root@Rocket-Chat:~# sudo systemctl enable rocketchat && sudo systemctl start rocketchat
root@Rocket-Chat:~# systemctl status rocketchat

Now browse your server IP address and port like as below.

http://10.66.30.10:3000

Step #05: Create admin account for using Rocket Chat.

Example like as :

NAME : admin

USERNAME : admin

ORGANITAZATION EMAIL : admin@technologyrss.com

PASSWORD : ********

Then click Continue button.

Step #06: Now edit your organization info for Rocket Chat.

Example like as :

ORGANIZATION TYPE : Community << Select any one

ORGANIZATION NAME : Technologyrss << Type your company name

INDUSTRY : Telecom  << Select any one

COUNTRY :  Bangladesh << Select your country

WEBSITE : https://technologyrss.com << Type your web site name

Then click Continue button.

Step #07: Type server info for install Rocket Chat.

Step #08: Select your server type keep standalone for Rocket Chat.

Then click Continue button.

Step #09: Your workspace is ready to use.

See view log file your system status like as below: 👉 http://10.66.30.10:3000/admin/view-logs

I20190614-15:05:23.673(0) ➔ System ➔ startup 
I20190614-15:05:23.674(0) ➔ +-----------------------------------------------+ 
I20190614-15:05:23.674(0) ➔ |                 SERVER RUNNING                | 
I20190614-15:05:23.674(0) ➔ +-----------------------------------------------+ 
I20190614-15:05:23.674(0) ➔ |                                               | 
I20190614-15:05:23.674(0) ➔ |  Rocket.Chat Version: 1.1.1                   | 
I20190614-15:05:23.675(0) ➔ |       NodeJS Version: 8.11.4 - x64            | 
I20190614-15:05:23.675(0) ➔ |      MongoDB Version: 4.0.10                  | 
I20190614-15:05:23.675(0) ➔ |       MongoDB Engine: mmapv1                  | 
I20190614-15:05:23.675(0) ➔ |             Platform: linux                   | 
I20190614-15:05:23.675(0) ➔ |         Process Port: 3000                    | 
I20190614-15:05:23.675(0) ➔ |             Site URL: http://localhost:3000/  | 
I20190614-15:05:23.675(0) ➔ |     ReplicaSet OpLog: Enabled                 | 
I20190614-15:05:23.675(0) ➔ |          Commit Hash: 80341ed12f              | 
I20190614-15:05:23.676(0) ➔ |        Commit Branch: HEAD                    | 
I20190614-15:05:23.676(0) ➔ |                                               | 
I20190614-15:05:23.676(0) ➔ +-----------------------------------------------+ 

Next step for 👉 install free ssl let’s encrypt using nginx

👉 How To Install Rocket Chat Server Using Script on Ubuntu 20.04

You can see more using my YouTube channel. Don’t forget  subscribe for get update. Please subscribe my channel for more update.

 

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.

View Comments (2)

Leave a Comment