Skip to content

[Bug]: WebSocket server doesn't bind to LAN interface when gateway.bind=lan #11329

@petehannam

Description

@petehannam

Summary

Dashboard shows "disconnected from gateway" on LAN devices when gateway.bind="lan"

Steps to reproduce

  1. Configure gateway.bind = "lan" in openclaw.json
  2. Restart gateway service
  3. Access http://192.168.x.xxx:18789 from another device on local network (PC, phone, etc.)
  4. Dashboard HTML loads but immediately shows "disconnected from gateway" error

Expected behavior

Control UI should work over local network when gateway.bind = "lan" is configured

Actual behavior

  • HTTP server correctly binds to *:18789 (confirmed working)
  • WebSocket connections fail from LAN devices
  • Gateway status shows WebSocket probe still targeting ws://127.0.0.1:18789 instead of binding to all interfaces
  • Dashboard works perfectly when accessed via http://localhost:18789 on the host machine

Environment

  • Clawdbot version: 2026.2.6-3
  • OS: macOS 26.2 (arm64)
  • Install method: pnpm (via openclaw gateway install)

Logs or screenshots

Gateway: bind=lan (0.0.0.0), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Listening: *:18789

HTTP server binds correctly to all interfaces (*:18789) but WebSocket server appears to remain on localhost only (ws://127.0.0.1:18789).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions