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. ==
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/chat.saleheen.xyz
Paste the server block configuration below
# Upstreams
upstream backend {
server 127.0.0.1:3000;
}
# Redirect Options
server {
listen 80;
server_name chat.saleheen.xyz;
error_log /var/log/nginx/rocketchat.access.log;
location / {
proxy_pass http://45.76.14.235:3000/;
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 chat.saleheen.xyz virtual host and test the configuration file:
sudo ln -s /etc/nginx/sites-available/chat.saleheen.xyz /etc/nginx/sites-enabled/chat.saleheen.xyz
sudo nginx -t
Make sure there are no error messages.
Restart the Nginx web server:
sudo systemctl restart nginx
after that visit your domain