{"id":27902,"date":"2018-09-10T04:44:16","date_gmt":"2018-09-10T09:44:16","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=27902"},"modified":"2022-12-13T03:15:09","modified_gmt":"2022-12-13T09:15:09","slug":"how-to-install-rocket-chat-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-rocket-chat-on-ubuntu-16-04\/","title":{"rendered":"How to Install Rocket.Chat on Ubuntu 16.04"},"content":{"rendered":"
<\/p>\n
Rocket.Chat is a self-hosted and open source web chat server. It offers a chat, file sharing, video calls, helpdesk and voice services which makes it a great alternative to Slack. This tutorial provides step-by-step instructions for installing Rocket.Chat on an Ubuntu 16.04 VPS<\/a>.<\/p>\n Rocket.Chat comes with tons of useful features, such as: and many more…<\/p>\n The following prerequisites need to be met in order to install and run Rocket.Chat Login to your Ubuntu 16.04 VPS via SSH as user root<\/p>\n Before we start with the installation, make sure that all installed packages are updated to the latest version<\/p>\n Rocket.Chat requires a MongoDB database, so we will have to install MongoDB database server. It can be installed from the official Ubuntu repositories using the apt package manager, but it is not the latest version maintained by the MongoDB team. MongoDB has their own repositories and provides the latest version of the database server.<\/p>\n In order to install MongoDB from their official released packages, we will have to import the MongoDB public key as shown below<\/p>\n Once the key is added, we can proceed and add the official MongoDB repository<\/p>\n And finally, update the local package database and install MongoDB and its dependencies<\/p>\n You can check the version of MongoDB using the following command<\/p>\n In order to start MongoDB as a service, we will create a unit file with the following content<\/p>\n Save the file, start the MongoDB server and enable it to start upon server restart<\/p>\n Next, we will install Node.js and npm package manager on the server. Run the following command<\/p>\n We will also need to install build-essential in order to install some npm packages<\/p>\n It is recommended to use Node.js version 8.9.3 in order to run Rocket.Chat . We will install a tool simply called ‘n’ so we can change the Node.js version.<\/p>\n Run the following command to install Node.js version 8.9.3<\/p>\n Output:<\/p>\n To confirm that the installed version is 8.9.3 you can run the following command<\/p>\n Go to Rocket.Chat’s official website and download the latest stable release of the application<\/p>\n Unpack the downloaded archive<\/p>\n The content of the application will be stored in a new directory named ‘bundle’. We will rename the directory<\/p>\n Next, install all necessary packages listed in the packages.json file provided by Rocket.Chat<\/p>\n Set the environment variables accordingly and start Rocket.Chat by executing the following commands<\/p>\n If Rocket.Chat is successfully started you should get the following output<\/p>\n And you will be able to access Rocket.Chat setup wizard with your favorite web browser at http:\/\/domain.com:3000\/<\/p>\n <\/p>\n where you can create your administrative account and configure Rocket.Chat according to your needs. For more information on how to use and configure Rocket.Chat please check their official documentation.<\/p>\n Of course, you don\u2019t have to install Rocket.Chat on Ubuntu 16.04, if you use one of our Managed Ubuntu Hosting<\/a> plans, in which case you can simply ask our expert Linux admins to install Rocket.Chat on Ubuntu 16.04 for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS.<\/strong> <\/span>If you liked this post on how to install Rocket.Chat on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" Rocket.Chat is a self-hosted and open source web chat server. It offers a chat, file sharing, video calls, helpdesk and … <\/p>\n
\n– Public and private channels
\n– Live chat \/ Messaging call center \/ Audio Calls
\n– Different APIs
\n– File Upload and sharing
\n– Remote Video Monitoring
\n– Custom emojis, sounds, and company assets
\n– Android, iOS, Windows, Mac, Linux, and web applications<\/p>\nPrerequisites<\/strong><\/h3>\n
\n– It is recommended to have at least 2 GB of memory for Rocket.Chat, so we will use our SSD 2 VPS hosting plan
\n– SSH root access which comes by default with all our VPS hosting plans<\/a>
\n– Node.js –\u00a0JavaScript run-time environment
\n– MongoDB database server
\n– GraphicsMagick and curl<\/p>\nStep 1: Login via SSH and update the server<\/strong><\/h3>\n
ssh root@IP_Address<\/pre>\n
apt update && apt upgrade<\/pre>\n
Step 2: Install MongoDB database server<\/strong><\/h3>\n
apt-key adv --keyserver hkp:\/\/keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4<\/pre>\n
echo \"deb http:\/\/repo.mongodb.org\/apt\/ubuntu trusty\/mongodb-org\/4.0 multiverse\" | sudo tee \/etc\/apt\/sources.list.d\/mongodb-org-4.0.list<\/pre>\n
apt update\r\napt install -y mongodb-org curl graphicsmagick<\/pre>\n
mongo -version\r\nMongoDB shell version v4.0.1<\/pre>\n
nano \/etc\/systemd\/system\/mongodb.service\r\n\r\n[Unit]\r\nDescription=High-performance, schema-free document-oriented database\r\nAfter=network.target\r\n\r\n[Service]\r\nUser=mongodb\r\nExecStart=\/usr\/bin\/mongod --quiet --config \/etc\/mongod.conf\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/pre>\n
systemctl start mongodb\r\nsystemctl enable mongodb<\/pre>\n
Step 3: Install Node.js and npm<\/strong><\/h3>\n
apt -y install npm nodejs<\/pre>\n
apt -y install build-essential<\/pre>\n
npm install -g n<\/pre>\n
n 8.9.3<\/pre>\n
install : node-v8.9.3\r\n mkdir : \/usr\/local\/n\/versions\/node\/8.9.3\r\n fetch : https:\/\/nodejs.org\/dist\/v8.9.3\/node-v8.9.3-linux-x64.tar.gz\r\n######################################################################## 100.0%\r\n installed : v8.9.3<\/pre>\n
node --version\r\nv8.9.3<\/pre>\n
Step 4: Install Rocket.Chat<\/strong><\/h3>\n
cd \/opt\r\ncurl -L https:\/\/releases.rocket.chat\/latest\/download -o rocket.chat.tgz<\/pre>\n
tar zxvf rocket.chat.tgz<\/pre>\n
mv bundle rocketchat<\/pre>\n
cd rocketckat\/programs\/server\r\nnpm install<\/pre>\n
cd \/opt\/rocketckat\/\r\nexport ROOT_URL=http:\/\/domain.com:3000\/\r\nexport MONGO_URL=mongodb:\/\/localhost:27017\/rocketchat\r\nexport PORT=3000\r\n\r\nnode main.js<\/pre>\n
Step 5: Verify Rocket.Chat installation and finalize the installation vie web browser<\/h3>\n
\u2794 +----------------------------------------------------+\r\n\u2794 | SERVER RUNNING |\r\n\u2794 +----------------------------------------------------+\r\n\u2794 | |\r\n\u2794 | Rocket.Chat Version: 0.68.5 |\r\n\u2794 | NodeJS Version: 8.9.3 - x64 |\r\n\u2794 | Platform: linux |\r\n\u2794 | Process Port: 3000 |\r\n\u2794 | Site URL: http:\/\/domain.com:3000\/ \t\t|\r\n\u2794 | ReplicaSet OpLog: Disabled |\r\n\u2794 | Commit Hash: e412d018f8 |\r\n\u2794 | Commit Branch: HEAD |\r\n\u2794 | |\r\n\u2794 +----------------------------------------------------+<\/pre>\n
\n