Deploy openclaw.ai on DigitalOcean

Beginner ⏱ 25 minutes 📅 Updated Aug 2026

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.

Special 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

1

Create a Droplet

Log in to the DigitalOcean Control Panel and create a new Droplet:

  1. Click Create → Droplets
  2. Under Choose an image, select Ubuntu 24.04 (LTS) x64 or a newer supported LTS release
  3. Under Choose a plan, select a current Basic plan with at least 2 GB RAM
  4. Choose a Datacenter Region closest to you
  5. Under Authentication, select SSH keys and add your public key (recommended) or set a root password
  6. Set a hostname (e.g., openclaw-droplet)
  7. Click Create Droplet
2

Connect via SSH

Once the Droplet is active (usually under a minute), connect using the IP shown in the dashboard:

bash
# 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.

3

System Update & Dependencies

Update the package index and upgrade all installed packages:

bash
sudo apt update && sudo apt upgrade -y
4

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:

bash
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
5

Install openclaw.ai

Run the official one-line installer:

bash
curl -fsSL https://openclaw.ai/install.sh | bash
6

Run Onboarding

Launch the interactive onboarding wizard. The --install-daemon flag automatically configures openclaw.ai to run as a background service:

bash
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.)
7

Verify Installation

Confirm everything is running correctly:

bash
# 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
8

Configure DigitalOcean Cloud Firewall

Set up a Cloud Firewall for SSH while keeping the Gateway private:

  1. In the Control Panel, go to Networking → Firewalls → Create Firewall
  2. Name it (e.g., openclaw-fw)
  3. Add the following Inbound Rules:
text
Type        Protocol   Ports    Sources
SSH         TCP        22       Your IP
  1. Under Apply to Droplets, select your Droplet
  2. 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.

9

Keep Running with systemd

The --install-daemon flag from Step 6 already set up a systemd user service. To check its status:

bash
# 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:

bash
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:

bash
# 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:

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