DigitalOcean
在 DigitalOcean 上部署 OpenClaw。
快速开始
1. 创建 Droplet
bash
# 使用 Docker 安装
doctl compute droplet create openclaw \
--image docker \
--size s-2vcpu-4gb \
--region nyc1 \
--ssh-keys <your-ssh-key-id>2. 安装 OpenClaw
bash
# 连接到 Droplet
ssh root@<droplet-ip>
# 安装 OpenClaw
curl -sL https://molt.bot/install | bash -s -- --docker
# 或使用一键脚本
curl -sL https://molt.bot/install | bash -s -- --channel stable配置
yaml
platform:
digitalocean:
droplet:
size: "s-2vcpu-4gb"
region: "nyc1"
docker:
image: "openclaw/openclaw:latest"
ports:
- "8211:8211"
volumes:
- "openclaw-data:/data"资源推荐
| 用例 | Droplet 大小 | CPU | 内存 |
|---|---|---|---|
| 个人使用 | s-1vcpu-2gb | 1 | 2GB |
| 家庭使用 | s-2vcpu-4gb | 2 | 4GB |
| 多人使用 | s-4vcpu-8gb | 4 | 8GB |
防火墙配置
bash
# 创建防火墙
doctl compute firewall create \
--name openclaw-firewall \
--inbound-rules "protocol:tcp,ports:8211,address:0.0.0.0/0" \
--droplets <droplet-id>