Web(Gateway)
Gateway は、Gateway WebSocket と同じポートから小さな ブラウザー Control UI(Vite + Lit)を配信します。- デフォルト:
http://<host>:18789/ - 任意のプレフィックス:
gateway.controlUi.basePathを設定します(例:/openclaw)
Webhook
hooks.enabled=true の場合、Gateway は同じ HTTP サーバー上に小さな webhook エンドポイントも公開します。
認証 + ペイロードについては、Gateway configuration → hooks を参照してください。
設定(デフォルトでオン)
Control UI は、アセット(dist/control-ui)が存在する場合、デフォルトで有効 です。
設定で制御できます。
Tailscale アクセス
Integrated Serve(推奨)
Gateway を loopback のままにし、Tailscale Serve にプロキシさせます。https://<magicdns>/(または設定したgateway.controlUi.basePath)
tailnet bind + token
http://<tailscale-ip>:18789/(または設定したgateway.controlUi.basePath)
Public internet(Funnel)
セキュリティに関する注意
- Gateway auth はデフォルトで必須です(token、password、trusted-proxy、または有効時の Tailscale Serve identity header)。
- 非 loopback bind でも 引き続き gateway auth が必要です。実際には、token/password auth、または
gateway.auth.mode: "trusted-proxy"を使う identity-aware reverse proxy を意味します。 - ウィザードはデフォルトで shared-secret auth を作成し、通常は gateway token も生成します(loopback でも)。
- shared-secret モードでは、UI は
connect.params.auth.tokenまたはconnect.params.auth.passwordを送信します。 - Tailscale Serve や
trusted-proxyのような identity-bearing モードでは、 代わりにリクエストヘッダーによって WebSocket auth チェックが満たされます。 - 非 loopback の Control UI デプロイでは、
gateway.controlUi.allowedOriginsを明示的に設定してください(完全な origin)。これがない場合、gateway の起動はデフォルトで拒否されます。 gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback=trueは Host-header origin fallback モードを有効にしますが、危険なセキュリティ低下です。- Serve では、
gateway.auth.allowTailscaleがtrueの場合、 Tailscale identity header が Control UI/WebSocket auth を満たせます(token/password 不要)。 HTTP API エンドポイントはそれらの Tailscale identity header を使わず、代わりに gateway の通常の HTTP auth モードに従います。明示的な資格情報を必須にするにはgateway.auth.allowTailscale: falseを設定してください。詳細は Tailscale と Security を参照してください。この token なしフローは、gateway host が信頼されていることを前提とします。 gateway.tailscale.mode: "funnel"ではgateway.auth.mode: "password"(shared password)が必要です。
UI のビルド
Gateway はdist/control-ui から静的ファイルを配信します。ビルドするには: