OpenClaw Studio is a Next.js dashboard for managing OpenClaw agents via the OpenClaw Gateway (WebSocket).
There are two separate connections involved:
- Your browser -> Studio (HTTP) at
http://<studio-host>:3000 - Your browser -> OpenClaw Gateway (WebSocket) at the configured Gateway URL
Important consequences:
- The Gateway connection is made from the browser, not from the machine running
next dev. ws://127.0.0.1:18789/ws://localhost:18789means “connect to a gateway on the same device as the browser”.- If you open Studio on your phone,
127.0.0.1is your phone, not your laptop/server.
- If you open Studio on your phone,
- Studio persists the Gateway URL/token under
~/.openclaw/openclaw-studio/settings.json. Once set in the UI, this will be used on future runs and will override the defaultNEXT_PUBLIC_GATEWAY_URL. - If Studio is served over
https://, the Gateway URL must bewss://...(browsers blockws://fromhttps://pages).
- Node.js 18+ (LTS recommended)
- OpenClaw Gateway running (local or remote)
- Tailscale (optional, recommended for tailnet access)
If you don't already have OpenClaw installed:
npm install -g openclaw@latest
openclaw onboard --install-daemonStart a gateway (foreground):
openclaw gateway run --bind loopback --port 18789 --verboseHelpful checks:
openclaw gateway probe
openclaw config get gateway.auth.tokenMost people keep the gateway bound to loopback and use Tailscale Serve on the gateway host.
On the gateway host:
openclaw config set gateway.tailscale.mode serve
openclaw config set gateway.auth.mode tokenRestart your gateway. Then:
tailscale serve statusTake the HTTPS URL from tailscale serve status and convert it to a WebSocket URL for Studio:
https://gateway-host.your-tailnet.ts.net->wss://gateway-host.your-tailnet.ts.net
npx -y openclaw-studio@latest
cd openclaw-studio
npm run devOpen http://localhost:3000 and set:
- Token:
openclaw config get gateway.auth.token - Gateway URL:
wss://gateway-host.your-tailnet.ts.net(tailnet viatailscale serve) - Gateway URL:
ws://127.0.0.1:18789(local gateway) - Gateway URL:
ws://your-host:18789(direct remote port, notailscale serve)
Notes:
- If Studio is served over
https://, the gateway URL must bewss://...(browsers blockws://fromhttps://pages). - If you browse Studio from another device (phone/tablet), do not use
ws://127.0.0.1:18789unless the gateway is running on that device. Use a reachable host (LAN IP/DNS),wss://...via Tailscale Serve, or an SSH tunnel.
If you prefer SSH tunneling to a remote host:
ssh -L 18789:127.0.0.1:18789 user@your-hostThen connect Studio to ws://127.0.0.1:18789.
git clone https://github.com/grp06/openclaw-studio.git
cd openclaw-studio
npm install
npm run devPaths and key settings:
- OpenClaw config:
~/.openclaw/openclaw.json(orOPENCLAW_CONFIG_PATH/OPENCLAW_STATE_DIR) - Studio settings:
~/.openclaw/openclaw-studio/settings.json - Default gateway URL:
ws://127.0.0.1:18789(override via Studio Settings orNEXT_PUBLIC_GATEWAY_URL)
- Open an agent and go to Settings -> Cron jobs.
- If no jobs exist, use the empty-state Create button.
- If jobs already exist, use the header Create button.
- The modal is agent-scoped and walks through template selection, task text, schedule, and review.
- Submitting creates the job via gateway
cron.addand refreshes that same agent's cron list.
- Missing config: Run
openclaw onboardor setOPENCLAW_CONFIG_PATH - Gateway unreachable: Confirm the gateway is running and
NEXT_PUBLIC_GATEWAY_URLmatches - Auth errors: Studio currently prompts for a token. Check
gateway.auth.modeistokenandgateway.auth.tokenis set inopenclaw.json(or runopenclaw config get gateway.auth.token). - UI loads but no agents show up (common when browsing from a phone):
- Check the Gateway URL shown in Studio. If it is
ws://127.0.0.1:18789, that will only work when browsing Studio on the same machine running the gateway (or via an SSH tunnel). - If you set a Gateway URL once, it is persisted in
~/.openclaw/openclaw-studio/settings.json. Update it in the UI (or delete/reset the file) if you moved hosts.
- Check the Gateway URL shown in Studio. If it is
- Still stuck: Run
npx -y openclaw-studio@latest doctor --check(and--fix --force-settingsto safely rewrite Studio settings).
See ARCHITECTURE.md for details on modules and data flow.
