#17645: fix: browser control service actually start HTTP server in Docker
gateway
stale
size: XS
Cluster:
Docker and Deployment Improvements
## Summary
The browser control service was not binding to port 18791 in Docker deployments because the gateway was importing from `control-service.js` by default, which exports `startBrowserControlServiceFromConfig` that does NOT start an HTTP server - it just logs "ready" and returns.
Changed the default import to `server.js`, which exports `startBrowserControlServerFromConfig` that actually binds to the port.
## Changes
- Changed default import in `src/gateway/server-browser.ts` from `"../browser/control-service.js"` to `"../browser/server.js"`
## Testing
- Build completed successfully
- The fix restores the behavior that was accidentally changed in commit e7fdccce3
Fixes openclaw/openclaw#17584
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixed a critical bug where the browser control service wasn't actually starting an HTTP server in Docker deployments. The gateway was importing from `control-service.js` which only initializes state and logs "ready" without binding to port 18791. Changed the default import to `server.js` which properly creates an Express server and binds to the port. The code already has fallback logic to handle both function names (`startBrowserControlServiceFromConfig` and `startBrowserControlServerFromConfig`), so this change is backward compatible with custom module overrides.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no risk
- This is a straightforward one-line fix that correctly addresses the root cause. The code already has proper fallback logic to handle both the old and new function names, ensuring backward compatibility. The change restores the intended behavior of actually starting an HTTP server on port 18791 instead of just initializing state. No tests need updating since the test harness already imports from `server.js` directly.
- No files require special attention
<sub>Last reviewed commit: f6db123</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#13950: fix(docker): add browser sidecar service and health checks
by n24q02m · 2026-02-11
77.6%
#17506: Fix Entrypoint in docker-compose
by NeilSCGH · 2026-02-15
76.9%
#6638: fix: make Dockerfile work on container platforms (Render, Railway, ...
by kaizen403 · 2026-02-01
75.7%
#11553: feat(docker): add sandbox browser service and documentation
by dangphdh · 2026-02-08
75.0%
#11435: fix(security): validate OPENCLAW_BROWSER_CONTROL_MODULE before dyna...
by coygeek · 2026-02-07
74.7%
#21000: fix: resolve option collision between browser and cookies set commands
by MisterGuy420 · 2026-02-19
74.6%
#12504: fix: allow docker cli container to connect to gateway
by bvanderdrift · 2026-02-09
74.3%
#23666: fix(doctor): openclaw-browser.service falsely flagged as duplicate ...
by yinghaosang · 2026-02-22
74.2%
#8478: Security: remove --allow-unconfigured from default Dockerfile CMD
by uttej-badwane · 2026-02-04
74.2%
#17753: fix: Control UI unusable over HTTP - missing scopes
by MisterGuy420 · 2026-02-16
73.8%