Deploy openclaw.ai on DigitalOcean
DigitalOcean makes cloud deployment straightforward with managed networking and predictable plans.
New-Customer Offers
DigitalOcean promotions change over time. Check the current eligibility, credit amount, and expiration before relying on an offer.
Check current DigitalOcean offers
Deploy openclaw.ai on a Droplet with current regional pricing.
Get Started â* Affiliate link â we may earn a commission at no extra cost to you.
đ 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 24.04 (LTS) x64 or a newer supported LTS release
- Under Choose a plan, select a current Basic plan with at least 2 GB RAM
- 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 supported Node.js version
openclaw.ai requires Node.js 22.22.3+, 24.15+, or 25.9+ (installer defaults to Node 26). Install it from the official NodeSource repository:
curl -fsSL https://deb.nodesource.com/setup_26.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version # Should show v26.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
# Print the authenticated dashboard URL
openclaw dashboard --no-open
# On your local computer, forward the private Gateway port
ssh -N -L 18789:127.0.0.1:18789 root@your-droplet-ip
# Then open http://127.0.0.1:18789
Configure DigitalOcean Cloud Firewall
Set up a Cloud Firewall for SSH while keeping the Gateway private:
- 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
- Under Apply to Droplets, select your Droplet
- Click Create Firewall
Keep the Gateway Private
Do not add a public rule for port 18789. OpenClaw binds the Gateway to loopback by default; use the SSH tunnel from Step 7.
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_26.x | sudo -E bash -
sudo apt-get install -y nodejs
Check the Gateway on the Droplet, then restart the tunnel on your local computer:
# On the Droplet
openclaw gateway status
ss -tlnp | grep 18789
# On your local computer
ssh -N -L 18789:127.0.0.1:18789 root@your-droplet-ip
The Cloud Firewall only needs SSH from your IP; port 18789 stays private.
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.
Ready to deploy? Get started with DigitalOcean â
Was this helpful?