How to install on DigitalOcean on OpenClaw

intermediate 20 min read Updated 2026-03-14
Quick Answer

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

1

Create a Droplet for OpenClaw

DigitalOcean offers two paths to deploy 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.
The 1-Click App includes pre-configured Nginx with SSL support, saving significant setup time.
2

Connect to your Droplet

Once the Droplet is created, note the IP address from the dashboard. Connect via SSH:
ssh root@YOUR_DROPLET_IP
If 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 -y
3

Install Docker (manual setup only)

Skip this step if you used the 1-Click App. Install Docker:
curl -fsSL https://get.docker.com | sh
usermod -aG docker $USER
newgrp docker
Verify installation:
docker --version
docker compose version
4

Deploy OpenClaw with Docker Compose

Skip this step if you used the 1-Click App. Set up the project:
mkdir -p ~/openclaw && cd ~/openclaw
echo "OPENCLAW_SECRET=$(openssl rand -base64 32)" > .env
Create 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
EOF
Start OpenClaw:
docker compose up -d
5

Run the onboarding wizard

Access the Control UI via SSH tunnel:
ssh -L 3000:localhost:3000 root@YOUR_DROPLET_IP
Open 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
If you used the 1-Click App, the wizard URL is shown in the SSH welcome message.
DigitalOcean's 1-Click App configures Nginx with Let's Encrypt SSL, so you can optionally access the UI via your domain over HTTPS instead of SSH tunnel.
6

Configure DigitalOcean Cloud Firewall

Use DigitalOcean's Cloud Firewall (free) for network-level security. Go to Networking → Firewalls → Create 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)
Apply the firewall to your Droplet.
Cloud Firewalls filter traffic before it reaches your Droplet, providing better protection than UFW alone.
7

Enable backups and monitoring

Enable Droplet Backups ($2.40/mo for the $12 Droplet) from the Droplet settings for automatic weekly full-server backups.

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 Snapshot
Set a memory alert at 80% to catch issues before the Droplet runs out of RAM.

Common 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.

Special Offer

Affiliate link. We may earn a commission at no extra cost to you.