openclaw-windows-node icon indicating copy to clipboard operation
openclaw-windows-node copied to clipboard

Feature Request: Remote gateway node mode — connect Windows as exec/filesystem node to remote gateway

Open AS76 opened this issue 5 months ago • 3 comments

Scenario

I run OpenClaw gateway on a remote VPS (with Cleo as my main agent). I want my Windows laptop to connect as a node to that remote gateway, so the remote agent can execute commands (exec host=node) and access files on the Windows machine — without installing a full local gateway.

Use case

Corporate laptop, restricted IT policy. Cannot install Node.js or run background services. Need a lightweight, portable Windows node client that:

  1. Connects via WebSocket to a remote gateway
  2. Is approved via device pairing
  3. Exposes exec capability to the remote gateway (exec host=<node>)
  4. Ideally supports read/write/edit tools on the local Windows filesystem (or via exec + PowerShell)

Current state

openclaw-windows-node connects to a local gateway only. It has "Node Observability" for monitoring, but there is no "node-only" mode that connects to a remote gateway and exposes the Windows machine as an exec/filesystem endpoint for a remote agent.

Requested feature

Add a "remote node" mode (or a separate lightweight client) that:

  • Connects to a remote gateway URL (configurable, wss://...)
  • Authenticates via device pairing bootstrap token
  • Registers as role: node on the remote gateway
  • Allows exec host=node commands from the remote gateway, running on the Windows machine
  • Optionally exposes file system operations (read/write/copy) through the node

This would enable a powerful hybrid architecture: remote gateway for orchestration (multi-agent, 24/7 availability) + local Windows node for filesystem and native execution.

AS76 avatar Jun 03 '26 12:06 AS76

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Current main already has the requested remote Windows node path: a configured gateway record can connect the tray as a node to a remote gateway, pair with device credentials/bootstrap credentials, advertise node capabilities, and handle remote system.run invocations. The optional direct file read/write/edit tools are not a separate capability, but the request explicitly allowed filesystem access via exec plus PowerShell, which the shipped implementation supports.

I found the merged PR that appears to have closed this: #567: Chat: render in-bubble Allow/Deny approval banner + harden plumbing.

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review details

Best possible solution:

Keep the shipped tray Node Mode as the supported remote Windows node path, using system.run plus PowerShell for filesystem access unless maintainers later design a separate first-class file capability.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a feature request, not a broken existing-behavior report. The current-main source/docs/tests verify the requested remote node workflow instead of a failing reproduction path.

Is this the best way to solve the issue?

Yes: the existing manager-owned tray Node Mode is the narrowest maintainable solution because it reuses GatewayConnectionManager, GatewayRegistry, NodeConnector, pairing, allowCommands, and exec approval policy instead of adding a parallel client path.

Security review:

Security review cleared: No patch is under review; the shipped implementation is security-sensitive but includes explicit node enablement, pairing credentials, gateway allowCommands, and local exec approval policy gates.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: AGENTS.md was read fully and its connection, pairing, credential-precedence, and GatewayConnectionManager ownership guidance was applied to this review. (AGENTS.md:1, 53ff55aff974)
  • Documented remote node behavior: The README documents Node Mode making the Windows PC a controllable node, pairing the device on the gateway, configuring gateway.nodes.allowCommands, and invoking system.run on the Windows node from the gateway side. (README.md:190, 53ff55aff974)
  • Node-only gateway connection source: GatewayConnectionManager exposes ConnectNodeOnlyAsync, prepares a node-only connection from a configured gateway record, resolves node credentials, supports tunnel-backed remote gateways, and starts the node connector against the remote URL. (src/OpenClaw.Connection/GatewayConnectionManager.cs:104, 53ff55aff974)
  • Node client role and pairing/invoke source: WindowsNodeClient identifies itself with ClientRole => "node", initializes stable device identity, accepts bootstrap/shared/device-token credentials, handles pairing events, and dispatches node.invoke.request to registered capabilities. (src/OpenClaw.Shared/WindowsNodeClient.cs:108, 53ff55aff974)
  • Exec capability source: SystemCapability advertises system.run and system.run.prepare, parses command/cwd/shell/timeout arguments, checks exec approval policy, and runs through the configured command runner. (src/OpenClaw.Shared/Capabilities/SystemCapability.cs:20, 53ff55aff974)
  • Regression coverage: Connection tests cover node-only startup using a node credential without an operator credential, including remote/tunnel gateway handling; shared tests also cover node role handshakes and node.invoke request handling. (tests/OpenClaw.Connection.Tests/GatewayConnectionManagerTests.cs:501, 53ff55aff974)

Likely related people:

  • RBrid: Git blame for the documented Node Mode workflow, node role/invoke handling, and startup node-only connection path points to the same shipped proof commit attributed to this contributor. (role: current implementation contributor; confidence: high; commits: 7d9152f427a3; files: README.md, src/OpenClaw.Shared/WindowsNodeClient.cs, src/OpenClaw.Tray.WinUI/App.xaml.cs)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 53ff55aff974; fix evidence: merged PR #567, release v0.6.0, commit 7d9152f427a3.

clawsweeper[bot] avatar Jun 03 '26 12:06 clawsweeper[bot]

I tested the remote gateway node mode and hit a few roadblocks. Possibly I am missing something in the setup — opening this to track.

Environment:

  • Gateway: VPS behind Traefik (wss:// via Let's Encrypt)
  • Client: OpenClaw Windows Hub v0.6.0, Node Mode enabled

What works:

  • Device (operator) connection via wss:// ✅
  • Paired device shows on gateway ✅
  • Control UI session over remote WebSocket ✅

What I couldn't get to work:

  • Node Mode on the remote connection ❌
  • After device pairing approval, the node token appears with empty scopes [] while the operator token gets proper scopes. Manually fixing scopes in paired.json gets the node to paired status but never to connected.
  • The Windows tray UI stays in Awaiting approval state even after device approval completes.
  • openclaw devices rotate --role node returns device token rotation denied
  • openclaw nodes approve returns unknown requestId — node-specific pairing requests never appear as pending.

Setup steps tried:

  1. Added gateway URL + auth token → device paired ✅
  2. Device approved via openclaw devices approve ✅
  3. Node Mode toggled ON in tray settings
  4. Node stays disconnected / awaiting approval
  5. Also tried setup code (openclaw qr --setup-code-only with --public-url and --token) → same outcome
  6. SSH tunnel fallback (ssh -L 18789:...) — blocked by corporate network

Question: Is there a specific setup for remote node connections that differs from local node mode? Or should the Node Mode work out of the box once the device is paired to a remote gateway?

Happy to provide more details / test a fix if needed.

AS76 avatar Jun 03 '26 14:06 AS76

I cannot reopen this issue myself (lack permissions on the org repo). Could a maintainer please reopen? Happy to provide more details about the remote node pairing issue.

AS76 avatar Jun 03 '26 14:06 AS76