自托管意味着您直接在自己的 VPS 或机器上运行 OpenClaw。您只需通过 LemonData 余额支付 AI 模型使用费用 — 无实例费用。
快速安装
curl -fsSL https://raw.githubusercontent.com/hedging8563/lemondata-openclaw/main/install.sh | bash
安装程序会提示您输入 LemonData API Key。请在您的控制面板中获取。
安装内容
Node.js 22+
如果缺失会自动安装(Linux 通过 NodeSource,macOS 通过 Homebrew)
OpenClaw
来自 npm 的官方 OpenClaw 包,已预配置 LemonData API
15 个 AI 模型
Claude、GPT-5、Gemini、DeepSeek 等 — 开箱即用
系统服务
开机自启(Linux 使用 systemd,macOS 使用 launchd)
系统要求
| 要求 | 详情 |
|---|
| 操作系统 | Linux(Ubuntu/Debian/CentOS/RHEL)或 macOS |
| 架构 | x64 或 arm64 |
| 内存 | 最低 1 GB,推荐 2 GB |
| API Key | 在此获取 |
安装完成后
安装程序会输出您的访问凭据:
✓ OpenClaw installed successfully!
WebUI: http://your-ip:18789
Token: your-gateway-token
Auto-login: http://your-ip:18789?token=your-gateway-token
Model: claude-sonnet-4-6
**请保存好您的 Token!**您需要它来访问 WebUI 和连接消息平台。
连接消息平台
使用您的 Token 访问 WebUI http://your-ip:18789,然后按照各平台指南操作:
管理命令
systemctl --user status openclaw # 查看状态
journalctl --user -u openclaw -f # 查看日志
systemctl --user restart openclaw # 重启
systemctl --user stop openclaw # 停止
tail -f ~/.openclaw/openclaw.log # 查看日志
launchctl stop cc.lemondata.openclaw && launchctl start cc.lemondata.openclaw # 重启
launchctl stop cc.lemondata.openclaw # 停止
配置文件位置:~/.openclaw/openclaw.json
编辑后请重启服务以使更改生效。
更改默认模型
{
"agents": {
"defaults": {
"model": {
"primary": "lemondata-claude/claude-opus-4-6"
}
}
}
}
可用的模型前缀:
lemondata-claude/ — Claude 模型(anthropic-messages API)
lemondata-minimax/ — MiniMax 模型(anthropic-messages API)
lemondata/ — 所有其他模型(openai-completions API)
npm update -g openclaw
# 然后重启服务
systemctl --user restart openclaw # Linux
# 或
launchctl stop cc.lemondata.openclaw && launchctl start cc.lemondata.openclaw # macOS
# 停止并禁用服务
systemctl --user stop openclaw && systemctl --user disable openclaw # Linux
launchctl unload ~/Library/LaunchAgents/cc.lemondata.openclaw.plist # macOS
# 移除 OpenClaw
npm uninstall -g openclaw
rm -rf ~/.openclaw
自托管 vs 托管版
| 自托管 | 托管版(Claw) |
|---|
| 实例费用 | 免费 | $20 / 30 天 |
| AI 使用费 | 按量付费 | 按量付费 |
| 基础设施 | 您的服务器 | 我们全权管理 |
| 更新 | 手动(npm update) | 自动 |
| 支持 | 社区 | 优先 |