A route is how Moonstone reaches the computer your agent runs on when you're away from it. Every route works for a computer at home (keep it awake) or a server, and none opens your agent to the internet.
The routes
Pick one under How this iPhone connects when you connect. Your agent sets up that route and uses no other, even if another address already works.
| Route | What it is |
|---|---|
| Automatic | The address your agent already has. With none, it sets up Tailscale. Pick it if you're not sure. |
| Tailscale | A free, private network. About 5 minutes: one sign-in on the computer, one app on your device. |
| Cloudflare | An address on a domain you already have on Cloudflare, behind a key only your devices hold. Nothing to install on your device. |
| Home Wi-Fi only | Nothing to set up, but your agents are out of reach the moment you leave home. OpenClaw only: Hermes's dashboard has no encryption of its own. |
Two setups need no choice, so leave them on Automatic: Moonstone on the same Mac as your agent, and an agent on an exe.dev VM. For exe.dev, Moonstone then asks for a key you make there.
If the computer has no Tailscale yet, your agent installs it and sends you a sign-in link. Sign in, then write done. On your device, install Tailscale and sign in with the same account.
Tailscale can stay off
Tailscale can connect only when Moonstone needs it:
- In Tailscale on iPhone or iPad, tap your profile picture, then VPN On Demand. On a Mac, open Tailscale's settings from its menu bar icon (Tailscale 1.60 or later).
- Set every network to Do Nothing.
- Turn on MagicDNS hostname matching.
Only one VPN app at a time can use On Demand.
Change the route later
- Go to Settings › your gateway › Connection › Remote access.
- Choose Tailscale, Cloudflare or exe.dev.
- Under Let an agent set it up, tap Copy Prompt and send it to your agent. The same page has the steps to do it by hand.
- When the agent is done, go back to Connection, tap Address and enter the new address. The device stays paired, so it needs no new setup code.
Behind Cloudflare, Moonstone then asks for the key: the Client ID and Secret from your agent's reply. Behind exe.dev, it asks for an API key you create there, with its scope set to your VM. Keys stay in your device's keychain.
This prompt expects Tailscale on the computer already. Without it, OpenClaw's agent stops and tells you how. Hermes's falls back to your home network, which Moonstone can't reach once you leave.
When its computer gets a new name
Go to Settings › your gateway › Connection, tap Address and type the new name, such as hq.tail1234.ts.net. It stays the same gateway, still paired, with everything you set for it. Your other devices follow by themselves once the old name stops answering, as long as the new address is a name and not an IP address.
For agents
The steps your agent follows
Your agent reads these from this page as Markdown, where they're written out in full.
Use only the route Moonstone's message names, even if another address works. The connect steps are in Connect OpenClaw and Connect Hermes.
Every route:
- Keep the Gateway or dashboard on 127.0.0.1, behind its own sign-in. Open no port to the internet: no Tailscale Funnel, no public exe.dev share.
- OpenClaw: add
127.0.0.1and::1togateway.trustedProxies, keeping its entries (on Tailscale, unlessgateway.tailscale.modeisserve). No restart. - Hermes: set
dashboard.public_urlto the exact address, then restart the dashboard. - Success, on the exact address: OpenClaw's
/healthzanswers{"ok":true, and Hermes's/api/statusanswers"auth_required": truewith"basic"amongauth_providers. - When the prompt came from Remote access, the gateway is already paired. After the reply the prompt asks for, add the new address on a line of its own: the person types it into Address.
Tailscale:
- Check
tailscale statusandtailscale serve status. On a Mac the CLI may be/Applications/Tailscale.app/Contents/MacOS/Tailscale. If Tailscale isn't installed and signed in: from the connect message, install it, send the sign-in link, end your turn and carry on at "done". From Remote access on OpenClaw, stop and tell the person how. - On OpenClaw, reuse a Serve address that already proxies the Gateway's port. Otherwise serve the port itself (OpenClaw normally 18789, Hermes 9119), leaving 443 and other Serve routes alone:
tailscale serve --bg --https=PORT http://127.0.0.1:PORT. No certificate: the person turns on MagicDNS and HTTPS Certificates on the DNS page of Tailscale's admin console.
Cloudflare:
- Check
cloudflared --versionand install it if missing. Ask which domain to use, suggestingopenclaw.<domain>orhermes.<domain>. - Get API access: the
cfCLI (npm install -g cf, thencf auth login --no-browser, sending the person the link), or a token the person makes with Access: Apps and Policies Edit, Access: Service Tokens Edit, Access: Organizations, Identity Providers, and Groups Edit, Cloudflare Tunnel Edit, and DNS Edit. Without a Zero Trust organization, ask for a team name and create one (it's free). - Create these in this order, so the hostname is never open without the token:
- an Access service token named
Moonstone <hostname>, lasting a year; - a self-hosted Access application for the hostname, with one Service Auth policy for that token only, and "401 response for Service Auth policies" on;
- a remotely managed tunnel to
http://127.0.0.1:<port>(not localhost), its origin requiring Access for that application, installed withcloudflared service install <tunnel token>or routed through the cloudflared service already running; - a proxied CNAME to
<tunnel id>.cfargotunnel.com.
- an Access service token named
- Success: 401 without the token's two headers, and the usual answer with them.
- Reply in one code block, with the secret nowhere else: the setup code (OpenClaw) or
https://<hostname>(Hermes), thenCF-Access-Client-Id: <client id>andCF-Access-Client-Secret: <client secret>on their own lines.
Home Wi-Fi only (OpenClaw):
- Run
openclaw config set gateway.bind lan, thenopenclaw gateway restart. If you are OpenClaw, runnohup sh -c 'sleep 3; openclaw gateway restart' >/dev/null 2>&1 &, which ends your turn, and resume when the person writes "continue". - Make the code for
ws://<local IP>:<port>, and tell the person Moonstone will then work only on this network. Such a code always gives standard access.
exe.dev:
- Keep the VM private. exe.dev serves the VM's main port at
https://VM.exe.xyz(VM ishostname) and ports 3000 to 9999 athttps://VM.exe.xyz:PORT. Use whichever reaches the Gateway or dashboard; Hermes is normallyVM.exe.xyz:9119. If neither reaches OpenClaw, setgateway.portto 8789 and restart the Gateway.openclawmay be in~/.npm-global/bin. - The VM's name points inside it, so check privacy through the public IP:
curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' --resolve VM.exe.xyz:PORT:$(dig +short VM.exe.xyz @1.1.1.1 | tail -1) https://ADDRESS/healthz(/api/statusfor Hermes, PORT 443 for the main address) answers 307 and a link to/__exe.dev/login. If it doesn't, or you can't check, stop and tell the person. - Reply with the code or address. Moonstone then asks the person for an exe.dev key.