How to Install Rocket Chat on Alibaba Cloud ECS

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
# 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
# sudo service snap.rocketchat-server.rocketchat-server status

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
# 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
server {
listen 80;
listen [::]:80;
server_name softpedia.xyz; location / {
proxy_pass http://localhost:3000/;
}
}
# sudo systemctl restart nginx

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.

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

Install SSL Certificate:

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

# sudo apt-get update
# sudo add-apt-repository ppa:certbot/certbot
# sudo apt-get update
# sudo apt-get install python-certbot-nginx
# sudo certbot --nginx -d softpedia.xyz
# 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.

Original Source

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com