How to install Rocket Chat on Ubuntu 16.04 via Snaps

How to install Rocket Chat on Ubuntu 16.04 via Snaps

To Install Rocket Chat on your server Snaps is the easiest way for you to get your server up and running on all supported Linux (Ubuntu, etc).

Snaps are secure. Rocket.Chat and all of its dependencies are isolated from the rest of your system. Snaps also auto update when we release a new version. So no need more hassle updating.

Recommended Fastest Server Install via Snaps

sudo snap install rocketchat-server

On Ubuntu 14.04LTS, install snapd first:

sudo apt-get install snapd

Rocket.Chat is installed, open your web browser and visit the server IP address on port 3000. - == http://your-server-ip:3000. ==

Rocket Chat Login Page

Install and Configure Nginx as Reverse Proxy for Rocket.Chat

we installed Rocket.Chat as standalone application. In this tutorial, we will run Rocket.Chat behind the Nginx web server.

Install Nginx with apt command:

sudo apt-get install nginx

Next, create a new virtual host for your rocket chat in the sites-available directory.

sudo nano /etc/nginx/sites-available/

Paste the server block configuration below

# Upstreams
upstream backend {  

# Redirect Options
server {  
  listen 80;
  error_log /var/log/nginx/rocketchat.access.log;
  location / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto http;
        proxy_set_header X-Nginx-Proxy true;
        proxy_redirect off;

I will run Rocket.Chat with new domain name 'chat.saleheen.xyx'. Please use your own domain name and replace it in the configuration files wherever it appears.
Activate the virtual host and test the configuration file:

sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/
sudo nginx -t

Make sure there are no error messages.

Restart the Nginx web server:

sudo systemctl restart nginx

after that visit your domain