Skip to content

feat: support remote OpenClaw gateway via Tailscale#310

Open
bluwavesd wants to merge 1 commit intoValueCell-ai:mainfrom
bluwavesd:feat/remote-gateway-tailscale
Open

feat: support remote OpenClaw gateway via Tailscale#310
bluwavesd wants to merge 1 commit intoValueCell-ai:mainfrom
bluwavesd:feat/remote-gateway-tailscale

Conversation

@bluwavesd
Copy link

@bluwavesd bluwavesd commented Mar 5, 2026

Summary

Add configurable gateway host and remote token to connect ClawX to a remote OpenClaw instance over Tailscale (or any network).

Changes

  • Settings: Add gatewayHost and gatewayRemoteToken to persisted app settings
  • GatewayManager: Skip local process management for remote hosts (no spawning, port scanning, Python checks, or config repair) — connect directly via WebSocket
  • Auth: Connect handshake omits device identity for remote hosts to avoid 'pairing required' errors (token-only auth)
  • Refactor: Extract buildConnectFrame() into testable module with 4 unit tests
  • UI: Host input + Remote Gateway Token input (appears when host is non-localhost) in Settings > Gateway
  • Control UI: URL uses configured host instead of hardcoded 127.0.0.1
  • i18n: English strings for new fields

How to use

  1. Settings > Gateway > set Host to Tailscale IP (e.g. 100.x.y.z)
  2. Paste the remote gateway token from ~/.openclaw/openclaw.jsongateway.auth.token
  3. Save — ClawX reconnects to the remote instance

Testing

  • pnpm run typecheck
  • pnpm run lint
  • pnpm test — 86 tests pass (including 4 new remote gateway tests)

Add configurable gateway host and remote token to connect ClawX to a
remote OpenClaw instance over Tailscale (or any network).

Changes:
- Add gatewayHost and gatewayRemoteToken to persisted app settings
- Add host field to GatewayStatus type (electron + renderer)
- GatewayManager skips local process management for remote hosts
  (no spawning, port scanning, Python checks, or config repair)
- All WebSocket URLs use the configurable host
- Connect handshake omits device identity for remote hosts to avoid
  'pairing required' errors (token-only auth)
- Extract buildConnectFrame() into testable module with 4 unit tests
- Settings UI: Host input + Remote Gateway Token input (appears when
  host is non-localhost) in the Gateway settings card
- Control UI URL uses configured host
- i18n strings for new fields

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant