Connect OpenClaw

Pair Moonstone with your OpenClaw Gateway by sending your agent one message.

Moonstone pairs with your OpenClaw Gateway through a setup code. Your agent makes the code: you send it one message and paste back its reply.

What you need

  • An OpenClaw Gateway on 2026.10.7 or later, running.
  • A place where you already talk to your agent: a chat app, the Control UI, or Claude Code or Codex on the Gateway's computer.

Connect

  1. Open Moonstone and choose OpenClaw.
  2. Check How this iPhone connects. Leave it on Automatic unless you want a particular route.
  3. Tap Copy Message. Moonstone writes the message for you, and Read the full message shows all of it.
  4. Send it to your agent and wait for its reply.
  5. Paste the whole reply under Then. On iPhone and iPad you can tap Scan QR Code instead.

Moonstone ticks off each step as it connects. It may then ask which AI model your agent runs on, which of the Gateway's chats to show, and whether to turn on notifications. It ends on You're in.

To connect without the agent, tap Use the Terminal Instead, run the command it shows on the Gateway's computer, and scan or paste the code.

Owner and standard access

The message asks for a full code, which gives this device owner access: your agents treat what you send as the Gateway owner's, so they can set up automations, and you can manage the Gateway from Moonstone. Agents lists what it unlocks.

Standard access leaves that out, for a device you share: add --limited to openclaw qr. On Home Wi-Fi only, a code always gives standard access.

To turn owner access on later, go to Settings › your gateway › Connection › Owner access. A device the Gateway already approved gets it at once. Otherwise Moonstone offers three ways: scan a full code, copy a message for your agent, or ask the Gateway and approve the request there.

On a Mac

A Mac needs one more thing, the Gateway's approval. The message asks your agent to approve your Mac, and only it. Meanwhile Moonstone shows Waiting for OpenClaw to approve this Mac, with the device id your agent checks. If nothing happens, write approve to your agent. An iPhone or iPad needs no approval.

Another device

Open Moonstone on the new device. With iCloud, it already knows your Gateway and offers Bring It Over: it shows a 2-digit number, which you enter in Moonstone on a device that has owner access. The same offer stays in Settings, under On your other devices.

Without iCloud, open Settings › your gateway › Connection › Add a device on a device with owner access. Choose Owner access or Standard access, then scan its code from the new device. A new Mac shows a fingerprint: tap Approve only when both devices show the same one.

For agents

The steps your agent follows

Your agent reads these from this page as Markdown, where they're written out in full.

Moonstone's message is the source of truth. It names the route, the device and, on a Mac, the start of the device id. It asks for this, in order:

  1. Check openclaw --version (2026.10.7 or later) and openclaw gateway status. Older or not running: stop and tell the person.
  2. Work out the address the device reaches the Gateway at. A named route is the only one you may use, even if another address already works. Each route's steps are in Reach it from anywhere. On a Mac with Automatic, if the Mac is this computer, the loopback address is enough. Otherwise, on Automatic, the first that fits wins:
    • an address a phone can already reach: a Tailscale Serve name, a hostname behind Cloudflare Access, or an exe.dev VM;
    • Tailscale Serve, if this computer has Tailscale signed in;
    • neither: install Tailscale, start its sign-in, send the person the link and end your turn. Carry on when they write "done".
  3. For Tailscale Serve, serve the Gateway's own port (openclaw config get gateway, normally 18789) and leave other Serve routes alone: tailscale serve --bg --https=PORT http://127.0.0.1:PORT. Unless gateway.tailscale.mode is serve, add 127.0.0.1 and ::1 to gateway.trustedProxies, keeping its entries. That applies without a restart. Success: https://<address>/healthz answers {"ok":true. If Serve can't get a certificate, tell the person to turn on HTTPS Certificates in Tailscale's admin console.
  4. Last, because the code expires in 10 minutes, make it: openclaw qr --setup-code-only --url <address>, with wss:// for a Tailscale, Cloudflare or exe.dev name and ws:// otherwise. Add --limited only if the person asked for standard access. If the command fails for want of the Gateway's token or password, pass --token or --password to that one command without printing it.
  5. Reply with one line on what you changed, then the code alone in a code block. With Cloudflare Access in front, add CF-Access-Client-Id: <client id> and CF-Access-Client-Secret: <client secret> on their own lines under the code, in the same block. If you set up Tailscale and the person's device doesn't have it, end with: "Moonstone will help you get Tailscale on your iPhone: sign in with the same account."
  6. Mac only: in openclaw devices list --json, find the pending request whose deviceId starts with the 16 characters in the message, and run openclaw devices approve <requestId> for that request alone, never one picked by position or age. Not there yet: end your turn and approve when the person writes "approve".

Rules:

  • Change only what's missing. Ask before changing the Gateway's sign-in, bind or pairing.
  • Open no port to the internet. Never use Tailscale Funnel.
  • Send the setup code to the person and nowhere else: it lets one device in.
  • When a code ran out, make a fresh one for the same address, the same way, and reply with it alone in a code block.
  • It worked when Moonstone shows You're in after your last change.