Search⌘ K
AI Features

Security and Best Practices

Explore essential security practices for managing your OpenClaw AI assistant. Learn how to securely configure your gateway, control messaging permissions, protect API keys, and prevent prompt injection. This lesson helps you maintain a reliable and secure autonomous assistant integrated with real-world workflows.

By this point your OpenClaw instance is doing a lot: it is connected to WhatsApp, Slack, and GitHub, it has shell access, it runs on a schedule, and it holds API keys for every service you have wired up. That is a meaningful attack surface. This lesson covers the four core areas where most real problems happen.

Is my Gateway exposed to the internet?

This is the first thing to get right. By default, OpenClaw binds to loopback (127.0.0.1), which means the Gateway is only reachable from the same machine. That is the correct default. The moment you change gateway.bind to lan or 0.0.0.0, your Gateway is reachable by anyone on your network, or, depending on your setup, the internet.

Never expose your Gateway directly to the public internet without authentication. The 1,000+ exposed instances we mentioned in the course were almost all the result of developers changing the bind address without understanding what that does.

If you need remote access to the Control UI or want to reach your Gateway from another device, use one of these safe paths instead:

  • ...