How can I connect the remotely to my selfhosted rocket.chat server?

Hello,

Background information

I have recently become interested in Linux and OpenSource software.

I am currently trying to move away from propitiatory software. This has led me to install Rocket.Chat on my Raspberry Pi 2b+

It was easy install Rocket.Chat using Snaps.

Everything is up and running on my local system, but I’d like friends and family to be able to join my Rocket.Chat

My Question

  • How can I allow other people to connect to it who are outside of my home network?

Any help, advice or tips would be greatly appreciated.

thanks
alexsunny

nice, rocket.chat on a pi is a fun first project. the reason it only works at home right now is two things, your home connection almost certainly has a changing ip and youre behind your routers NAT, so theres no fixed address from outside pointing at the pi. and even once thats sorted you really want it reachable over https with the login rather than raw, otherwise youre putting a chat server open on the internet.

the classic route is a dynamic dns name (noip, dynu, duckdns all free) so a hostname follows your changing ip, then a port forward on the router to the pi, then a reverse proxy like caddy or nginx in front to get the https cert. fail2ban on top so its not getting hammered. its very doable, its just four moving parts to wire up and keep patched. one heads up, a pi 2b+ is pretty light for rocket.chat since it drags mongodb along, it’ll creak with more than a couple of people on at once, a pi 4 or any cheap mini pc will feel a lot smoother if you grow it.

full disclosure im involved in an open source project called syncloud, it runs rocket.chat as a one click install and does exactly that remote access part for you, gives the box a hostname, sorts the https and a login automatically, on a pi or mini pc. thats the route id point you at if you just want friends and family to open a link and be in, without hand wiring the proxy and certs. but if part of the appeal is learning how it all fits together then the ddns + reverse proxy path above teaches you a ton.

First note neither snaps or Pi are supported.

Docker is the recommended install method.

For external access you need a domain, letsencryt certs, and a reverse proxy.

This has been documented many times.

Read