Repository navigation
Description
I have OpenClaw running on macOS and exposed to my tailnet using tailscale serve. The dashboard loads fine in a browser via the Serve URL, but the openclaw-windows-hub app cannot connect, even when I try wss://.
This looks like the Windows Hub assumes a local gateway (ws://localhost:18789) and/or assumes it can reach the gateway on the backend port, which breaks when the gateway is behind Tailscale Serve (HTTPS on 443 proxying to 127.0.0.1:18789).
Environment
- Host: macOS (OpenClaw gateway running locally on
127.0.0.1:18789) - Exposure: Tailscale Serve (tailnet only)
- Client: Windows 11, same tailnet, using openclaw-windows-hub
Tailscale Serve status (host)
tailscale serve status shows:
https://mekbook.tail1e276.ts.net (tailnet only)
|-- / proxy http://127.0.0.1:18789
What works
- From Windows browser:
https://mekbook.tail1e276.ts.net/loads the OpenClaw dashboard successfully
What doesn't work
- From Windows browser:
- WebSocket functionality in the dashboard does not work (UI loads but the app is non-functional because WS doesn't connect)
- From openclaw-windows-hub:
- Cannot connect to the gateway via the Serve hostname
- Trying
ws://mekbook.tail1e276.ts.net:18789fails (Serve does not expose the backend port) - Trying
wss://mekbook.tail1e276.ts.net/...also fails (likely because the app assumes localhost/port/path and/or does not support remote HTTPS/WSS properly)
Expected behavior
Windows Hub should be able to connect to a gateway exposed via Tailscale Serve by using:
https://<host>.tail*.ts.net/for the base URL, andwss://<host>.tail*.ts.net/<ws-path>for WebSockets,
without assuminglocalhostor:18789.
Suspected root cause
- Windows Hub hardcodes or defaults to
ws://localhost:18789(or otherwise assumes local gateway semantics) - No proper support for remote
https:///wss://gateway URLs - Possibly constructs WS URLs incorrectly when the gateway is accessed via HTTPS (mixed content, wrong port, wrong origin)
Suggested fix
- Allow configuring a remote base URL (
https://...) and derive the WS URL from it:- Prefer same-origin
wss://when base is HTTPS - Do not append
:18789when using Tailscale Serve (Serve is on 443 and proxies internally)
- Prefer same-origin
- Improve logging/error reporting for the WS connection attempt (show the computed WS URL and the close reason)
Repro steps
- Run OpenClaw gateway on macOS bound to
127.0.0.1:18789 - Expose with
tailscale serve:https://<host>.tail*.ts.net/->http://127.0.0.1:18789
- On Windows (same tailnet), open
https://<host>.tail*.ts.net/(dashboard loads) - Try using openclaw-windows-hub to connect to that gateway (fails; WS doesn't connect)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
gavinfaux commentedon Feb 17, 2026
Just a note, wss: works for me, e.g. wss://device.tail-your-id.ts.net/
Fix issue #19 gateway URL normalization
shanselman commentedon Feb 17, 2026
Fixed in f78d2ed: shared GatewayUrlHelper now normalizes ws/wss/http/https consistently across OpenClawGatewayClient and WindowsNodeClient, with settings validation updated and tests added.