How to Deploy OpenClaw on DigitalOcean

DigitalOcean is one of the best platforms to self-host OpenClaw. Cheap droplets, straightforward networking, and solid documentation. This guide walks you through the entire process — from spinning up a droplet to having a production-ready OpenClaw instance behind nginx with SSL.
The Quick Way: DigitalOcean 1-Click App
Before we dive into the manual setup, know that DigitalOcean offers a 1-Click Application for OpenClaw. It pre-installs everything on a droplet — Docker, OpenClaw (version 2026.1.30), and the base configuration. If you just want to get running fast, this is the easiest path.
The 1-Click app is great for testing. For production with custom nginx, SSL, and proper security, follow the manual guide below.
Prerequisites
A DigitalOcean account (use their $200 free credits if you're new)
A domain name pointed to DigitalOcean's nameservers (or an A record ready to set)
An API key from your LLM provider (OpenAI, Anthropic, Gradient AI, etc.)
Basic comfort with SSH and the terminal
Get Your Free Marketing Audit
AI agents analyze your site for SEO, CRO, and content issues — full report in 2 minutes.
Step 1: Create Your Droplet
Log into DigitalOcean and create a new droplet:
Image: Ubuntu 24.04 LTS
Plan: Regular (shared CPU), 2 vCPUs / 4 GB RAM / 80 GB SSD ($24/month)
Datacenter: Pick whatever's closest to you
Authentication: SSH key (not password — always SSH keys)
Hostname: Something like
openclaw-prod
The 4 GB RAM plan is the sweet spot. OpenClaw itself is light, but the AI model API calls and any local processing benefit from headroom. You can start with 2 GB if budget is tight, but you'll feel it.
Step 2: Initial Server Setup
SSH into your new droplet:
ssh root@your-droplet-ip
First, update everything and create a non-root user:
apt update && apt upgrade -y adduser openclaw usermod -aG sudo openclaw
Set up the firewall:
ufw allow OpenSSH ufw allow 'Nginx Full' ufw enable
Switch to the new user:
su - openclaw
Step 3: Install Docker
OpenClaw runs in Docker, so let's install it:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker openclaw newgrp docker
Verify:
docker --version
Step 4: Deploy OpenClaw
Create a directory and set up the Docker Compose file:
mkdir ~/openclaw && cd ~/openclaw
Create docker-compose.yml:
version: '3.8'
services:
openclaw:
image: ghcr.io/anthropics/openclaw:stable
container_name: openclaw
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./data:/app/data
- ./config:/app/config
environment:
- ANTHROPIC_API_KEY=your-key-here
- OPENCLAW_MODEL=claude-sonnet-4-20250514
Start it:
docker compose up -d
Check that it's running:
docker logs openclaw
Step 5: Set Up Nginx Reverse Proxy
Install nginx:
sudo apt install nginx -y
Create the config at /etc/nginx/sites-available/openclaw:
server {
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Enable and test:
sudo ln -s /etc/nginx/sites-available/openclaw /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx
Step 6: SSL with Let's Encrypt
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d your-domain.com
Certbot will auto-configure nginx for HTTPS and set up auto-renewal.
Step 7: Post-Deployment
Set up automatic Docker image updates:
docker pull ghcr.io/anthropics/openclaw:stable docker compose down && docker compose up -d
Create a simple backup script:
#!/bin/bash tar -czf ~/backups/openclaw-$(date +%Y%m%d).tar.gz ~/openclaw/data
Add it to cron:
crontab -e # Add: 0 3 * * * /home/openclaw/backup.sh
Cost Breakdown
| Item | Cost | | ------ | ------ | | DigitalOcean Droplet (4 GB) | $24/mo | | Domain name | ~$1/mo | | LLM API costs | $5-100+/mo | | Total infrastructure | ~$25/mo |
What You're Signing Up For
Self-hosting OpenClaw means you're the sysadmin. Updates, security patches, monitoring, backups — it's all on you.
If you want the OpenClaw power without the server babysitting, RunAgents gives you a hosted, managed platform with a real UI — task boards, team collaboration, debugging tools, and cost tracking. Same agents, zero DevOps.
Want to skip the server setup entirely? RunAgents gives you managed OpenClaw hosting with task management, team collaboration, and agent debugging built in. Get started free →
Related Guides
How to Deploy ClawdBot on Northflank — Another top-tier hosting option with built-in TLS and persistent storage
How to Secure Your ClawdBot Deployment — Lock down your self-hosted agent with firewall rules, rate limiting, and API key rotation
How to Deploy OpenClaw on a Linux VPS — The provider-agnostic guide to running OpenClaw on any Linux server
Frequently Asked Questions
Is DigitalOcean the cheapest option for hosting OpenClaw?
Not quite. Hostinger VPS plans start at $5.49/month, and Hetzner offers 4 GB RAM servers for ~€4.51/month. DigitalOcean's advantage isn't price — it's reliability, documentation quality, and the 1-Click App that eliminates setup friction. For budget hosting, check our Hostinger guide.
Can I use the DigitalOcean 1-Click App for production?
It works, but the default configuration lacks nginx reverse proxy, custom SSL, and security hardening. The 1-Click App is best for quick testing. For production, follow the manual setup in this guide or at minimum add nginx and firewall rules on top of the 1-Click deployment.
How much RAM does OpenClaw actually need?
2 GB is the minimum. OpenClaw itself uses ~500 MB, but agent tasks (especially ones involving file operations, code generation, or browser automation) can spike memory usage. 4 GB gives comfortable headroom. If you're running multiple agents concurrently, consider 8 GB.
Do I need a domain name?
Not strictly — you can access OpenClaw via your droplet's IP address. But a domain gives you proper SSL (Let's Encrypt requires a domain), cleaner URLs, and the ability to set up subdomains for different services. Domains cost ~$12/year, so it's worth it.
Can I run multiple OpenClaw instances on one droplet?
Yes, using Docker Compose with different port mappings and separate data directories. Each instance needs its own API key configuration. On a 4 GB droplet, two instances is reasonable. More than that and you'll want to upgrade or use separate droplets.
What happens if my droplet runs out of disk space?
OpenClaw stores agent data, logs, and task files locally. On an 80 GB SSD, this isn't usually an issue unless you're generating large files. Set up monitoring with df -h in a cron job and configure alerts. DigitalOcean also offers volume attachments if you need more storage.
How do I update OpenClaw on DigitalOcean?
Pull the latest image and restart: docker pull ghcr.io/anthropics/openclaw:stable && docker compose down && docker compose up -d. Your data persists in the mounted volumes. Check the OpenClaw changelog before updating to catch any breaking changes.
Is DigitalOcean's managed Kubernetes a better option?
Overkill for a single OpenClaw instance. Kubernetes adds complexity (and cost) that only makes sense if you're running 5+ services. A single droplet with Docker Compose is the right tool for 1-3 OpenClaw instances. If you grow beyond that, Kubernetes or Northflank becomes worth considering.
Can I manage my DigitalOcean OpenClaw deployment from a dashboard?
RunAgents provides a full web dashboard for managing OpenClaw agents — task boards, activity feeds, cost tracking, and team collaboration. It's the visual layer that OpenClaw's CLI doesn't provide.
Get Your Free Marketing Audit
Our AI agents analyze your site and surface every SEO, CRO, and content problem — with prioritized fixes. Full report in 2 minutes.
Audit My Site Free →No credit card required
Keep reading
How to Deploy OpenClaw on Any Linux VPS
The universal deployment guide. Whether you're on DigitalOcean, Hetzner, Linode, Vultr, or OVH — if it runs Linux, this ...
5 min readHow to Use OpenClaw for SEO: 6 Autonomous Workflows to Outrank Your Competition
How to Use OpenClaw for SEO: 6 Autonomous Workflows to Outrank Your Competition SEO is one of those disciplines that's ...
17 min readHow to Use OpenClaw for Marketing: 5 Workflows That Actually Work
How to Use OpenClaw for Marketing: 5 Workflows That Actually Work Most marketing teams are drowning in tools. The avera...
12 min read