How to install on DigitalOcean on OpenClaw
Create a DigitalOcean Droplet ($6/mo for 1 GB RAM, or $12/mo for 2 GB recommended), use the 1-Click OpenClaw App from the Marketplace for instant deployment, or manually install via Docker Compose. Configure your AI provider keys and messaging apps through the onboarding wizard. Total setup: ~5 minutes with 1-Click, ~15 minutes manual.
Prerequisites
- DigitalOcean account with a payment method
- SSH key added to your DigitalOcean account
- API key from Anthropic (Claude) or OpenAI
- Basic command-line knowledge
Step-by-Step Instructions
Create a Droplet for OpenClaw
Option A: 1-Click App (recommended)
Go to the DigitalOcean Marketplace and search for OpenClaw. Click Create OpenClaw Droplet — this pre-installs Docker, OpenClaw, and Nginx reverse proxy. Select the $12/mo Droplet (2 GB RAM, 1 vCPU, 50 GB SSD) for reliable performance.
Option B: Manual setup
Go to Create → Droplets, select Ubuntu 24.04 LTS, choose the $12/mo plan (minimum $6/mo works but 2 GB is recommended), select your SSH key, and create the Droplet.
Connect to your Droplet
ssh root@YOUR_DROPLET_IPIf you used the 1-Click App, you'll see the OpenClaw welcome message with next steps. For manual setup, update the system first:apt update && apt upgrade -yInstall Docker (manual setup only)
curl -fsSL https://get.docker.com | sh
usermod -aG docker $USER
newgrp dockerVerify installation:docker --version
docker compose versionDeploy OpenClaw with Docker Compose
mkdir -p ~/openclaw && cd ~/openclaw
echo "OPENCLAW_SECRET=$(openssl rand -base64 32)" > .envCreate docker-compose.yml:cat > docker-compose.yml << 'EOF'
version: '3.8'
services:
openclaw:
image: openclaw/gateway:latest
container_name: openclaw
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./data:/app/data
env_file: .env
environment:
- NODE_ENV=production
EOFStart OpenClaw:docker compose up -dRun the onboarding wizard
ssh -L 3000:localhost:3000 root@YOUR_DROPLET_IPOpen http://localhost:3000 in your browser. Configure:- AI Provider: Enter your Anthropic or OpenAI API key
- Messaging: Connect WhatsApp, Telegram, Discord, or Slack
- Security: Set gateway authentication password
- Preferences: Language, timezone, agent defaults
Configure DigitalOcean Cloud Firewall
- Inbound: Allow SSH (port 22) from your IP only, HTTP (80) and HTTPS (443) if using Nginx
- Outbound: Allow all (OpenClaw needs to reach AI provider APIs and messaging services)
Enable backups and monitoring
Enable Monitoring (free) from the Droplet dashboard to track CPU, memory, disk, and network usage. Set up alerts for high memory usage — OpenClaw typically uses 300-800 MB RAM.
For volume snapshots on demand:
# Take a manual snapshot from the DigitalOcean dashboard
# Snapshots → Take SnapshotCommon Issues & Troubleshooting
1-Click App Droplet shows blank page on first visit
Wait 2-3 minutes after Droplet creation — the initialization script runs on first boot. SSH in and check status: docker logs openclaw. If still blank, restart the container: docker compose -f /opt/openclaw/docker-compose.yml restart.
Cannot SSH into the Droplet
Ensure your SSH key was added to your DigitalOcean account before creating the Droplet. If locked out, use the Recovery Console from the Droplet dashboard. Check that the Cloud Firewall allows SSH on port 22.
OpenClaw container exits with out-of-memory error
The $6/mo Droplet (1 GB RAM) may be insufficient if running additional services. Upgrade to the $12/mo plan (2 GB) from the Droplet dashboard — resize takes ~1 minute with no data loss. Add swap as a temporary fix: fallocate -l 2G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile.
SSL certificate not working with custom domain
Point your domain's A record to the Droplet IP. If using the 1-Click App, SSL auto-configures via Let's Encrypt. For manual setup, install Certbot: apt install certbot python3-certbot-nginx -y && certbot --nginx -d yourdomain.com.