How to Use OpenClaw Remote Access
Reach one always-on OpenClaw gateway over SSH or Tailscale without exposing the gateway directly to the public internet.
Use this guide, then keep going
If this guide solved one problem, here is the clean next move for the rest of your setup.
Most operators land on one fix first. The preview, homepage, and full file make it easier to turn that one fix into a reliable OpenClaw setup.
Remote access in OpenClaw is built around a simple idea: one gateway host owns the real state, and other clients connect to it. The official docs push this pattern hard because it avoids session drift and channel confusion. Your laptop, desktop, phone, or Mac app can all be clients, but only one gateway should be the brain unless you are intentionally running separate profiles.
When this is the right move
Use this when you want an always-on OpenClaw host on a home desktop, server, or VPS and still need safe operator access from somewhere else. It is also the right move when you want nodes to stay peripheral and do not want to accidentally turn every device into a half-configured second gateway.
The practical workflow
- Keep the gateway bound to loopback on the host unless you have a very specific reason not to.
- Open an SSH tunnel to forward the gateway port to your local machine, or use Tailscale Serve for the Control UI when that is the cleaner path.
- Point your CLI, WebChat, or macOS app at the tunneled or served gateway instead of spinning up a second gateway on the client machine.
- If you want the CLI to remember the remote target, set the documented
gateway.remoteblock after you know the tunnel and auth story are correct. - Use the gateway health and status commands over that remote path before you trust the setup for real work.
Grounded command or config pattern
The docs show plain SSH tunneling as the universal fallback, then a config block for remembering the remote target.
ssh -N -L 18789:127.0.0.1:18789 user@host
{
gateway: {
mode: "remote",
remote: {
url: "ws://127.0.0.1:18789",
token: "your-token",
},
},
}One detail the docs underline is that --url overrides do not silently reuse implicit credentials. If you point the CLI at a specific remote URL, include the token or password explicitly rather than assuming config fallback will guess what you meant.
Operator notes
Nodes do not become gateways in this model. A Telegram message still lands on the central gateway, the agent runs there, and only then can the gateway call a node tool. That is why the docs keep repeating that the gateway host is where sessions, auth profiles, and channels live. WebChat also rides the same gateway WebSocket, so there is no second chat server to operate remotely.
Rollout approach
For OpenClaw remote access, I would prove the smallest path first: tunnel the gateway, run one health command, open one chat, and stop. Once that works, add convenience such as persistent remote defaults, Tailscale Serve, or the macOS app's managed SSH mode. The boring path is usually the one you can trust at 2 a.m.
Common mistake
The common mistake is treating the command or config key as the whole feature. The command starts the workflow, but the surrounding state is what keeps it reliable: config validation, auth, pairing, permissions, logs, and one small verification step. If those pieces are skipped, the next failure looks random even when OpenClaw is behaving exactly as configured.
Maintenance rhythm
Once this is working, write down the exact command, config path, or approval decision you used. Future you will not remember the tiny detail that made the setup safe. A short note in the workspace or runbook is cheaper than rediscovering the same behavior during an outage, especially after updates or host changes.
Safety checks
Keep the gateway loopback-only unless you are deliberately running a non-loopback deployment with real auth. If you do bind beyond loopback, the docs say token, password, or a trusted proxy story is required. Treat insecure private WebSocket exceptions as break-glass behavior, not the baseline.
How to verify it worked
Bring up the tunnel, run openclaw health or openclaw status --deep, and then open WebChat or the macOS remote view. If those succeed through the same path, you have proven the transport, auth, and gateway reachability together. If only one client fails, debug that client. If everything fails, debug the tunnel or gateway host first.
If you want the operator version with sharper checklists, safer defaults, and fewer “why is this broken?” afternoons, The OpenClaw Playbook is the shortcut I would hand to a serious OpenClaw owner.
Frequently Asked Questions
What is the safest default for remote OpenClaw access?
The docs recommend keeping the gateway loopback-only and using SSH tunneling or Tailscale Serve rather than exposing the gateway directly.
Does WebChat need a separate remote server?
No. The docs say WebChat talks directly to the gateway WebSocket, so remote use tunnels or exposes the gateway itself.
Where does state live in a remote setup?
The gateway host owns sessions, auth profiles, channels, and state. Clients and nodes connect to that host.
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.