---
title: Reach it from anywhere
description: Pick how your iPhone, iPad or Mac reaches your agent when you're away from its computer.
read_when: Choosing a route when connecting, moving a gateway to another route, or after its computer got a new name
url: https://moonstone.chat/docs/anywhere
---

# Reach it from anywhere

> Pick how your iPhone, iPad or Mac reaches your agent when you're away from its computer.

For agents: every page of these docs is listed at [/docs/llms.txt](/docs/llms.txt). A block marked `text` right after "Send your agent" or "For your agent" is a message the person sends you.

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:

1. 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).
2. Set every network to **Do Nothing**.
3. Turn on **MagicDNS hostname matching**.

Only one VPN app at a time can use On Demand.

## Change the route later

1. Go to **Settings › your gateway › Connection › Remote access**.
2. Choose **Tailscale**, **Cloudflare** or **exe.dev**.
3. 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.
4. 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

Use only the route Moonstone's message names, even if another address works. The connect steps are in [Connect OpenClaw](https://moonstone.chat/docs/connect-openclaw.md) and [Connect Hermes](https://moonstone.chat/docs/connect-hermes.md).

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.1` and `::1` to `gateway.trustedProxies`, keeping its entries (on Tailscale, unless `gateway.tailscale.mode` is `serve`). No restart.
- Hermes: set `dashboard.public_url` to the exact address, then restart the dashboard.
- Success, on the exact address: OpenClaw's `/healthz` answers `{"ok":true`, and Hermes's `/api/status` answers `"auth_required": true` with `"basic"` among `auth_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:

1. Check `tailscale status` and `tailscale 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.
2. 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:

1. Check `cloudflared --version` and install it if missing. Ask which domain to use, suggesting `openclaw.<domain>` or `hermes.<domain>`.
2. Get API access: the `cf` CLI (`npm install -g cf`, then `cf 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).
3. 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 with `cloudflared service install <tunnel token>` or routed through the cloudflared service already running;
   - a proxied CNAME to `<tunnel id>.cfargotunnel.com`.
4. Success: 401 without the token's two headers, and the usual answer with them.
5. Reply in one code block, with the secret nowhere else: the setup code (OpenClaw) or `https://<hostname>` (Hermes), then `CF-Access-Client-Id: <client id>` and `CF-Access-Client-Secret: <client secret>` on their own lines.

Home Wi-Fi only (OpenClaw):

1. Run `openclaw config set gateway.bind lan`, then `openclaw gateway restart`. If you are OpenClaw, run `nohup sh -c 'sleep 3; openclaw gateway restart' >/dev/null 2>&1 &`, which ends your turn, and resume when the person writes "continue".
2. 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:

1. Keep the VM private. exe.dev serves the VM's main port at `https://VM.exe.xyz` (VM is `hostname`) and ports 3000 to 9999 at `https://VM.exe.xyz:PORT`. Use whichever reaches the Gateway or dashboard; Hermes is normally `VM.exe.xyz:9119`. If neither reaches OpenClaw, set `gateway.port` to 8789 and restart the Gateway. `openclaw` may be in `~/.npm-global/bin`.
2. 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/status` for 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.
3. Reply with the code or address. Moonstone then asks the person for an exe.dev key.
