DigitalOcean(VPS)
适用范围
你想要一个“24/7 在线”的 Moltbot 网关,但又不想折腾复杂的集群/容器:DigitalOcean 的 Ubuntu VPS 是一个比较省心的选择。
前置条件
- 已创建 Ubuntu Droplet(建议 Ubuntu 24.04 LTS)
- 能用 SSH 登录到服务器
- 服务器能访问外网(用于安装 Node 与 Moltbot)
推荐步骤(可验证)
1) SSH 登录
ssh root@YOUR_DROPLET_IP2) 安装 Node.js 22 与 Moltbot
apt update && apt upgrade -y
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
curl -fsSL https://clawd.bot/install.sh | bash
moltbot --version3) 运行向导并安装网关服务
moltbot onboard --install-daemon4) 验证状态
moltbot status
moltbot health
systemctl --user status moltbot-gateway.service
journalctl --user -u moltbot-gateway.service -f远程访问控制台(建议)
默认尽量保持网关只监听本机回环地址,然后通过 SSH 隧道访问:
ssh -L 18789:localhost:18789 root@YOUR_DROPLET_IP浏览器打开:http://localhost:18789/
低内存优化(1GB 机器)
容易 OOM 的话先加 swap:
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab进一步阅读
- 网关安全:/docs/gateway/security/
- Tailscale 远程访问(英文):
/en/docs/gateway/tailscale/