Installing RocketChat on linux

Giteqa

Introduction

In this article, we will look at how to install RocketChat in linux?
This guide is suitable for those who are looking for an alternative way to communicate with colleagues or friends.

RocketChat is an analogue of slack, but RocketChat is completely free and working with it is very simple. The interface is clear and user-friendly.

Next, there will be instructions on how to create your own RocketChat server to which users can connect.

Commands used
  • apt update && apt upgrade -y
  • apt install nginx gnupg2 git unzip build-essential software-properties-common graphicsmagick
  • curl -sL https://deb.nodesource.com/setup_12.x | bash -
  • apt install nodejs
  • apt install nginx
  • systemctl stop nginx.service
  • systemctl start nginx.service
  • systemctl enable nginx.service
  • ufw allow in "Nginx Full"
  • apt install snapd
  • snap install rocketchat-server
  • systemctl status snap.rocketchat-server.rocketchat-server.service
  • snap set rocketchat-server caddy-url=http://your-domain-name
  • snap set rocketchat-server caddy=enable
  • systemctl restart snap.rocketchat-server.rocketchat-server.service
  • systemctl restart snap.rocketchat-server.rocketchat-caddy.service

Server Preparation

First, you and I will need to prepare the server for this, check for updates and install them with the following command:

apt update && apt upgrade -y

When the update has been installed we will need to download the Nginx web server
We do this with the following command

apt install nginx gnupg2 git unzip build-essential software-properties-common graphicsmagick

When the web server has been downloaded, we start downloading the Node software platform.js
You can download it with the following command

curl -sL https://deb.nodesource.com/setup_12.x | bash -

After everything is downloaded, we start the installation by entering the following commands

Installing NodeJS - apt install nodejs
Installing Nginx - apt install nginx

After everything is established (It will take up to a minute of time) we will need to perform some manipulations with the web server.

Stopping the web server - systemctl stop nginx.service
Starting the web server - systemctl start nginx.service
Enabling startup at system startup- systemctl enable nginx.service

Thanks to these actions, we restarted the web server and made it load automatically when the system starts.

Now we need to configure the firewall.
Enable the connection to the web server with the following command:

ufw allow in "Nginx Full"

Without a web server, there will be no place to connect after installing RocketChat

Installing RocketChat

Our server is prepared, it remains only to download the application itself that we are going to use. You can download and install it manually, but why complicate your life? We use Snap packages. First, install these packages with the following command:

apt install snapd

After the installation has been completed, we start the installation of RocketChat Server.

snap install rocketchat-server

We wait for the installation to finish and check if everything works using the following command:

systemctl status snap.rocketchat-server.rocketchat-server.service

Here we can see information about the operation of the RocketChat server.

In the photo you can see that it is active, which means we did everything right.

Enter the command above in a few minutes and the information will appear

In this information you can find the login details of the Site URL

Using the following command, we change the Site URL to our host or the IP address of the server.

snap set rocketchat-server caddy-url=http://your-domain-name

Now enable redirection using the command:

snap set rocketchat-server caddy=enable

It remains only to restart RocketChat Server using the following commands

systemctl restart snap.rocketchat-server.rocketchat-server.service
systemctl restart snap.rocketchat-server.rocketchat-caddy.service

The installation of the RocketChat Server is completed and you can go to the address you specified to get access.

If you are interested in what you need to do next or you did not understand some point, then watch the following video

This video is exactly the same installation and configuration instructions, but it is more advanced so that you can see the functionality of RocketChat.