slug | title | description | authors | contributors | published | modified | keywords | tags | license | external_resources | aliases | deprecated | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
installing-rocketchat-ubuntu-16-04 |
Installing Rocket.Chat on Ubuntu 16.04 |
Installation and basic usage guide for Rocket.Chat, a lightweight XMPP server on Ubuntu 16.04. |
|
|
2018-06-21 |
2018-08-17 |
|
|
[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0) |
|
|
true |
Rocket.Chat is an open source chat software alternative to Slack that ships with the feature rich components users have come to expect for team productivity. Chat with team members, make video and audio calls with screen sharing, create channels and private groups, upload files and more. With Rocket.Chat's source code hosted on GitHub, you can develop new features and contribute back to the project.
This guide provides the steps to deploy Rocket.Chat on a Linode running Ubuntu 16.04 LTS, using NGINX as a reverse proxy with SSL.
-
If you have not already done so, create a Linode account and Compute Instance. See our Getting Started with Linode and Creating a Compute Instance guides.
-
Follow our Setting Up and Securing a Compute Instance guide to update your system. You may also wish to set the timezone, configure your hostname, create a limited user account, and harden SSH access.
-
Complete the Add DNS Records steps to register a domain name that will point to your Rocket.Chat server instance.
The quickest way to install Rocket.Chat is to use its Snap. Snaps are containerized software packages that run on all major Linux systems. Snapd is the service that runs and manages snaps. Snapd is installed by default on Ubuntu 16.04 LTS.
-
Install Rocket.Chat
sudo snap install rocketchat-server
-
Once installed, the Rocket.Chat service starts automatically. To check if Rocket.Chat is running:
sudo service snap.rocketchat-server.rocketchat-server status
Visit the Rocket.Chat snaps documentation to view a list of other useful commands.
A reverse proxy is a server that sits between internal applications and external clients, forwarding client requests to the appropriate server. While many common applications are able to function as servers on their own, NGINX has a number of advanced load balancing, security, and acceleration features that most specialized applications lack. Using NGINX as a reverse proxy enables you to add these features to any application. We will use NGINX as a reverse proxy for Rocket.Chat.
-
Download NGINX from the package manager:
sudo apt install nginx
-
Ensure NGINX is running and enabled to start automatically on reboot:
sudo systemctl start nginx sudo systemctl enable nginx
-
Disable the default Welcome to NGINX page. The default page is configured within
/etc/nginx/sites-enabled/default
. This is actually a link to a file within/etc/nginx/sites-available/
:sudo ls -l /etc/nginx/sites-enabled
{{< output >}} total 0 lrwxrwxrwx 1 root root 34 Aug 16 14:59 default -> /etc/nginx/sites-available/default {{< /output >}}
-
Remove this link to disable the default site:
sudo rm /etc/nginx/sites-enabled/default
-
Create
/etc/nginx/sites-available/rocketchat.conf
and add the necessary values to point to your domain name and to add the reverse proxy. Replaceexample.com
with your domain name:{{< file "/etc/nginx/conf.d/rocketchat.conf" nginx >}} server { listen 80;
server_name example.com;
location / { proxy_pass http://localhost:3000/; } } {{< /file >}}
-
Enable the new configuration by creating a link to it from
/etc/nginx/sites-available/
:sudo ln -s /etc/nginx/sites-available/rocketchat.conf /etc/nginx/sites-enabled/
-
Test the configuration:
sudo nginx -t
-
If no errors are reported, reload the new configuration:
sudo nginx -s reload
Your Rocket.Chat site will use an SSL certificate from Let's Encrypt, which is a free certificate provider trusted by common web browsers. A popular tool called Certbot makes getting and using a Let's Encrypt certificate easy:
{{% content "certbot-shortguide-ubuntu" %}}