Install OpenClaw on AWS, GCP, or DigitalOcean (Cloud Deploy Guide)
Running OpenClaw on a cloud server gives you full control and potentially lower per-message costs than managed platforms. This guide covers step-by-step deployment on the three most popular cloud providers, plus a cost comparison to help you decide whether self-hosting makes sense for your use case.
Minimum Requirements
Before choosing a provider, know the hard requirements:
- RAM: 2 GB minimum (4 GB recommended for stability)
- CPU: 1 vCPU minimum (2 vCPU for faster WASM compilation)
- Storage: 10 GB minimum
- OS: Ubuntu 22.04 or 24.04 LTS (recommended), Debian 12, or any Docker-compatible Linux distro
- Open port: 8080 (for web UI) or 443 (with Nginx + SSL)
Option A: AWS EC2
Recommended Instance
t3.small (2 vCPU, 2 GB RAM) at ~$15/month in us-east-1. For better stability: t3.medium (2 vCPU, 4 GB RAM) at ~$30/month.
Step 1: Launch an EC2 Instance
- Open the AWS EC2 Console
- Click Launch Instance
- Choose Ubuntu Server 22.04 LTS (HVM), SSD Volume Type
- Select t3.small (or t3.medium for more headroom)
- Create or select a key pair for SSH access
- Under Network settings, create a security group with:
- SSH (port 22) from your IP
- Custom TCP (port 8080) from 0.0.0.0/0
- Set storage to 20 GB gp3
- Click Launch Instance
Step 2: Allocate an Elastic IP
EC2 Console → Network & Security → Elastic IPs → Allocate Elastic IP Address
→ Associate with your instance
This gives your instance a permanent IP that doesn't change on restart.
Step 3: Connect and Install Docker
ssh -i your-key.pem ubuntu@YOUR_ELASTIC_IP
# Update system
sudo apt update && sudo apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker ubuntu
newgrp docker
Step 4: Deploy OpenClaw
mkdir -p ~/openclaw/config
cat > ~/openclaw/config/openclaw.json << 'EOF'
{
"gateway": {
"mode": "local",
"controlUi": { "dangerouslyDisableDeviceAuth": true }
},
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_BOT_TOKEN",
"dmPolicy": "open"
}
}
}
EOF
docker run -d --name openclaw --restart unless-stopped -p 8080:8080 -v ~/openclaw/config:/home/node/.openclaw -e ANTHROPIC_API_KEY=your_key -e NODE_OPTIONS=--max-old-space-size=1536 -m 2048m alpine/openclaw:latest node /app/openclaw.mjs gateway
AWS Cost Estimate
| Instance | vCPU | RAM | $/month (on-demand) | |---|---|---|---| | t3.micro | 2 | 1 GB | ~$8 (too small) | | t3.small | 2 | 2 GB | ~$15 | | t3.medium | 2 | 4 GB | ~$30 |
Add ~$4/month for 20 GB EBS storage + ~$5/month for Elastic IP when not attached. Total: ~$15–35/month depending on instance size.
Option B: Google Cloud Platform (GCP)
Recommended Instance
e2-small (2 vCPU, 2 GB RAM) at ~$13/month in us-central1. For better stability: e2-medium (2 vCPU, 4 GB RAM) at ~$26/month.
Step 1: Create a VM Instance
# Using gcloud CLI
gcloud compute instances create openclaw-server --machine-type=e2-small --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud --boot-disk-size=20GB --zone=us-central1-a --tags=openclaw-server
Or use the GCP Console:
- Compute Engine → VM Instances → Create Instance
- Machine type: e2-small
- Boot disk: Ubuntu 22.04 LTS, 20 GB
- Allow HTTP/HTTPS traffic
Step 2: Create Firewall Rule
gcloud compute firewall-rules create allow-openclaw --allow tcp:8080 --target-tags=openclaw-server --description="Allow OpenClaw web UI"
Step 3: Reserve a Static IP
gcloud compute addresses create openclaw-ip --region=us-central1
gcloud compute instances add-access-config openclaw-server --access-config-name="External NAT" --address=$(gcloud compute addresses describe openclaw-ip --region=us-central1 --format='value(address)')
Step 4: Connect and Deploy
gcloud compute ssh openclaw-server --zone=us-central1-a
# Install Docker
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker
# Deploy (same commands as AWS Step 4)
GCP Cost Estimate
| Instance | vCPU | RAM | $/month | |---|---|---|---| | e2-micro | 2 | 1 GB | ~$7 (too small) | | e2-small | 2 | 2 GB | ~$13 | | e2-medium | 2 | 4 GB | ~$26 |
Static IP: ~$3/month. Storage: ~$2/month for 20 GB. Total: ~$13–30/month.
Option C: DigitalOcean Droplets
Recommended Droplet
Basic Droplet — 2 GB RAM / 1 vCPU at $12/month (best value for OpenClaw).
Step 1: Create a Droplet
- Go to cloud.digitalocean.com → Create → Droplets
- Choose Ubuntu 22.04 LTS
- Select Basic → Regular → $12/mo (2 GB RAM, 1 vCPU, 50 GB SSD)
- Choose a datacenter region close to your users
- Add your SSH key
- Click Create Droplet
Step 2: Configure Firewall
In the DigitalOcean console:
- Networking → Firewalls → Create Firewall
- Add inbound rule: TCP port 8080, All IPv4/IPv6
- Apply the firewall to your Droplet
Or via CLI:
doctl compute firewall create --name openclaw-fw --inbound-rules "protocol:tcp,ports:8080,address:0.0.0.0/0,address:::/0" --droplet-ids YOUR_DROPLET_ID
Step 3: Deploy OpenClaw
ssh root@YOUR_DROPLET_IP
# Install Docker
curl -fsSL https://get.docker.com | sh
usermod -aG docker $USER
# Deploy
mkdir -p /opt/openclaw/config
# (create config file as shown in AWS section)
docker run -d --name openclaw --restart unless-stopped -p 8080:8080 -v /opt/openclaw/config:/home/node/.openclaw -e ANTHROPIC_API_KEY=your_key -e NODE_OPTIONS=--max-old-space-size=1536 -m 2048m alpine/openclaw:latest node /app/openclaw.mjs gateway
DigitalOcean Cost Estimate
| Droplet | vCPU | RAM | $/month | |---|---|---|---| | Basic $6 | 1 | 1 GB | $6 (too small) | | Basic $12 | 1 | 2 GB | $12 | | Basic $18 | 2 | 2 GB | $18 | | General $24 | 2 | 4 GB | $24 |
Storage is included. No extra charge for floating IPs. Total: ~$12–24/month.
Common Setup Steps (All Providers)
Once your cloud instance has Docker and OpenClaw running, these steps apply everywhere.
Set Up a Domain Name
Point an A record at your server IP:
my-bot.example.com → 1.2.3.4 (your server IP)
Install Nginx + Let's Encrypt SSL
sudo apt install -y nginx certbot python3-certbot-nginx
# Configure Nginx
sudo tee /etc/nginx/sites-available/openclaw << 'EOF'
server {
listen 80;
server_name my-bot.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
EOF
sudo ln -s /etc/nginx/sites-available/openclaw /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
# Get SSL certificate
sudo certbot --nginx -d my-bot.example.com
Now your OpenClaw instance is accessible at https://my-bot.example.com.
Cost Comparison
| Option | Monthly Cost | Setup Time | Maintenance | Control | |---|---|---|---|---| | AWS EC2 t3.small | ~$15–20 | 45 min | High | Full | | GCP e2-small | ~$13–18 | 45 min | High | Full | | DigitalOcean $12 | ~$12–15 | 30 min | High | Full | | ClawMates | $29.99 | 2 min | None | Standard |
Note: Cloud costs above do NOT include:
- Your Anthropic API costs (varies by usage, typically $5–50/month)
- Your time for maintenance, updates, and troubleshooting
- SSL certificate management
- Monitoring and alerting setup
Self-Hosting vs. ClawMates: When to Choose What
Choose self-hosting if:
- You process 10M+ tokens/month and BYOK pricing is critical
- You need custom integrations or have specific compliance requirements
- You have DevOps experience and don't mind server maintenance
- You want to modify OpenClaw's source code
Choose ClawMates ($29.99/mo) if:
- You want to be running within 2 minutes, not 45
- You don't want to manage servers, Docker, or SSL certs
- You need reliable uptime without setting up monitoring yourself
- You want automatic updates when OpenClaw releases new versions
- Your team isn't technical and can't debug OOM kills or config errors
The self-hosting path is genuinely viable — but factor in the 5–10 hours of initial setup time and 1–2 hours/month of ongoing maintenance. At typical developer hourly rates, ClawMates often costs less than the time spent maintaining a self-hosted setup.
Next Steps
Whichever path you choose:
- Connect your Telegram bot (required) and WhatsApp (optional) via the Control UI
- Configure your AI model and system prompt
- Test with a few messages
- Set up monitoring (Uptime Robot or Better Uptime — free tiers available)
If you run into issues during cloud setup, see our OpenClaw troubleshooting guide for solutions to common errors.