自託管代表您直接在自己的 VPS 或機器上執行 LemonClaw。您只需透過 LemonData 餘額支付 AI 模型使用費用 — 無實例費用。
快速安裝
curl -fsSL https://raw.githubusercontent.com/hedging8563/lemonclaw/main/deploy/self-hosted/install.sh | bash
安裝程式會提示您輸入 LemonData API Key。請在您的控制面板中取得。
安裝內容
Node.js 22+
如果缺少會自動安裝(Linux 透過 NodeSource,macOS 透過 Homebrew)
LemonClaw
來自 npm 的官方 LemonClaw 套件,已預先設定 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 | 在此取得 |
安裝完成後
安裝程式會輸出您的存取憑證:
✓ LemonClaw 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 lemonclaw # 檢查狀態
journalctl --user -u lemonclaw -f # 檢視日誌
systemctl --user restart lemonclaw # 重新啟動
systemctl --user stop lemonclaw # 停止
tail -f ~/.lemonclaw/lemonclaw.log # 檢視日誌
launchctl stop cc.lemondata.lemonclaw && launchctl start cc.lemondata.lemonclaw # 重新啟動
launchctl stop cc.lemondata.lemonclaw # 停止
設定檔位置:~/.lemonclaw/config.json
編輯後請重新啟動服務以套用變更。
變更預設模型
{
"agents": {
"defaults": {
"model": {
"primary": "lemondata-claude/claude-opus-4-6"
}
}
}
}
可用的模型前綴(取決於你在 LemonData Provider 設定 中啟用了哪些 provider):
lemondata/ — OpenAI 相容路徑(openai-completions)
lemondata-responses/ — OpenAI Responses 路徑(openai-responses)
lemondata-claude/ — Claude 原生路徑(anthropic-messages)
lemondata-gemini/ — Gemini 原生路徑(google-generative-ai)
lemondata-minimax/ — MiniMax 原生路徑(anthropic-messages)
curl -fsSL https://raw.githubusercontent.com/hedging8563/lemonclaw/main/deploy/self-hosted/install.sh | bash
# 然後重新啟動服務
systemctl --user restart lemonclaw # Linux
# 或
launchctl stop cc.lemondata.lemonclaw && launchctl start cc.lemondata.lemonclaw # macOS
解除安裝
# 停止並停用服務
systemctl --user stop lemonclaw && systemctl --user disable lemonclaw # Linux
launchctl unload ~/Library/LaunchAgents/cc.lemondata.lemonclaw.plist # macOS
# 移除 LemonClaw
rm -rf ~/.lemonclaw
rm -rf ~/.lemonclaw
自託管 vs 託管版
| 自託管 | 託管版(Claw) |
|---|
| 實例費用 | 免費 | $20 / 30 天 |
| AI 使用費 | 按量付費 | 按量付費 |
| 基礎設施 | 您的伺服器 | 我們全權管理 |
| 更新 | 手動(npm update) | 自動 |
| 支援 | 社群 | 優先 |