How to Install Rocket Chat on Alibaba Cloud ECS

By Arslan Ud Din Shafiq, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

Rocket Chat is an open source software that allows you to collaborate and communicate with your team via video and audio calls. It helps you to increase productivity by sharing and discussing projects and ideas and by sharing files with your team.

In this tutorial, I will be installing and setting up Rocket Chat on Alibaba Cloud Elastic Compute Service (ECS) with Ubuntu 16.04 installed.


  • You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get $300 — $1200 worth in Alibaba Cloud credits for your new account. If you don’t k about how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  • A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  • Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  • Access to VNC console in your Alibaba Cloud or SSH client installed in your PC
  • Set up your server’s hostname and create user with root privileges.

Setting Up Your Server

Before proceeding with installation of any kind of package, use the following command to update your Ubuntu system. To execute this command, remember to login from non-root user with sudo privileges.

To install Rocket Chat, you will need to use snap, a containerized software package that can be installed on any Linux operating system. Snapd is a service which runs and manages the snap. To install snapd, you will need to execute the following command.

Install Rocket Chat:

Snaps are an easy, secure and best way to install and manage apps, hence, you will use Snap to install Rocket Chat. To install Rocket Chat, execute the following command.

Rocket Chat service will start automatically after installation. To check the status of Rocket Chat, you can execute the following command.

You can access Rocket Chat server via domain name or Alibaba Cloud ECS IP address by concatenating port 3000 in the end of URL. You will see the following screen but before making any settings at this stage, I will recommend to perform all the steps in the following sections including reverse proxy and then access Rocket Chat without concatenating port and do settings for Rocket Chat.

Set Up Firewalls and Ports

If you have activated firewalls, you will have to define a rule in Alibaba Cloud security group for your cloud server to add exception for port 80/tcp and 443/tcp. You can enable these ports while creating ECS instance, but in case if you have forgotten to unblock these ports, you can follow the procedure in this guide:

Install Nginx:

As you will need to access Rocket Chat via http://localhost:3000, hence, you will need to setup a reverse proxy. To setup reverse proxy, you will need to install Nginx server. To install Nginx server, execute the command below.

Start and enable nginx server so that on system reboot, it can start automatically. To do so, execute the commands below.

Install Node.js:

To install Node.js, execute the command below.

Setup Reverse Proxy:

In this step, you will setup reverse proxy to access Rocket Chat so that you can access it via domain name without using any port in the end of address. To do so, execute the following command to create a nginx configuration file using nano editor.

Add the following text in the opened file and save it.

Restart nginx server using the command below.

You can access your Rocket Chat via your Alibaba Cloud ECS IP address or domain name pointed to IP address without using port 3000. After accessing, you will be redirected to setup Rocket Chat. If you want to setup SSL certificate, I will recommend to go to next section and install SSL certificate and then setup Rocket Chat.

Install Software-Properties-Common:

Software-properties-common package is required to get the supported files for installation of SSL. In order to install software-properties-common package, follow the steps below.

To install software-properties-common execute the command.

Install SSL Certificate:

To install SSL certificate using Encrypt SSL, follow the steps below.

Update your system by executing command below.

Add certbot repository using PPA by executing command below.

Update your system by executing command below.

Install python-certbot-nginx using the command below.

Issue SSL certificate to your domain by executing the command below.

Restart nginx server using the command below.

Configuring Rocket Chat

Access Rocket Chat using your domain name or Alibaba Cloud ECS IP address and start making settings. On accessing URL, you will see the following screen. Fill the form for administrator account and hit Continue.

After clicking Continue, you will be asked to provide organization’s information.

After clicking Continue, you will be asked to provide server information.

After clicking Continue, you will be asked to register server as shown below.

You will be redirected to the following page after hitting Continue.

Click “Go to your workspace”, you will be redirected to dashboard of Rocket Chat.

You have successfully installed and configured Rocket Chat on your ECS instance.

Original Source

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.