22apiVersion : zeabur.com/v1
33kind : Template
44metadata :
5- name : OpenClaw DevBox 🦞
5+ name : OpenClaw devbox 🦞
66spec :
77 description : |
8- OpenClaw DevBox is a remote execution node for OpenClaw with programming languages and dev tools pre-installed (Python, Go, Rust, gcc, git, jq). User-installed packages persist across restarts via a persistent volume.
8+ OpenClaw devbox is a remote execution node for OpenClaw with programming languages and dev tools pre-installed (Python, Go, Rust, gcc, git, jq). User-installed packages persist across restarts via a persistent volume.
99 icon : https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/pixel-lobster.svg
1010 coverImage : https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/openclaw-logo-text.png
1111 variables :
1212 - key : GATEWAY_TOKEN
1313 type : STRING
1414 name : Gateway Token
1515 description : The gateway authentication token of your OpenClaw instance
16+ - key : GATEWAY_HOST
17+ type : STRING
18+ name : Gateway Host
19+ description : The Zeabur service name of your OpenClaw instance
1620 tags :
1721 - AI
1822 - DevTools
1923
2024 readme : |
21- # OpenClaw DevBox 🦞
25+ # OpenClaw devbox 🦞
2226
2327 A remote execution node for OpenClaw with programming languages and dev tools pre-installed.
2428
@@ -39,26 +43,31 @@ spec:
3943
4044 ## Setup
4145 1. Deploy this template to the **same Zeabur project** as your OpenClaw instance
42- 2. Enter the **Gateway Token** from your OpenClaw service
43- 3. The DevBox node will automatically connect to OpenClaw via internal DNS
46+ 2. Enter the **Gateway Token** and **Gateway Host** (the Zeabur service name of your OpenClaw instance)
47+ 3. The devbox node will connect to OpenClaw and send a pairing request
48+ 4. Approve the pairing request in your OpenClaw service terminal:
49+ ```
50+ openclaw devices list # find the pending request ID
51+ openclaw devices approve <requestId>
52+ ```
4453
4554 ## Recommended Resources
4655 - **CPU**: 2 vCPU
4756 - **Memory**: 2048 MB
4857 - **Volume**: 10 GB
4958
5059 ## Verification
51- After deployment, check that the DevBox node appears in OpenClaw:
60+ After deployment, check that the devbox node appears in OpenClaw:
5261 - Run `openclaw nodes list` in your OpenClaw service terminal
5362 - Or check the Nodes page in the OpenClaw Web UI
5463
5564 ## Architecture
56- - No exposed ports — the DevBox initiates an outbound WebSocket connection to the OpenClaw gateway
65+ - No exposed ports — the devbox initiates an outbound WebSocket connection to the OpenClaw gateway
5766 - `exec.security` is set to `full` — no interactive approval needed for command execution
5867 - System runtimes are baked into the image; user packages live on the persistent volume
5968
6069 services :
61- - name : DevBox
70+ - name : openclaw-devbox
6271 icon : https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/pixel-lobster.svg
6372 template : PREBUILT
6473 spec :
@@ -82,20 +91,19 @@ spec:
8291 CONFIG_DIR="$HOME/.openclaw"
8392 CONFIG_FILE="$CONFIG_DIR/openclaw.json"
8493
85- # Create config with full exec security (no approval needed for server-side container)
86- if [ ! -f "$CONFIG_FILE" ]; then
87- mkdir -p "$CONFIG_DIR"
88- cat > "$CONFIG_FILE" << 'CONF'
94+ # Create config: full exec without approval (tool availability is gateway-side)
95+ mkdir -p "$CONFIG_DIR"
96+ cat > "$CONFIG_FILE" << 'CONF'
8997 {
9098 "tools": {
9199 "exec": {
92- "security": "full"
100+ "security": "full",
101+ "ask": "off"
93102 }
94103 }
95104 }
96105 CONF
97- chmod 600 "$CONFIG_FILE"
98- fi
106+ chmod 600 "$CONFIG_FILE"
99107
100108 # Ensure user-level directories exist on persistent volume
101109 mkdir -p "$HOME/.local/bin"
@@ -104,57 +112,55 @@ spec:
104112 mkdir -p "$HOME/.cargo/bin"
105113 mkdir -p "$HOME/workspace"
106114
107- # Start node host — connects to OpenClaw gateway via internal DNS
108- exec node /app/dist/index.js node run \
109- --host "${GATEWAY_HOST:-OpenClaw}" \
110- --port "${GATEWAY_PORT:-18789}" \
111- --display-name "${NODE_DISPLAY_NAME:-DevBox}"
115+ # Start node host — retry on pairing rejection to avoid container restart loop
116+ RETRY_DELAY=10
117+ while true; do
118+ echo "Connecting to gateway ${GATEWAY_HOST:-OpenClaw}:${GATEWAY_PORT:-18789}..."
119+ node /app/dist/index.js node run \
120+ --host "${GATEWAY_HOST:-OpenClaw}" \
121+ --port "${GATEWAY_PORT:-18789}" \
122+ --display-name "${NODE_DISPLAY_NAME:-devbox}" && break
123+ echo "Connection lost. Retrying in ${RETRY_DELAY}s..."
124+ sleep "$RETRY_DELAY"
125+ done
112126 env :
113127 OPENCLAW_GATEWAY_TOKEN :
114128 default : ${GATEWAY_TOKEN}
115129 HOME :
116130 default : /home/node
117- readonly : true
118131 GATEWAY_HOST :
119- default : OpenClaw
132+ default : ${GATEWAY_HOST}
120133 GATEWAY_PORT :
121134 default : " 18789"
122- readonly : true
123135 NODE_DISPLAY_NAME :
124- default : DevBox
136+ default : devbox
125137 NODE_ENV :
126138 default : production
127- readonly : true
128139 NODE_OPTIONS :
129140 default : --max-old-space-size=1024
130- readonly : true
131141 PIP_USER :
132142 default : " 1"
133- readonly : true
134143 PYTHONUSERBASE :
135144 default : /home/node/.local
136- readonly : true
137145 NPM_CONFIG_PREFIX :
138146 default : /home/node/.npm-global
139- readonly : true
140147 GOPATH :
141148 default : /home/node/go
142- readonly : true
143149 RUSTUP_HOME :
144150 default : /home/node/.rustup
145- readonly : true
146151 CARGO_HOME :
147152 default : /home/node/.cargo
148- readonly : true
149153 PATH :
150154 default : /home/node/.local/bin:/home/node/.npm-global/bin:/home/node/go/bin:/home/node/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
151- readonly : true
152155
153156localization :
154157 zh-TW :
155- name : OpenClaw DevBox 🦞
156- description : OpenClaw DevBox 是 OpenClaw 的遠端執行節點,預裝多種程式語言與開發工具(Python、Go、Rust、gcc、git、jq)。使用者安裝的套件透過持久化磁碟保留。
158+ name : OpenClaw devbox 🦞
159+ description : OpenClaw devbox 是 OpenClaw 的遠端執行節點,預裝多種程式語言與開發工具(Python、Go、Rust、gcc、git、jq)。使用者安裝的套件透過持久化磁碟保留。
157160 variables :
158161 - key : GATEWAY_TOKEN
159162 name : Gateway Token
160163 description : 您的 OpenClaw 實例的 Gateway 認證令牌
164+ - key : GATEWAY_HOST
165+ name : Gateway Host
166+ description : 您的 OpenClaw 實例的 Zeabur 服務名稱
0 commit comments