Skip to content

Mac with Tailscale

Your Mac runs herdr and the hmob gateway. Your phone reaches the gateway over your tailnet, so nothing is exposed to your local network or the internet.

  • A Mac with Apple silicon, with herdr installed.
  • Tailscale on the Mac and on the phone, both signed in to the same tailnet.
  • The Hmob app on the phone: from the App Store on iPhone and iPad, or the Android APK.
Terminal window
curl -fsSL https://hmob.app/install.sh | sh

If the script says ~/.local/bin is not on your PATH, add it (for zsh):

Terminal window
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && exec zsh

The Tailscale app for macOS ships its command-line tool inside the app bundle:

Terminal window
TS=/Applications/Tailscale.app/Contents/MacOS/Tailscale
command -v tailscale >/dev/null && TS=tailscale
TS_IP="$("$TS" ip -4)"
echo "$TS_IP" # 100.x.y.z

Listen on the Tailscale address only:

Terminal window
hmob install-service --bind "$TS_IP"
hmob status

This installs a launchd agent that starts at login and restarts if it stops. Logs go to ~/Library/Logs/.

Terminal window
hmob pair --url "https://$TS_IP:8443"

With Tailscale turned on in the phone, 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.

The phone 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.

Symptom Check
Pairing times out Tailscale is on in the phone; hmob status shows the service running; "$TS" ping <phone-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".