You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The manual Docker setup documented at https://docs.openclaw.ai/install/docker fails with multiple issues that prevent the CLI from connecting to the gateway and the web UI from working properly.
The docker-compose.yml file has the openclaw-cli and openclaw-gateway services in separate containers. Both share the same config volume which has gateway.mode=local and gateway.bind=loopback. This causes the CLI to try connecting to 127.0.0.1:18789, which is the CLI container's own loopback interface, not the gateway container.
Expected behavior
The CLI should be able to communicate with the gateway container out of the box.
Actual behavior
CLI cannot connect to gateway: connect ECONNREFUSED 127.0.0.1:18789
Web UI shows repeated unauthorized and closed before connect errors in gateway logs
Manual workarounds required to make it work
Additional issues encountered
Token mismatch: The onboarding process creates a token in openclaw.json that differs from OPENCLAW_GATEWAY_TOKEN in .env, causing authentication failures
Summary
The manual Docker setup documented at https://docs.openclaw.ai/install/docker fails with multiple issues that prevent the CLI from connecting to the gateway and the web UI from working properly.
Steps to reproduce
docker compose up -d openclaw-gatewaydocker compose run --rm openclaw-cli statusGateway unreachable (connect failed: connect ECONNREFUSED 127.0.0.1:18789)Root cause
The
docker-compose.ymlfile has theopenclaw-cliandopenclaw-gatewayservices in separate containers. Both share the same config volume which hasgateway.mode=localandgateway.bind=loopback. This causes the CLI to try connecting to127.0.0.1:18789, which is the CLI container's own loopback interface, not the gateway container.Expected behavior
The CLI should be able to communicate with the gateway container out of the box.
Actual behavior
connect ECONNREFUSED 127.0.0.1:18789unauthorizedandclosed before connecterrors in gateway logsAdditional issues encountered
openclaw.jsonthat differs fromOPENCLAW_GATEWAY_TOKENin.env, causing authentication failuressudo chown -R 1000:1000 ~/.openclaw(related to [Bug]: "plugin not found" error due to EACCES permission issues in Docker image #5450)Workaround
Add
network_mode: "service:openclaw-gateway"to theopenclaw-cliservice indocker-compose.yml:Suggested fixes
docker-compose.ymlwith the network_mode fix.envandopenclaw.jsonEnvironment
Related issues