Deploy openclaw.ai on DigitalOcean
DigitalOcean makes cloud deployment simple with excellent documentation and predictable pricing at $6/month.
$200 Free Credit
New DigitalOcean accounts receive $200 in free credits valid for 60 days â more than enough to evaluate openclaw.ai at no cost.
đ Prerequisites
Create a Droplet
Log in to the DigitalOcean Control Panel and create a new Droplet:
- Click Create â Droplets
- Under Choose an image, select Ubuntu 22.04 (LTS) x64
- Under Choose a plan, select Basic â Regular (SSD) â $6/mo (1 GB RAM / 1 vCPU / 25 GB SSD) or $12/mo (2 GB RAM) for best performance
- Choose a Datacenter Region closest to you
- Under Authentication, select SSH keys and add your public key (recommended) or set a root password
- Set a hostname (e.g.,
openclaw-droplet) - Click Create Droplet
Connect via SSH
Once the Droplet is active (usually under a minute), connect using the IP shown in the dashboard:
# Replace with your Droplet's IP address
ssh root@your-droplet-ip
Droplet Console
If SSH isn't working, you can use the Droplet Console in the DigitalOcean dashboard as a browser-based fallback. Click your Droplet â Access â Launch Droplet Console.
System Update & Dependencies
Update the package index and upgrade all installed packages:
sudo apt update && sudo apt upgrade -y
Install Node.js 22
openclaw.ai requires Node.js 22 or higher. Install it from the official NodeSource repository:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version # Should show v22.x.x
Install openclaw.ai
Run the official one-line installer:
curl -fsSL https://openclaw.ai/install.sh | bash
Run Onboarding
Launch the interactive onboarding wizard. The --install-daemon flag automatically configures openclaw.ai to run as a background service:
openclaw onboard --install-daemon
The wizard will walk you through:
- Authentication setup (API keys for your LLM provider)
- Gateway configuration (port, allowed origins)
- Optional channel setup (Slack, Discord, etc.)
Verify Installation
Confirm everything is running correctly:
# Check system configuration
openclaw doctor
# Verify the gateway is healthy
openclaw health
# Open the web dashboard
openclaw dashboard
# Dashboard available at http://your-droplet-ip:18789
Configure DigitalOcean Cloud Firewall
Set up a Cloud Firewall to protect your Droplet and allow dashboard access:
- In the Control Panel, go to Networking â Firewalls â Create Firewall
- Name it (e.g.,
openclaw-fw) - Add the following Inbound Rules:
Type Protocol Ports Sources
SSH TCP 22 Your IP
Custom TCP 18789 Your IP
- Under Apply to Droplets, select your Droplet
- Click Create Firewall
Security Warning
Restrict port 18789 to your own IP address. Never use All IPv4 / All IPv6 as the source for the dashboard port in production.
Keep Running with systemd
The --install-daemon flag from Step 6 already set up a systemd user service. To check its status:
# Check gateway status via openclaw CLI
openclaw gateway status
# Or check directly via systemd
systemctl --user status openclaw-gateway
# View live logs
journalctl --user -u openclaw-gateway -f
The service will automatically restart on failure and start on boot.
đ§ Troubleshooting
If node --version shows an older version, remove the system Node.js and reinstall:
sudo apt remove nodejs
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
Check that the gateway is running and that both the DigitalOcean Cloud Firewall and the OS firewall allow traffic on port 18789:
# Check if the gateway is listening
ss -tlnp | grep 18789
# Check OS-level firewall (ufw)
sudo ufw status
sudo ufw allow 18789/tcp
Also verify the Cloud Firewall in the DigitalOcean Control Panel has port 18789 open for your IP.
Add swap space to supplement the 1 GB RAM:
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Or resize your Droplet to 2 GB via Droplet Settings â Resize.
Was this helpful?