Mac with Tailscale
Your Mac runs herdr and the hmob gateway. Your iPhone reaches the gateway over your tailnet, so nothing is exposed to your local network or the internet.
Before you start
Section titled “Before you start”- A Mac with Apple silicon, with herdr installed.
- Tailscale on the Mac and on the iPhone, both signed in to the same tailnet.
- The Hmob app on the iPhone.
1. Install the gateway
Section titled “1. Install the gateway”curl -fsSL https://hmob-app.github.io/install.sh | shIf the script says ~/.local/bin is not on your PATH, add it (for zsh):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && exec zsh2. Find the Mac’s Tailscale address
Section titled “2. Find the Mac’s Tailscale address”The Tailscale app for macOS ships its command-line tool inside the app bundle:
TS=/Applications/Tailscale.app/Contents/MacOS/Tailscalecommand -v tailscale >/dev/null && TS=tailscaleTS_IP="$("$TS" ip -4)"echo "$TS_IP" # 100.x.y.z3. Run the gateway at login
Section titled “3. Run the gateway at login”Listen on the Tailscale address only:
hmob install-service --bind "$TS_IP"hmob statusThis installs a launchd agent that starts at login and restarts if it stops. Logs go to ~/Library/Logs/.
4. Pair your iPhone
Section titled “4. Pair your iPhone”hmob pair --url "https://$TS_IP:8443"With Tailscale turned on in the iPhone, open the Hmob app, tap Scan pairing QR code and scan the code in your terminal. The code is valid for 5 minutes and can be used once.
Keep the Mac reachable
Section titled “Keep the Mac reachable”The iPhone can only reach the gateway while the Mac is awake and online. For long agent runs, prevent sleep while on power (System Settings → Battery → Options, or Energy on a desktop Mac), or run caffeinate -s in a terminal.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| Pairing times out | Tailscale is on in the iPhone; hmob status shows the service running; "$TS" ping <iphone-name> reaches the phone. |
| “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. |
| Terminals open a plain shell | herdr is not found. Reinstall the service after installing herdr: hmob install-service --bind "$TS_IP". |