August 4, 2020

RocketChat Installation via Snap

RocketChat Installation via Snap

What’s RocketChat? To me it’s an open source Slack.

Why do I even post this? Official Doc is quite nice. It’s because some people are lazy.

0. Before you start (Important)

RocketChat requires certain amount of RAM. (varies from active users, user actions, etc). If your instance RAM is 500M (typical for some beginner user or even free plans), do not install it. If your instance RAM is 1G, but has other applications installed, like wordpress,, it’s recommend not to install it. FYI, I installed RocketChat on a clean 1G RAM instance. (barely enough)

Installation is very simple and fast (assuming all commands in sudo):

1. Snap install
apt install update
snap install rocketchat-server

And that’s it, done. Note: (i) For some lower version of linux, you may have to install snapd first: apt install snapd   (ii) When you read ‘/snap/bin’ is not included in the PATH environment variable, try export PATH=$PATH:/snap/bin

2. Auto SSL with Snaps
snap set rocketchat-server caddy-url=https://<>
snap set rocketchat-server caddy=enable
snap set rocketchat-server https=enable

What does Caddy do here: (i) configure reverse proxy (ii) automatically apply for SSL certificate

3. Restart RocketChat and Caddy service
systemctl restart snap.rocketchat-server.rocketchat-server.service
systemctl restart snap.rocketchat-server.rocketchat-caddy.service
4. Access the server IP + port 3000 to start filling in the configuration

Example:   Make sure firewall settings are ok