AgentBox Operating Instructions
You are running on a dedicated AgentBox VM - a single-tenant Hetzner cloud instance with OpenClaw gateway, HTTPS, web terminal, and a Solana wallet for x402 micropayments.
Services
| Service | Port | Managed by |
|---|
| OpenClaw gateway | :18789 (loopback) | INLINECODE0 |
| Caddy (HTTPS reverse proxy) |
:443 |
sudo systemctl restart caddy |
| ttyd (web terminal) | :7681 (loopback) |
sudo systemctl restart ttyd |
Caddy routes HTTPS traffic to the gateway and terminal. Do NOT modify Caddy or systemd configs directly.
Key paths
| What | Path |
|---|
| OpenClaw config | INLINECODE3 |
| Solana wallet |
~/.openclaw/agentbox/wallet-sol.json |
| Workspace |
~/.openclaw/workspace/ |
| Skills |
~/.openclaw/workspace/skills/ |
| x402 plugin |
~/.openclaw/extensions/openclaw-x402/ |
| Gateway logs |
~/.openclaw/logs/ |
x402 payment plugin
The openclaw-x402 plugin patches globalThis.fetch to handle HTTP 402 Payment Required responses automatically. When an LLM inference call returns 402, the plugin signs a USDC payment on Solana and retries. This is transparent - you don't need to do anything special.
The wallet at ~/.openclaw/agentbox/wallet-sol.json must have USDC balance for payments to work. Check balance with:
CODEBLOCK0
Default model provider
This instance comes with a preconfigured LLM provider (blockrun) that uses x402 for payments. If users want to use a different provider like OpenRouter, use the /agentbox-openrouter skill.
Restarting the gateway
After any config change to ~/.openclaw/openclaw.json:
CODEBLOCK1
Check status:
CODEBLOCK2
Updating skills
To get the latest AgentBox skills:
CODEBLOCK3
This updates all installed skills from ClawHub. Changes take effect on the next new session.
Troubleshooting
- - Gateway won't start: Check
openclaw status and gateway logs at INLINECODE15 - x402 payments failing: Check USDC balance (see above). Wallet needs USDC on Solana mainnet.
- Config changes not taking effect: Run
openclaw gateway restart after editing INLINECODE17 - Skills not showing: Run
clawhub list to see installed skills. Run clawhub update --all to refresh.
Important rules
- - Always use
openclaw gateway restart to restart the gateway. Never use systemctl directly for the gateway. - When editing
~/.openclaw/openclaw.json, read the current file first, modify it, write it back. Don't write partial configs. - The Solana wallet private key is at
~/.openclaw/agentbox/wallet-sol.json. Never share it or display it to users.
AgentBox 操作说明
您正在专用的 AgentBox 虚拟机上运行——这是一个单租户的 Hetzner 云实例,配备 OpenClaw 网关、HTTPS、Web 终端以及用于 x402 微支付的 Solana 钱包。
服务
| 服务 | 端口 | 管理方式 |
|---|
| OpenClaw 网关 | :18789(回环) | openclaw gateway restart |
| Caddy(HTTPS 反向代理) |
:443 | sudo systemctl restart caddy |
| ttyd(Web 终端) | :7681(回环) | sudo systemctl restart ttyd |
Caddy 将 HTTPS 流量路由到网关和终端。请勿直接修改 Caddy 或 systemd 配置。
关键路径
| 内容 | 路径 |
|---|
| OpenClaw 配置 | ~/.openclaw/openclaw.json |
| Solana 钱包 |
~/.openclaw/agentbox/wallet-sol.json |
| 工作区 | ~/.openclaw/workspace/ |
| 技能 | ~/.openclaw/workspace/skills/ |
| x402 插件 | ~/.openclaw/extensions/openclaw-x402/ |
| 网关日志 | ~/.openclaw/logs/ |
x402 支付插件
openclaw-x402 插件会修补 globalThis.fetch,以自动处理 HTTP 402 Payment Required 响应。当 LLM 推理调用返回 402 时,该插件会在 Solana 上签署 USDC 支付并重试。此过程对您透明——无需执行任何特殊操作。
位于 ~/.openclaw/agentbox/wallet-sol.json 的钱包必须拥有 USDC 余额才能进行支付。使用以下命令检查余额:
bash
spl-token balance --owner $(solana address) EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
默认模型提供商
此实例预配置了一个使用 x402 进行支付的 LLM 提供商(blockrun)。如果用户想使用其他提供商(如 OpenRouter),请使用 /agentbox-openrouter 技能。
重启网关
对 ~/.openclaw/openclaw.json 进行任何配置更改后:
bash
openclaw gateway restart
检查状态:
bash
openclaw status
更新技能
要获取最新的 AgentBox 技能:
bash
clawhub update --all
这将从 ClawHub 更新所有已安装的技能。更改将在下一个新会话中生效。
故障排除
- - 网关无法启动:检查 openclaw status 和位于 ~/.openclaw/logs/ 的网关日志
- x402 支付失败:检查 USDC 余额(见上文)。钱包需要在 Solana 主网上拥有 USDC。
- 配置更改未生效:编辑 ~/.openclaw/openclaw.json 后运行 openclaw gateway restart
- 技能未显示:运行 clawhub list 查看已安装的技能。运行 clawhub update --all 刷新。
重要规则
- - 始终使用 openclaw gateway restart 重启网关。切勿直接对网关使用 systemctl。
- 编辑 ~/.openclaw/openclaw.json 时,先读取当前文件,修改后写回。不要写入不完整的配置。
- Solana 钱包私钥位于 ~/.openclaw/agentbox/wallet-sol.json。切勿分享或向用户展示。