跳转到主要内容
自托管意味着您直接在自己的 VPS 或机器上运行 LemonClaw。您只需通过 LemonData 余额支付 AI 模型的使用费用 —— 无需支付实例费。
更喜欢托管设置?创建一个 Claw 实例 即可获得相同的 LemonClaw 运行时和 WebUI,而无需自行管理服务器。

快速安装

curl -fsSL https://raw.githubusercontent.com/hedging8563/lemonclaw/main/deploy/self-hosted/install.sh | bash
安装程序将提示您输入 LemonData API Key。您可以从 控制面板 获取。

安装内容

1

Node.js 22+

如果缺失则自动安装(Linux 通过 NodeSource,macOS 通过 Homebrew)
2

LemonClaw

预配置了 LemonData API 的 LemonClaw 软件包
3

15 个 AI 模型

Claude、GPT-5、Gemini、DeepSeek 等 —— 开箱即用
4

IM 插件

预装了钉钉、企业微信和 QQ 插件
5

系统服务

开机自启动(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),然后按照特定平台的指南进行操作:
本节中的平台指南涵盖了托管 Claw 实例和自托管 LemonClaw 安装所使用的相同 LemonClaw WebUI。如果指南中提到了 Claw 控制面板,自托管用户应直接打开自己的 WebUI。

Telegram

Discord

WhatsApp

Slack

钉钉

企业微信

管理命令

systemctl --user status lemonclaw    # 查看状态
journalctl --user -u lemonclaw -f    # 查看日志
systemctl --user restart lemonclaw   # 重启
systemctl --user stop 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

自托管 vs 托管

自托管托管 (Claw)
实例费用免费$20 / 30 天
AI 使用费按需付费按需付费
基础设施您的服务器我们管理一切
更新手动(重新运行安装程序)自动
支持社区优先