Installing Rocket.Chat on Ubuntu Server

Rocket.Chat is an open-source communication and collaboration platform. It is built on top of Meteor, a popular web application framework. This tutorial will guide you through the installation process of Rocket.Chat on Ubuntu Server.

Prerequisites

Before you proceed with the installation, make sure your server meets the following requirements:

Steps

1. Update the packages

Start by updating the system packages to the latest version.

sudo apt update
sudo apt upgrade

2. Install the required packages

Rocket.Chat requires the following software to be installed on the server:

You can install both packages using the default Ubuntu repositories.

sudo apt install nodejs mongodb

3. Create a MongoDB user and database

Rocket.Chat needs a MongoDB database and a dedicated user to access it. Create a new MongoDB user with the following command:

mongo
use rocketchat
db.createUser(
   {
     user: "rocketchatuser",
     pwd: "rocketchatpassword",
     roles: [ "readWrite" ]
   }
)
exit

Remember to replace rocketchatuser and rocketchatpassword with your preferred values.

4. Install Rocket.Chat

Now we can finally install Rocket.Chat. You can download the latest version of Rocket.Chat from their official website:

curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tgz

Extract the contents of the downloaded file and move them to the /opt directory:

tar zxf rocket.chat.tgz
sudo mv rocket.chat /opt/Rocket.Chat

Create a new file named .env inside the /opt/Rocket.Chat directory, and add the following contents:

MONGO_URL=mongodb://rocketchatuser:rocketchatpassword@localhost:27017/rocketchat?authSource=rocketchat
PORT=3000
ROOT_URL=http://localhost:3000

This file contains the configuration options for Rocket.Chat.

Run the following command to start the Rocket.Chat server:

cd /opt/Rocket.Chat
sudo node main.js

You should see the following output:

=> Starting Rocket.Chat server

....
....
=> Rocket.Chat server is listening on port 3000

5. Access Rocket.Chat

Rocket.Chat should now be running on your server. You can access it by opening your web browser and navigating to http://your-ip-address:3000.

Congratulations, you have successfully installed Rocket.Chat on your Ubuntu Server!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!