Cloud server with Tailscale
Your cloud server (EC2, a VPS, any Linux machine) runs herdr and the hmob gateway. Your iPhone reaches it over your tailnet. The server needs no inbound port for hmob: no security group or firewall rule to open.
Before you start
Section titled “Before you start”- A Linux server (x86_64 or aarch64) with herdr installed, and SSH access to it.
- Tailscale on the iPhone, signed in.
- The Hmob app on the iPhone.
1. Join the server to your tailnet
Section titled “1. Join the server to your tailnet”curl -fsSL https://tailscale.com/install.sh | shsudo tailscale up # open the printed link and sign in to the same tailnetTS_IP="$(tailscale ip -4)"echo "$TS_IP" # 100.x.y.z2. Install the gateway
Section titled “2. Install the gateway”As the user who runs herdr (not root):
curl -fsSL https://hmob-app.github.io/install.sh | shexport PATH="$HOME/.local/bin:$PATH" # if the script says it is not on PATH3. Run the gateway at boot
Section titled “3. Run the gateway at boot”Listen on the Tailscale address only:
hmob install-service --bind "$TS_IP"hmob statusss -ltn | grep 8443 # only 100.x.y.z:8443This installs a systemd user service and enables lingering, so it runs at boot without you logging in. Follow its log with journalctl --user -u hmob -f.
4. Pair your iPhone
Section titled “4. Pair your iPhone”hmob pair --url "https://$TS_IP:8443"With Tailscale on in the iPhone, open the Hmob app, tap Scan pairing QR code and scan the code in your SSH terminal. The code is valid for 5 minutes and can be used once.
Firewall
Section titled “Firewall”Keep TCP 8443 closed to the internet; Tailscale carries the traffic. Tailscale connects without any inbound rule. Allowing inbound UDP 41641 is optional and only helps it make direct (rather than relayed) connections.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| Pairing times out | Tailscale is on in the iPhone; tailscale status lists the phone; hmob status shows the service running. |
| “A TLS error caused the secure connection to fail” | You entered the address by hand, or paired by host name. Pair again by scanning a QR code made with --url https://$TS_IP:8443. |
| The service does not start after a reboot | systemctl --user status hmob and journalctl --user -u hmob. If it started before Tailscale had its address, it retries on its own within seconds. |