Deploy openclaw.ai on DigitalOcean

Beginner ⏱ 25 minutes 📅 Updated Feb 2026

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

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 22.04 (LTS) x64
  3. 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
  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 Node.js 22

openclaw.ai requires Node.js 22 or higher. Install it from the official NodeSource repository:

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

# Open the web dashboard
openclaw dashboard
# Dashboard available at http://your-droplet-ip:18789
8

Configure DigitalOcean Cloud Firewall

Set up a Cloud Firewall to protect your Droplet and allow dashboard access:

  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
Custom      TCP        18789    Your IP
  1. Under Apply to Droplets, select your Droplet
  2. 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.

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

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

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.