Running Headless Nodes with OpenClaw
Setting up automation across multiple machines often feels like a chore. I usually find myself wanting to run specific commands on a remote Linux box or a build server without installing a heavy UI app on every single device. It gets messy when you have to manage different environments manually and keep everything secure.
I prefer a way to delegate tasks to other hosts while keeping the execution sandboxed and controlled. Using a headless node host solves this by connecting to your Gateway and exposing specific system functions to your agents.
What You’ll Need
Section titled “What You’ll Need”- The
openclawCLI installed on your target machine. - A running Gateway to connect to.
- Access to your local configuration files in
~/.openclaw/. - Network connectivity between the node and the gateway host.
Quick Start
Section titled “Quick Start”To get a node running in the foreground, I use the run command. This is the fastest way to see if your connection works.
openclaw node run --host <gateway-host> --port 18789If you need the node to stay active after you close your terminal, I recommend installing it as a user service. You can specify the runtime, such as node or bun.
openclaw node install --host <gateway-host> --port 18789 --runtime nodePairing the Node
Section titled “Pairing the Node”The first time you connect, the Gateway creates a pending request. I use these commands to find the ID and approve the connection:
openclaw nodes pendingopenclaw nodes approve <requestId>Managing the Service
Section titled “Managing the Service”Once the service is installed, you can control it with these four commands:
openclaw node statusopenclaw node stopopenclaw node restartopenclaw node uninstall
Configuration Options
Section titled “Configuration Options”The node host automatically handles a browser proxy. If you want to turn this off, you can update your configuration:
{ nodeHost: { browserProxy: { enabled: false, }, },}You can also use additional flags during setup to customize the connection:
--tls: Use TLS for the gateway connection.--tls-fingerprint <sha256>: Set the expected certificate fingerprint.--node-id <id>: Override the node ID.--display-name <name>: Set a custom name for the node.
Troubleshooting
Section titled “Troubleshooting”- Connection Pending: If the node doesn’t appear active, check
openclaw nodes pendingon the Gateway. You must manually approve the first connection. - Permission Denied: Execution is gated by local approvals. Check your
~/.openclaw/exec-approvals.jsonfile or runopenclaw approvals --node <id|name|ip>from the Gateway to edit permissions.
For more help with your specific setup, visit the AI Setup Assistant.
What’s Next
Section titled “What’s Next”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.