@ssdavidai/zoclaw 1.3.0-next.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -44
- package/package.json +1 -1
- package/scripts/bootstrap.sh +12 -1
package/README.md
CHANGED
|
@@ -1,78 +1,92 @@
|
|
|
1
1
|
# zoclaw
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run AI agents on your [Zo](https://zo.computer) machine and control them from anywhere on your private network.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
zoclaw connects [OpenClaw](https://openclaw.ai) (an open-source AI agent platform) to [Tailscale](https://tailscale.com) (a private mesh VPN) on a Zo machine. After setup, you get:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- **A terminal UI** to chat with your AI agent over SSH or directly on the machine
|
|
8
|
+
- **A browser Control UI** accessible from any device on your tailnet (laptop, phone, tablet) — no port forwarding, no public exposure
|
|
9
|
+
- **A supervised gateway** that auto-restarts on crash or container reboot
|
|
10
|
+
- **Zo-native secrets management** — API keys and tokens stored in `/root/.zo_secrets`, not scattered across config files
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
npm install -g @ssdavidai/zoclaw && zoclaw init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Or via git:
|
|
12
|
+
## Quick start
|
|
14
13
|
|
|
15
14
|
```bash
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
./setup.sh
|
|
15
|
+
npm install -g @ssdavidai/zoclaw
|
|
16
|
+
zoclaw init
|
|
19
17
|
```
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
The setup walks you through five steps:
|
|
22
20
|
|
|
23
|
-
1.
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
28
|
-
6. Prints your Control UI URL and offers to launch the TUI
|
|
21
|
+
1. **Tailscale auth key** — prompts for one, or reuses the key already in zo secrets
|
|
22
|
+
2. **Tailscale install** — sets up the VPN sidecar via [zotail](https://github.com/ssdavidai/zotail)
|
|
23
|
+
3. **OpenClaw install** — installs the agent platform
|
|
24
|
+
4. **Onboarding** — interactive wizard to pick your AI provider and model
|
|
25
|
+
5. **Bootstrap** — configures the gateway for secure tailnet access and registers it as a service
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
At the end, you'll see your Control UI URL and can launch the TUI immediately.
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
### First browser connection
|
|
30
|
+
|
|
31
|
+
The first time you open the Control UI from another device on your tailnet, you need to approve the device once:
|
|
33
32
|
|
|
34
33
|
```bash
|
|
35
34
|
openclaw devices list
|
|
36
35
|
openclaw devices approve <request-id>
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
Refresh the browser and you're in. This is a one-time step per device.
|
|
40
39
|
|
|
41
|
-
##
|
|
40
|
+
## Development channel
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
To test in-development versions:
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g @ssdavidai/zoclaw@next
|
|
46
|
+
zoclaw init --next
|
|
47
|
+
```
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
The `--next` flag pulls `@next` versions of dependencies. Without it, stable `@latest` versions are used.
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
## Managing the gateway
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
The gateway runs as a supervised service — it starts automatically and restarts on failure.
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
```bash
|
|
56
|
+
# Check status
|
|
57
|
+
supervisorctl -c /etc/zo/supervisord-user.conf status openclaw-gateway
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
| Invalid `denyCommands` entries | Removes the ineffective default entries |
|
|
62
|
-
| Credentials dir readable by others | `chmod 700 ~/.openclaw/credentials` |
|
|
59
|
+
# Restart
|
|
60
|
+
supervisorctl -c /etc/zo/supervisord-user.conf restart openclaw-gateway
|
|
61
|
+
|
|
62
|
+
# View logs
|
|
63
|
+
tail /dev/shm/openclaw-gateway.log
|
|
64
|
+
```
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
## How it works
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
A fresh `openclaw configure` on Zo doesn't work with Tailscale out of the box. Tailscale Serve terminates TLS on the edge and proxies to your gateway as plain HTTP on loopback. The gateway sees a localhost socket but a remote-looking `Host` header (your `.ts.net` hostname), misclassifies the connection, and rejects it.
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
|---|---|
|
|
70
|
-
| `zoclaw init` | Full setup from scratch (Tailscale + OpenClaw + bootstrap) |
|
|
71
|
-
| `zoclaw bootstrap` | Config patches only (if OpenClaw and Tailscale are already installed) |
|
|
70
|
+
zoclaw fixes this by patching the gateway config to:
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
- Use OpenClaw's native Tailscale Serve integration (`gateway.tailscale.mode: "serve"`)
|
|
73
|
+
- Trust Tailscale identity headers for browser connections (`gateway.auth.allowTailscale`)
|
|
74
|
+
- Trust localhost as a reverse proxy (`gateway.trustedProxies`) so forwarded headers are honored
|
|
75
|
+
- Enable the browser Control UI
|
|
76
|
+
- Set the agent workspace to `/home/workspace/` (Zo standard)
|
|
77
|
+
- Migrate secrets (gateway token, API keys) to zo secrets
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
The bootstrap uses a **two-phase restart** because `trustedProxies` and local device auto-pairing conflict. When `127.0.0.1` is listed as a trusted proxy, the gateway treats direct CLI connections as proxy traffic and can't auto-pair them. So the bootstrap starts the gateway *without* `trustedProxies` first (allowing the local CLI to auto-pair), then adds it and restarts.
|
|
80
|
+
|
|
81
|
+
No insecure flags (`allowInsecureAuth`, `dangerouslyDisableDeviceAuth`) are used. Browser access goes through proper Ed25519 device pairing.
|
|
82
|
+
|
|
83
|
+
## Commands
|
|
84
|
+
|
|
85
|
+
| Command | What it does |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `zoclaw init` | Full setup from scratch |
|
|
88
|
+
| `zoclaw init --next` | Full setup using development channel |
|
|
89
|
+
| `zoclaw bootstrap` | Re-apply config patches only (if already installed) |
|
|
76
90
|
|
|
77
91
|
## License
|
|
78
92
|
|
package/package.json
CHANGED
package/scripts/bootstrap.sh
CHANGED
|
@@ -215,13 +215,24 @@ else
|
|
|
215
215
|
echo " Logs: tail /dev/shm/openclaw-gateway.log /dev/shm/openclaw-gateway_err.log"
|
|
216
216
|
fi
|
|
217
217
|
|
|
218
|
-
# ─── 6.
|
|
218
|
+
# ─── 6. Provision HTTPS certificate ───────────────────────────────────
|
|
219
219
|
|
|
220
220
|
TS_HOSTNAME=$(tailscale status --json 2>/dev/null | node -pe "
|
|
221
221
|
const s = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
|
|
222
222
|
(s.Self.DNSName || '').replace(/\\.\$/g, '')
|
|
223
223
|
" 2>/dev/null || true)
|
|
224
224
|
|
|
225
|
+
if [ -n "$TS_HOSTNAME" ]; then
|
|
226
|
+
echo ""
|
|
227
|
+
echo "Provisioning HTTPS certificate..."
|
|
228
|
+
if tailscale cert "$TS_HOSTNAME" 2>/dev/null; then
|
|
229
|
+
echo " Certificate ready for ${TS_HOSTNAME}"
|
|
230
|
+
else
|
|
231
|
+
echo " Warning: certificate provisioning failed."
|
|
232
|
+
echo " Ensure HTTPS certificates are enabled at https://login.tailscale.com/admin/dns"
|
|
233
|
+
fi
|
|
234
|
+
fi
|
|
235
|
+
|
|
225
236
|
echo ""
|
|
226
237
|
echo "Ready!"
|
|
227
238
|
echo " TUI: openclaw tui"
|