×
Community Blog How to Install Rocket Chat on Alibaba Cloud ECS

How to Install Rocket Chat on Alibaba Cloud ECS

In this tutorial, we will be installing Rocket Chat on an Alibaba Cloud Elastic Compute Service (ECS) with Ubuntu 16.04 installed.

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.

Prerequisites

  • 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.

# sudo apt update && sudo apt upgrade

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.

# sudo apt-get install snapd

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.

# sudo snap install rocketchat-server

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

# sudo service snap.rocketchat-server.rocketchat-server status

1

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.

2

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: https://www.alibabacloud.com/help/doc-detail/25471.htm

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.

# sudo apt-get install -y nginx

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

# sudo systemctl start nginx
# sudo systemctl enable nginx

Install Node.js:

To install Node.js, execute the command below.

# sudo apt-get install nodejs

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.

# sudo nano /etc/nginx/conf.d/rocket.conf

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

server {
  listen 80;
  listen [::]:80;

  server_name softpedia.xyz;

  location / {
      proxy_pass http://localhost:3000/;
  }
}

Restart nginx server using the command below.

# sudo systemctl restart nginx

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.

3

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.

# sudo apt-get install software-properties-common -y 

Install SSL Certificate:

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

Update your system by executing command below.

# sudo apt-get update

Add certbot repository using PPA by executing command below.

# sudo add-apt-repository ppa:certbot/certbot

Update your system by executing command below.

# sudo apt-get update

Install python-certbot-nginx using the command below.

# sudo apt-get install python-certbot-nginx

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

# sudo certbot --nginx -d softpedia.xyz

Restart nginx server using the command below.

# sudo systemctl restart nginx

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.

4

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

5

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

6

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

7

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

8

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

9

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

0 0 0
Share on

Alibaba Clouder

2,599 posts | 762 followers

You may also like

Comments

Alibaba Clouder

2,599 posts | 762 followers

Related Products