I always wonder how to self host services I use with different alternatives, instead of github I would prefer my own gitlab, Ghost provides me to host my own instance as well for blogging, etc. However I was struggling to find an alternative to Slack and Discord, after a while I've found Mattermost and then Rocket.Chat.

On this server I've simply decided to use snap to install it: snap install rocketchat-server. It is on the 3000 port, so I use nginx to upstream from local to 80 and 443. It works perfectly...

Snap binary is managing snap package. The main goal is to get cross platform packages (for all architectures and distros) with one package manager. Snaps are self contained with all required libraries and confined with specific rights (impossible for a package to write elsewhere than its containers if not allowed). It is possible then to push a snap from Archlinux and download it to a Rasperry with Ubuntu.

It is possible to strugle if you want to host files outside default directory (if you have limited space on the drive for example).

Switch from GridFS to Filesystem and set a location, but with the snap, it is restricted to /var/snap/rocketchat-server/common directory. In this situation I usualy use symlink, but it is not possible with lxd containers.

Instead, it is possible to mount a directory there. The way to proceed:

sudo mount --bind /mnt/hdd/www/rocketchat-server/uploads/ /var/snap/rocketchat-server/common/uploads/

note: After a reboot of the server, the mount will disappear, then it should be binded on fstab as well.