dl-openclaw.is
English
简体中文繁體中文EnglishРусскийفارسی

HomeArticlesSecurity

Port 18789, wide open

In early 2026 security firms found tens of thousands, then more than a hundred thousand OpenClaw Gateways on the public internet, many open to remote code execution and leaking API keys. Why it happened, what the defaults are now, and how to check whether yours is exposed.

Updated

A door left wide open: a dashboard open to the internet is a key left in the front door
A door left wide open: a dashboard open to the internet is a key left in the front door Morrowlong, CC BY-SA 4.0

OpenClaw's Gateway can read and write files, run commands, and use every model and chat account you have configured. If its dashboard is open to the whole internet, anyone who scans it has a chance to take over your assistant, your API keys, even your computer. From late January to February 2026, this happened at scale.

What does an exposed Gateway mean? The dashboard shows all your sessions and memory, can change the configuration and can add scheduled jobs; the configuration holds your model API keys and chat bot tokens; the assistant's tools can read and write files and run commands. Once inside, an attacker can read your chat history, message your contacts as your bot, call models with your keys, and add a scheduled job to stay hidden for the long term.

How many were found

SourceWhenCount
CensysAs of 31 January 202621,639, up from about 1,000 in under a week
Bitsight27 January to 8 FebruaryMore than 30,000
SecurityScorecardFebruaryOver 40,000 when first published, more than 135,000 days later, 12,812 of them open to remote code execution
Hunt.ioFebruaryOf 17,470 instances, only 47.3% were on the default port 18789; most others sat on 80 and 443

The firms used different methods and dates, so the numbers are not directly comparable, but the trend is clear: as the project went viral, exposure grew a hundredfold within weeks. A honeypot run by Pillar Security saw attackers arrive within minutes to hours, and they treated the Gateway as an API service, going after the control plane rather than chatting with the assistant. Others found that some users' third-party API keys had leaked through exposed dashboards.

Why they were exposed

InternetGateway :18789 ? × 127.0.0.1 Loopback only (default)Nobody outside can connect You 127.0.0.1 SSH tunnel or Tailscale ServeIn after auth, inside an encrypted channel 0.0.0.0 Bound to 0.0.0.0 with a port forwardAnyone on the internet can find 18789
Three ways to connect

The most common story: someone wanted to open the dashboard from their phone or from outside, so they bound the Gateway to all interfaces (0.0.0.0) and opened the port on their router or cloud server, or put it behind a reverse proxy on 80 or 443 without authentication. Some security teams also pointed out at the time that the default binding in some install paths was not conservative enough.

Things are different now. Per OpenClaw's current docs, a regular install binds to loopback by default; binding to anything else requires configured authentication, or the Gateway refuses to start; and onboarding creates a token by default, so even local access is authenticated. Old versions, old tutorials and hand-edited configs can still leave the door open, though.

A key left in the door lock: when the dashboard is exposed, the token is the last lock
A key left in the door lock: when the dashboard is exposed, the token is the last lock Belchers Albert, CC BY-SA 3.0

Check your Gateway

Self-check
openclaw gateway status
openclaw security audit
  1. openclaw security audit checks bind address, authentication and channel permissions; follow its suggestions.
  2. Check gateway.bind in the config: use loopback unless you have a specific need.
  3. Delete rules allowing 18789 on your router and in your cloud server's security group.
  4. From mobile data (not your home Wi-Fi), try your public IP on port 18789. It should not open.
  5. If it was ever exposed, replace the Gateway token, revoke all API keys and bot tokens, and look for unfamiliar sessions and scheduled jobs in the dashboard.

For the right way to connect remotely, see remote access: an SSH tunnel or Tailscale Serve, with the Gateway always on loopback.

Extra care on cloud servers and Docker

  • Cloud security groups: some providers' default rules are broad, or you opened every port while debugging and forgot to close them. Review inbound rules before going live.
  • Docker port publishing: with -p 18789:18789, Docker binds the port on every interface and bypasses host firewall rules such as ufw. For local-only access, write -p 127.0.0.1:18789:18789.
  • Reverse proxies: when putting the Gateway behind Nginx or Caddy on a domain, configure gateway.trustedProxies as the docs describe, and do not switch authentication off just to "make it open".

There will always be vulnerabilities

Security researchers have tracked vulnerabilities aimed specifically at internet-facing Gateways, such as CVE-2026-25253. However fast such bugs are fixed, the fix only protects those who have upgraded. Staying off the public internet also keeps out every vulnerability not yet discovered. So step one is closing the door; step two is upgrading to the latest version.

How to tell whether someone got in

  • openclaw devices list: any devices you do not recognise.
  • The session list in the dashboard: any sessions you did not start.
  • The scheduled job list: any jobs you did not add.
  • openclaw logs --follow and older logs: connections from unfamiliar IPs.

If anything looks wrong, treat it as a compromise: stop the Gateway, revoke all keys and tokens, and start again from a clean configuration.

Is a less common port safe?

No. In Hunt.io's count about half the instances were not on 18789 and were found anyway. Scanners sweep whole port ranges and look for page fingerprints.

I set a token; is putting it online a problem?

A token is a lock, but going public lets the whole world try that lock and exposes any vulnerability found later. The docs recommend Tailscale Serve or an SSH tunnel; there is no reason to take the risk.

I only use it on my LAN; does this apply?

It depends on who else is on the LAN. Offices, dorms and public Wi-Fi are not trusted networks. When binding to a LAN address, let a firewall admit only a few fixed devices.

What should I watch for when running it in Docker?

Always publish the port as 127.0.0.1:18789:18789, mount the data folder on the host and back it up. For remote access, again use an SSH tunnel or Tailscale rather than opening the container's port to the internet.

Read next

Also worth reading

Topics on this page: OpenClaw exposed, OpenClaw port 18789, OpenClaw internet exposure