Run a remote worker on any machine to let Claw’d agents execute file tools (view, edit, create, grep, glob, bash) there via a WebSocket reverse tunnel.
Three implementations:
All three speak the same protocol and offer identical functionality, including 24 browser automation tools when started with --browser.
# Using Bun (recommended)
CLAWD_WORKER_TOKEN=your-token bun packages/clawd-worker/typescript/remote-worker.ts \
--server wss://your-clawd-server.example.com
# Using Node.js 22.4+ (with tsx)
CLAWD_WORKER_TOKEN=your-token npx tsx packages/clawd-worker/typescript/remote-worker.ts \
--server wss://your-clawd-server.example.com
CLAWD_WORKER_TOKEN=your-token python3 packages/clawd-worker/python/remote_worker.py \
--server wss://your-clawd-server.example.com
javac --source 21 --enable-preview packages/clawd-worker/java/RemoteWorker.java
CLAWD_WORKER_TOKEN=your-token java --enable-preview -cp packages/clawd-worker/java RemoteWorker \
--server wss://your-clawd-server.example.com
| Flag | Default | Description |
|---|---|---|
--server <url> |
(required) | Claw’d server WebSocket URL |
--token <token> |
$CLAWD_WORKER_TOKEN |
Authentication token |
--project-root <path> |
cwd | Root directory for file operations |
--name <name> |
hostname | Worker display name |
--read-only |
false | Disable edit, create, bash tools |
--browser |
false | Enable remote browser automation via CDP |
--timeout <ms> |
30000 | Default tool timeout (bash uses 300s) |
--max-concurrent <n> |
4 | Max parallel tool calls |
--reconnect-max <s> |
300 | Max reconnect backoff delay |
--insecure |
false | Disable TLS certificate verification (dev only) |
--ca-cert <path> |
— | Custom CA certificate file |
Token precedence: --token flag > CLAWD_WORKER_TOKEN env var.
Use env var for tokens — CLI arguments are visible in ps aux.
Add worker to ~/.clawd/config.json:
{
"worker": true
}
Or for channel-specific tokens:
{
"worker": {
"dev-team": ["wkr_abc123", "wkr_def456"],
"staging": ["wkr_staging_789"]
}
}
true — accept any non-empty token on all channels{ channel: [tokens] } — only listed tokens accepted per channelConfig changes are hot-reloaded within 5 seconds.
In the Agents dialog, set the Worker field to the same token the worker uses. The agent will then execute file tools on that remote worker instead of locally.
taskkill /PID /T /F/tmp resolves to /private/tmp automaticallyulimit warning at startup — run ulimit -n 10240 for better performance/Applications/Python 3.x/Install Certificates.command/proc/version containing “microsoft”/mnt/c/...) use case-insensitive comparisonchmod is a no-op on DrvFs — use native Linux paths when possiblewss://localhost:PORT (WSL2 shares host network).py files are rarely blocked by AppLocker--ca-cert for corporate proxy CAs, or set SSL_CERT_FILE env varNODE_EXTRA_CA_CERTS=/path/to/ca-bundle.pem--insecure disables TLS verification (development only, prints loud warning).env*, .pem, .key, SSH keys, credentials.env access patternserrors="replace" (no crashes on binary)Authorization header (not query string)[Unit]
Description=Clawd Remote Worker
After=network.target
[Service]
Type=simple
User=deploy
Environment=CLAWD_WORKER_TOKEN=your-token
ExecStart=/usr/bin/python3 /opt/clawd-worker/remote_worker.py --server wss://clawd.example.com --project-root /home/deploy/project
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.clawd.remote-worker</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python3</string>
<string>/opt/clawd-worker/remote_worker.py</string>
<string>--server</string>
<string>wss://clawd.example.com</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>CLAWD_WORKER_TOKEN</key>
<string>your-token</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>