Is Your AI Agent Exposed to the Internet? How to Check in 5 Minutes
Published 2026-10-19 · Updated 2026-10-26 · By The Is My Agent Safe team
Short answer
Your agent is exposed if its Gateway (port 18789 by default) answers from outside your machine without a VPN or tunnel. Check three things: gateway.bind is loopback, openclaw security audit --deep shows no gateway.* criticals, and a scan from another network finds no open port. If it's exposed, close it first, then rotate your tokens and keys.
- On the server: check the bind setting, what's listening on 18789, and the audit.
- From outside: scan your public IP from a different network, or check your cloud firewall rules.
- Quick test: on a phone using mobile data, open http://<your-public-IP>:18789. If any page loads, the port is reachable from the internet.
- A changed port or a long URL is not protection. Scanners find OpenClaw by its page, not its port.
- If it was exposed: close it, rotate the Gateway token and API keys, then review logs.
Using OpenClaw? Run openclaw security audit --deep and paste the output into our free check for a red/amber/green result with the most important finding first (Limits of the check).
What does 'exposed' mean for my OpenClaw?
In plain terms, it means strangers can reach your OpenClaw control panel: the dashboard you open in a browser to run your agent.
OpenClaw's Gateway serves the Control UI and the agent's control connection on one port, 18789 by default. "Exposed" means that port answers from a network you don't control. If someone can reach it and get past (or around) its auth, they can talk to your agent with your keys and your tools.
On a normal install the Gateway binds to loopback, which means only your own machine can connect. Exposure usually comes from one of these:
gateway.bindset tolan,customor similar, so it listens on every interface.- A Docker container. Published Docker ports can skip your host firewall.
- A reverse proxy (nginx, Caddy) forwarding the dashboard to a public domain.
- Tailscale Funnel, which publishes the Gateway to the public internet.
- A cloud firewall or security group with an inbound rule for 18789.
This isn't rare. See how many are exposed below.
Can I check in 30 seconds without pasting anything?
Yes. Answer these five yes/no questions. Only the first needs a terminal on the server.
- Does
openclaw config get gateway.bindprint anything other thanloopback? OpenClaw's default isloopback, where only local clients can connect.lan,tailnetandcustommake the Gateway reachable by more clients. If it's notloopbackand auth is off, read gateway.bind_no_auth. - Did you add an inbound rule for 18789? That means a cloud firewall rule, a security group rule or a router port forward.
- Do you run OpenClaw in Docker with 18789 published? For example
-p 18789:18789, or a Composeports:entry. OpenClaw's docs note that published container ports go through Docker's own forwarding rules, not only your host firewall, so UFW alone may not block them. - Did you turn on Tailscale Funnel? Funnel puts the Gateway on the public internet. Read gateway.tailscale_funnel.
- Does a public domain point at your dashboard through nginx, Caddy or another reverse proxy? If so, that domain is what strangers reach. Read gateway.control_ui.allowed_origins_required.
Any yes? Run the two longer checks below today. All no? Your setup matches OpenClaw's loopback default. Still run the outside test once, because a firewall rule or proxy you forgot about changes the answer.
For a read of your full settings, run openclaw security audit --deep and paste the output into the free check. It puts the most important finding first, in plain English, with how to fix that one when we have steps for it (Limits of the check).
What is port 18789 in OpenClaw?
Port 18789 is the default port of the OpenClaw Gateway. OpenClaw's network exposure docs say the Gateway serves WebSocket and HTTP on that one port. The HTTP side includes the Control UI, the dashboard you open in a browser.
You can change the port with gateway.port, the --port flag or the OPENCLAW_GATEWAY_PORT environment variable. If you changed it, use your port wherever this guide says 18789.
Why it matters if 18789 is reachable from the internet:
- It's the way in to your agent. OpenClaw's docs treat credentials that work on the Gateway's HTTP API as full operator access to that Gateway. If strangers can reach the port, its auth is the only thing between them and that access.
- Where it listens is one setting.
gateway.binddecides this. On regular hosts the default isloopback, so only the same machine can connect. In a detected container with no bind set, the default isauto, which listens on 0.0.0.0 (every interface). Whether that reaches the internet then depends on your published ports and firewall. - OpenClaw's docs advise against direct public port-forwarding. The exposure runbook says that if public access is really needed, an identity-aware proxy should sit in front and be the only network path to the Gateway.
Is port 18789 open to the internet?
Only if two things are true at once: the Gateway listens on more than loopback, and nothing between it and the internet blocks the port. 18789 is the Gateway's default port, and it carries both the Control UI and the agent's control connection.
You can answer it in two steps:
- On the server,
lsof -i :18789shows the listening address.127.0.0.1means local only. - From a different network,
nmap -sT -p 1-65535 <public-ip> --openshows what's actually reachable. Only test machines you own.
No terminal on another network? The 1-minute phone test below is a quick first look.
A closed 18789 isn't the whole answer. Hunt.io found that 47.3% of the control panels it identified were on 18789. The rest were mostly on ports 80 and 443 behind reverse proxies. The server and outside checks below cover both.
Can I test it from outside my network in 1 minute?
Yes, with a phone. This tests one port on one address, so it's a quick first look, not a full scan. Only test machines you own.
- Find your public IP. For a cloud server, it's in your provider's dashboard (DigitalOcean, Hetzner Cloud, AWS). For a machine at home, it's the public (WAN) address on your router's admin page.
- Turn Wi-Fi off on your phone, so it uses mobile data. On your own Wi-Fi you'd be testing from inside your network, which tells you nothing about the internet.
- Open
http://<your-public-IP>:18789in the phone's browser. If the Gateway serves HTTPS itself, also tryhttps://<your-public-IP>:18789.
What the result means:
- A page loads: it's reachable. That includes the OpenClaw dashboard, a login or pairing screen, an error page or a certificate warning. Something answers on 18789 from the internet. Close it with the steps below.
- The browser can't connect or times out: nothing answered on 18789 from that network. That's what you want to see, but it covers only that port. Run the full outside scan to check every port, and open any domain you proxy to the dashboard.
If a page loaded, close it. These steps follow OpenClaw's docs:
- Put the Gateway back on loopback. Run
openclaw gateway stop, thenopenclaw config set gateway.bind loopback, thenopenclaw gateway start. - Remove the public route. That's the cloud firewall or security group rule, the router port forward, or the Docker port publish (for example
-p 18789:18789). - Use a private route for remote access. OpenClaw's runbook recommends loopback plus an SSH tunnel or loopback plus Tailscale Serve. For the tunnel, the remote access docs use
ssh -N -L 18789:127.0.0.1:18789 user@gateway-host, and you then connect to 127.0.0.1:18789 on your own machine. - Repeat the phone test, then work through what to do if it was exposed, starting with rotating your Gateway token and keys.
How many OpenClaw Gateways are exposed?
We found two published counts. They use different methods and dates, so the numbers aren't directly comparable.
| Count | What was counted | Who counted | Date of count | Source |
|---|---|---|---|---|
| About 54,000 | Internet-facing OpenClaw hosts | Censys, 2026 State of the Internet Report | Not stated (report published Oct 14, 2026) | Censys |
| 17,470 | OpenClaw, Clawdbot and Moltbot control panels identified by page title. 8,258 (47.3%) were on port 18789, and 98.6% were on cloud or hosting providers | Hunt.io | Published Feb 3, 2026 | Hunt.io |
A count of reachable Gateways isn't a count of Gateways without auth. Your own setup is the one to check.
How do I check on the server? (2 minutes)
Log in to the machine where the Gateway runs.
1. Run the audit. This is the fastest single check:
openclaw security audit --deep
Look for gateway.bind_no_auth, gateway.tailscale_funnel, gateway.control_ui.allowed_origins_required, browser.control_no_auth or gateway.token_placeholder_value under CRITICAL. Any of them means you should act today. Our openclaw security audit guide explains each one.
2. See what's listening. OpenClaw's install docs use this to find what holds the port:
lsof -i :18789
Look at the address before :18789. 127.0.0.1 or localhost means local only. * or 0.0.0.0 means every network interface, which is exposed unless a firewall blocks it. If you run in Docker, also check the container's published ports. Something like 0.0.0.0:18789->18789 means the port is published on every interface.
3. Check the bind setting.
openclaw config get gateway.bind
loopback is what you want unless you've deliberately set up a tailnet or proxy. openclaw gateway status also shows whether the service is running and reachable, but its default output doesn't prove the Gateway is healthy, so use it alongside the audit, not instead of it.
How do I test from outside? (3 minutes)
The server can only tell you what it's listening on. A firewall in between decides what's actually reachable. So test from somewhere else.
From a different network, scan your server's public IP. This is the check OpenClaw's docs use after firewall changes:
nmap -sT -p 1-65535 <public-ip> --open
Run it from a different machine and network, for example a laptop on a phone hotspot, not from the server itself. Only scan machines you own. You want to see your SSH port and nothing else you didn't intend. If 18789, or 80 and 443 on a box that shouldn't serve web pages, shows as open, you have exposure to explain.
Check your cloud firewall. In DigitalOcean, Hetzner Cloud or AWS, open the firewall or security group attached to the server. There should be no inbound rule for 18789 from 0.0.0.0/0 (anywhere). OpenClaw's Hetzner guide says the cloud firewall only needs to allow SSH.
Don't trust a changed port. Hunt.io found that about half of the exposed instances were *not* on 18789. Many were on 80 and 443 behind a reverse proxy. If you proxy the dashboard to a domain, that domain is the thing to test. Open it in a private browser window: if the OpenClaw dashboard loads for a stranger, it's exposed.
Is a long random URL or a different port enough?
No. Scanners don't guess URLs. They fingerprint what answers. Hunt.io identified OpenClaw instances by the page title, HTTP headers, page hashes and the names of the app's script files. Changing the port or adding a path makes you a little harder to find by hand and no harder to find by machine.
The protections that work are the ones OpenClaw's docs recommend: don't be reachable (loopback plus a tunnel), require a long random token, and keep a firewall that only admits what you meant to admit.
Are Tailscale and SSH tunnels enough?
They're the patterns OpenClaw's exposure runbook recommends, in this order:
- Loopback plus an SSH tunnel. The Gateway listens only on 127.0.0.1, and you forward the port over SSH when you need the dashboard. Nothing is published.
- Loopback plus Tailscale Serve. The Gateway stays on 127.0.0.1, and only devices on your tailnet can reach it over HTTPS. The audit reports this as
gateway.tailscale_serve(info). - Tailnet or LAN bind with auth and a firewall. Reachable on a private network, with a shared secret and tight source-IP rules.
- A trusted reverse proxy that handles identity.
Tailscale Funnel is not on that list for everyday use. It makes the Gateway public, which is why the audit flags it as critical and OpenClaw refuses to start Funnel without a password.
One caveat: not being exposed doesn't cover every risk. CVE-2026-25253, fixed in 2026.1.29, let a crafted link send your Gateway token to an attacker, and its advisory notes it worked even on loopback-only Gateways, because your own browser made the connection. Stay on a current release too.
What should I do if it's exposed?
Work in this order, from OpenClaw's incident response and rollback steps:
- Close it. Stop the Gateway, set
gateway.bindtoloopback, and remove the public route: the firewall rule, the Docker port publish, the proxy site or Funnel. - Rotate. Assume anything the Gateway could see was seen. Make a new Gateway token (
openclaw doctor --generate-gateway-token), then rotate remote client secrets and your model and channel keys at each provider. - Freeze access. Set risky DMs and groups to disabled or mention-only, and remove any
"*"allow-all entries. - Review. Check
openclaw logsand recent config changes (bind, auth, DM policies, elevated tools, plugins) for anything you didn't do. - Re-check. Run
openclaw security audit --deepagain and repeat the outside scan.
For step 1 on a regular install, the docs say to stop the Gateway before changing config with the CLI:
openclaw gateway stop openclaw config set gateway.bind loopback openclaw gateway start
In Docker, change the bind in the container's config, remove the published port, and recreate the container.
If you need remote access again afterward, add it back with the narrowest pattern that works, usually an SSH tunnel or Tailscale Serve. Our VPS guide shows that setup on DigitalOcean, Hetzner and AWS.
Where next?
Exposure is one point on our 12-point security checklist. The others cover keys, tools, skills, versions and bills. For everything OpenClaw-specific, see the OpenClaw hub. Once your audit is clean, you can paste it into the free check for a second read.
Frequently asked questions
What does "exposed" mean for my OpenClaw?
It means the OpenClaw Gateway, which serves the dashboard and the agent's control connection, can be reached from a network you don't control. That's usually the public internet, through a LAN bind, a published Docker port, a reverse proxy or Tailscale Funnel. Reachable with weak or no auth is the worst case.
What is port 18789 in OpenClaw?
It's the OpenClaw Gateway's default port. The Gateway serves WebSocket and HTTP on that one port, including the Control UI dashboard. You can change it with gateway.port, --port or OPENCLAW_GATEWAY_PORT. On regular hosts the Gateway listens only on loopback by default, so 18789 answering from the internet usually means a bind change, a published Docker port, a firewall rule or a port forward.
How do I know if port 18789 is open?
On the server, run lsof -i :18789 and look at the address. 127.0.0.1 or localhost means local only. An asterisk or 0.0.0.0 means every interface. Then confirm from outside with nmap -sT -p 1-65535 <public-ip> --open run from a different network, and check your cloud firewall.
How many OpenClaw Gateways are exposed to the internet?
Counts depend on who counted and how. Censys's 2026 State of the Internet report, published October 14, 2026, counted about 54,000 internet-facing OpenClaw hosts. In February 2026, Hunt.io identified 17,470 OpenClaw, Clawdbot and Moltbot control panels by page title, 8,258 of them on port 18789.
Is a long random URL enough protection?
No. Hunt.io found OpenClaw instances by page title, headers and file fingerprints, on port 18789 and also on 80, 443 and others. Moving the port or path hides nothing from a scanner. Real protection is not being reachable, plus strong auth.
Is Tailscale or an SSH tunnel enough?
They're the setups OpenClaw's docs recommend. Both keep the Gateway on loopback, so nothing listens publicly. Tailscale Serve keeps it inside your tailnet. Funnel is different: it puts the Gateway on the public internet. Keep updating too, since CVE-2026-25253 worked even on loopback-only Gateways.
What should I do if it's exposed?
Set the bind to loopback and close the firewall rule or public route first. Then assume the secrets were seen: rotate the Gateway token or password and your model and channel keys. Review logs with openclaw logs, and re-run openclaw security audit --deep.
Sources
- OpenClaw docs: network exposure
- OpenClaw docs: Gateway exposure runbook
- OpenClaw docs: remote access (SSH tunnel)
- OpenClaw docs: security overview
- OpenClaw docs: security audit checks
- OpenClaw docs: Tailscale
- OpenClaw docs: DigitalOcean install (verify and access steps)
- OpenClaw docs: openclaw gateway status and probe
- OpenClaw docs: operator incident response
- Hunt.io: Hunting OpenClaw exposures, CVE-2026-25253 (Feb 3, 2026)
- Censys: 2026 State of the Internet Report press release (Oct 14, 2026)
- GitHub advisory GHSA-g8p2-7wf7-98mq (CVE-2026-25253)
Get the plain-English agent security brief
Agents & AI Security, explained: a short, plain-English email when we have something useful. Free. Unsubscribe any time.
We'll only use your email to send the newsletter. The newsletter is sent by beehiiv, which records opens and link clicks. Privacy policy.