Dev.to Security 🔐 Cybersecurity 👁 0 📖 1 min read

Stop running OpenClaw with the gateway wide open

I keep seeing people run OpenClaw with the gateway exposed and no auth, and it's the fastest way to hand your agent to someone else. Locking it down takes about ten minutes. Here's what actually matters. The pr

I keep seeing people run OpenClaw with the gateway exposed and no auth, and it's the fastest way to hand your agent to someone else. Locking it down takes about ten minutes. Here's what actually matters.

The problem

OpenClaw's gateway is the layer that lets outside services — webhooks, chat platforms, remote triggers — reach your agent. Leave it open and unauthenticated on a public IP and you're not running a personal assistant anymore. You're running a free endpoint for anyone who finds it.

The scary part is how fast it happens. A box exposed on the open internet gets scanned within minutes. Your agent holds your API keys, your files, your automation. That's a real attack surface, not a hypothetical.

What actually helps

Put the gateway behind a boundary. Don't expose the gateway port directly to the internet. Front it with a reverse proxy (nginx or Caddy) that you control, and only expose the one port you intend to.

Require authentication. Whatever auth OpenClaw's gateway supports on your version, turn it on. An unauthenticated webhook endpoint is an open door. Check the official docs for your version — the specifics move between releases, so I'm not going to paste a command that'll be wrong next month.

Restrict what remote triggers can do. Treat every inbound webhook as untrusted input. If you only need a trigger to run one skill, don't give it a path to run everything.

Keep tokens out of config files you commit. Store secrets in an environment file that's gitignored, not in a config you might paste somewhere.

The mindset

The rule I use: if I wouldn't post this URL in a public chat room, it's not locked down yet. Treat your agent's exposure the way you'd treat an SSH port — assume the whole internet is trying it.

The full walkthrough, with the specific settings and the one most people skip, is on openclawagent.us.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.