OpenClaw Security Mistakes: Is Your Self-Hosted AI Agent Exposing Your Messages, Files and Shell? A security writeup details how most data-leaking OpenClaw installs are misconfigured rather than hacked, with public gateways, open DM policies, unvetted skills and unsandboxed shell access giving strangers access to chats, files and a command line. The piece notes that binding port 18789 to all interfaces (0.0.0.0) can bypass UFW via Docker's firewall rules, and recommends binding to 127.0.0.1 and using a strong gateway token, since the token alone separates a network connection from full agent control. Most OpenClaw installs that leak data are not hacked. Their owners configured them that way. A gateway reachable from the internet, a direct-message policy that accepts anyone, one unvetted skill or an agent with unsandboxed shell access is enough to give a stranger your chats, your files and a command line on your home server. You can self-host OpenClaw safely without a sysadmin background, but only if you treat it as remote access software that happens to talk, not as a chat app. TL;DR: The central tradeoff is simple: every permission that makes OpenClaw more useful also makes a single mistake more expensive. Most self-hosted apps store data and wait for you to open them. A photo library or a media server is passive: if someone breaks in, they can read or delete what is already there. OpenClaw is different because it acts. It reads incoming messages from channels like WhatsApp, Telegram, Discord and Signal, decides what to do using a language model, then calls tools that can run commands, read files and browse the web for you. That changes what a mistake costs. On Jellyfin, a leaked password exposes your film collection. On OpenClaw, a leaked gateway token or an open DM policy can let a stranger give orders to an agent that already holds your API keys, your chat history and a shell on the machine. | Risk factor | Typical home server app Jellyfin, Nextcloud | OpenClaw | |---|---|---| | What an attacker gains | Read or delete stored files | The ability to issue commands through the agent | | Entry points | One web login page | Control UI, gateway port 18789 and every connected chat channel | | Who can send input | Logged-in users only | Anyone who can message the linked account, plus any email or web page the agent reads | | Secrets held | Its own admin password | LLM provider API keys, messaging sessions and tool credentials | | Blast radius | That app's own data | Every file and command the agent's tools can reach | Hosting does not remove this risk, but it shapes it. You can run OpenClaw on a home server, a NAS, a rented VPS or a managed personal cloud. Yundera is a managed Personal Cloud Server, built on CasaOS, that runs self-hosted apps as Docker containers on a server dedicated to the user. Wherever OpenClaw runs, the agent's permissions decide how much damage a mistake can do, and the rest of this article covers those permissions. The OpenClaw gateway is the process that holds your channel sessions, serves the Control UI and accepts commands, by default on port 18789. It is meant to listen on the local machine, or on a private network you control. The problem is that several ordinary setup steps quietly widen that, and nothing in the chat interface tells you it has happened. These are the common ways a gateway ends up public: 18789:18789 binds the port on every network interface of the host. Docker writes its own firewall rules, so on many Linux hosts it bypasses UFW, and your "deny incoming" policy does not protect that port. Writing 127.0.0.1:18789:18789 keeps it local. To check, run ss -tlnp | grep 18789 on the host. A local address of 127.0.0.1 is what you want, and 0.0.0.0 or :: means every interface. Then try opening the gateway from your phone on mobile data, with Wi-Fi off. If it loads, so can a stranger. The gateway token is the only thing between a network connection and full control of your agent. Anyone who presents it can read sessions, change configuration and send instructions as if they were you. Exposure covered above and a weak token together are what turn a misconfiguration into a breach. Every hosting option needs the token, whether OpenClaw runs on a home server, a NAS, a VPS or Yundera, where each app is reachable on a public HTTPS subdomain without port forwarding. HTTPS encrypts the connection, but it does not decide who is allowed in. The mistakes we see most often: openclaw123 can be guessed by scripts that try common words. Generate a random value instead, for example with openssl rand -hex 32 , which gives 64 hexadecimal characters. docker-compose.yml and pushing the folder to a public repository publishes it. Keep it in an .env file that is listed in .gitignore . Every message that reaches OpenClaw becomes input to a model that can call tools. So the question "who can talk to my agent?" is really "who can operate my server?". OpenClaw controls this per channel with a DM policy, and the default is pairing: an unknown sender receives a short code and gets no answer until you approve it with openclaw pairing approve