Installing Rocket.Chat Server on Ubuntu 20.04

The guide below describes how to install Rocket.Chat on Ubuntu 20.04
Feel free to read.

To begin with, we update the package repositories and the system itself.

We install the necessary packages:

The next step is to install Node.js

We can check the nodejs version by issuing the command:

We should get the result:

The next step is to install MongoDB and configure it.

We download the key to the server by issuing the command:

We add a repository to the system:

We install MongoDB

We run them in the system:

Next, you need to edit the default MongoDB configuration file and define a replica set. You can do this with the following command:

Add the following lines:

Save and close the file, and then restart the MongoDB service, to apply the configuration:

Then log into the MongoDB shell and enable the replica with the following command:

The log should look like this:

We can exit MongoDB shell with the following command:

Installation Rocket.Chat

We add a user to the system and give him the appropriate group by issuing the following commands:

We will acquire the rights to the rocket directory:

Log in to the rocket user and download rocket.chat files:

We unpack the downloaded files and transfer them:

We go to the script directory and install it:

Once all dependencies are installed, you can exit the Rocket.Chat user with the following command:

We create a service file to run on system startup

The content:

Remember to change the ROOT_URL = http value://rocket.yourdomain.com on your domain name!

We're reloading the daemon and starting the service:

The service start status can be checked by executing the command:

It should look like this:

We configure the Nginx vhost to work with rocket.chat

We create a new vhost file :

The content:

Remember to change a few values:

server 127.0.0.1:3000; – 127.0.0.1 we replace the ip of our server.

server_name rocket.yourdomain.com; – rocket.yourdomain.com is replaced with our domain address.

We create a symbolic link to activate vhost:

The next step is to check if the vhost was created correctly:

And the result:

If everything is ok, restart Nginx

Now the Rocket.chat installation process should start under our domain or server IP

Enter an administrator name, address e-mail, password and click Continue. You should see the following page:

We fill in at our discretion.

The next step is to select the language and server type

We accept license:

That's all our rocket.chat is already installed and available under our domain!

How useful this post was?

Click on the star, to evaluate it!

Average grade / 5. number of votes:

So far, no votes! Be the first to rate this post.