This machineEvery page
The relay
panel-relay runs on a VPS, which is a small rented server with a public address. Your panels connect out to it, so you don't have to open anything at home. The relay passes connections along, but it can't read them. It does two things:
- From outside. When a browser asks for a panel's name, the relay passes it on to that panel, if the panel has From outside switched on. The connection stays encrypted all the way from the browser to the panel.
- Between places. Panels that joined the same relay find each other and can pair, just like on one network.
One relay can serve several households, each kept separate in its own group.
What you need
- A VPS running Debian, with a public address, and port 443 free.
- A domain at Cloudflare, and an API token that's allowed to edit its DNS. Cloudflare's free plan is enough. The relay only uses Cloudflare for DNS. Cloudflare can't run the relay itself. And its proxy (the orange cloud) would break the encrypted connection the relay passes on. That's why the relay keeps its records set to DNS only.
Where to run it
There's no free VPS in Europe that has its own public IPv4 address and stays free. The free ones are trials (AWS's ends after six months), only in the US (Google's), or share one address between many machines. A relay can't work behind a shared address. A small paid one costs about as much as a coffee a month. Here are two we know work, and then what to look for in any other.
Hetzner Cloud
About €6 a month, including its IPv4 address and 20 TB of traffic, in Germany or Finland.
- In the Cloud Console, open a project and choose Add Server.
- Location: Falkenstein, Nuremberg or Helsinki. Pick the one nearest home.
- Image: Debian, the newest.
- Type: shared vCPU, the smallest. That's CX23 (x86), or CAX11 (Arm) if the CX isn't available. The relay runs on both.
- Networking: switch Public IPv4 on. IPv6 too, if you like. The installer asks for it.
- SSH key: add yours, so you can log in.
- Press Create. If you don't attach a firewall, the server accepts every port. If you do attach one, allow TCP 443 in, and 22 for yourself.
Then log in with ssh root@<its address> and install the relay as described below.
Scaleway
About €5 a month for Stardust, most of which is the IPv4 address, in Paris or Amsterdam. Stardust is often sold out. The next size up (DEV1-S) costs about twice as much.
- In the console, choose Instances, then Create Instance.
- Availability zone: Amsterdam or Paris. Pick the one nearest home.
- Type: STARDUST1-S (under Learning), or DEV1-S.
- Image: Debian, the newest. A 10 GB volume is plenty.
- Public IPv4: on.
- Add your SSH key, and press Create Instance.
- Security groups: the default group lets everything in. If yours blocks incoming traffic, add a rule that allows TCP 443 in.
Log in with ssh root@<its address> and install the relay as described below.
Any other
- Its own public IPv4 address. IPv6 alone isn't enough, because a phone on a network without IPv6 couldn't reach it. A "NAT VPS" that shares an address won't work either. It's fine if the provider translates addresses itself, as long as port 443 reaches the machine. In that case the installer can't guess the address, so you type the one the provider's console shows.
- Debian, on amd64 or arm64. The smallest machine is enough: one core, 512 MB to 1 GB of memory, and 10 GB of disk.
- Enough traffic. Everything from outside passes through the relay. So a film you watch from away counts against its traffic too. Look for a terabyte or more a month, or a price per gigabyte you're happy with.
- Port 443 open, at the provider's firewall or security group. Also on the machine itself, if it has a firewall (
ufw allow 443/tcp). Port 80 isn't needed, because the certificate is checked through Cloudflare's DNS. - Near home. Every page you open from outside goes there and back.
- It has to stay. If a free tier ends after a year, or your credits run out, the relay goes with it.
Installing
Download panel-relay-<version>.tar.gz from the download page. Then, on the VPS:
tar xzf panel-relay-<version>.tar.gz
cd panel-relay-<version>
sudo sh install.sh
The installer asks for the relay's name (in your Cloudflare domain), its public address, an email address and the token. It then gets its certificate and prints a join code.
To upgrade the relay later, do exactly the same with the new version. The installer keeps your settings, groups, certificate and joined panels. It replaces the program and restarts the relay, and your panels reconnect by themselves within a few seconds. It prints a new join code at the end, which you can ignore.
Joining a panel
First give the panel a name, under Maintenance, Its name. Then go to Maintenance, Relay, and type the join code. The panel stays connected. Its row shows whether it's connected, and if not, why.
From outside
This is off until you switch it on, on the panel's Relay row. The relay then points the panel's name to itself, and passes browsers that ask for it on to the panel. At home, the name still points to home.
From outside, you need a second factor to sign in. Accounts and paired phones without one are refused from outside, but keep working at home. The Relay row lists the accounts that don't have one.
Against guessing passwords. After five failed sign-ins from outside, signing in from outside is locked for a quarter of an hour. That never happens at home. After ten failures in an hour from one address, the relay blocks that address. The first block lasts an hour. Each next block lasts twice as long, up to a day.
Against scanners. Programs on the internet try every new name they find. They ask for pages like /admin, /login or /actions, looking for a known flaw in some other software. panel doesn't have any of those pages, because its own pages all come after the #. So after twenty of those requests from one address in an hour, the relay blocks it the same way. A missing favicon.ico or robots.txt doesn't count. Neither does anything from someone who's signed in, or anything at home.
Several households
panel-relay group add smith "The Smiths"
panel-relay code smith
panel-relay domain add smith.nl
Each panel only sees and reaches panels in its own group. Each domain the panels are named in has its own token. panel-relay list shows who's connected right now. See panel-relay(8) for everything it does.