How to Fix Browser Bridge Timeout in OpenClaw Sandboxed Agents
TL;DR โ Quick Fix
The browser bridge binds to 127.0.0.1 by default, making it unreachable from your Docker container; you must force it to bind to 0.0.0.0 instead.
Run DiagnosticsNext Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
Error Signal
Can't reach the openclaw browser control service (timed out after 20000ms)What's Happening
Your OpenClaw agent is timing out with the message: "Can't reach the openclaw browser control service (timed out after 20000ms)." This happens because the browser bridge server defaults to 127.0.0.1 (localhost). When your agent runs inside a Docker container, 'localhost' points to the container itself, not the gateway host where the bridge is actually running.
The Fix
You need to force the bridge to listen on all interfaces. Locate your browser.js file inside your OpenClaw installation and update the startBrowserBridgeServer call.
Run this command to automate the patch:
sed -i 's/return await startBrowserBridgeServer({/return await startBrowserBridgeServer({\n host: "0.0.0.0",/' $(find /path/to/openclaw -name "browser.js" -path "*/sandbox/*")
If you prefer to edit the file manually, open agents/sandbox/browser.js and add host: "0.0.0.0" to the options object passed to startBrowserBridgeServer().
Why This Occurs
In browser/bridge-server.js, the default host is explicitly set to 127.0.0.1. Because agents/sandbox/browser.js invokes this server without overriding the host parameter, the bridge ignores external requests. Docker containers isolate network namespaces, so the agent container cannot reach the host's loopback interface. By binding to 0.0.0.0, the service accepts connections from any interface, including the bridge network used by Docker.
Prevention
Always ensure that services meant to be accessed by Dockerized agents are bound to the host's public bridge IP or 0.0.0.0 rather than loopback. This is a common pitfall in containerized architectures. If you deploy using custom Docker bridge configurations, verify your network settings allow communication between the agent container and the host service port.
Last Updated: March 2026
Did this guide solve your problem?