Installation Guide

How to Run OpenClaw with DigitalOcean

Run OpenClaw on DigitalOcean to set up a 24/7 AI agent with full control and privacy. This guide shows how to get started quickly.

10 min read
Mar 19, 2026
Ampere Team

Running OpenClaw on a DigitalOcean Droplet gives you a private, always-on AI agent — your API keys stay on your server and your agent runs 24/7. If you prefer a managed option, Ampere.sh gets OpenClaw running in 60 seconds.

Droplet Requirements

ComponentRequirement
Droplet PlanBasic 2 GB RAM / 1 vCPU minimum — Basic 4 GB recommended
OS ImageUbuntu 24.04 LTS (or 22.04 LTS)
Node.jsv22.16+ required — install via NodeSource, NOT apt
SSH AccessSSH key authentication — password auth should be disabled
FirewallUFW — allow SSH (22), block port 18789 from public access

Step 1: Create Your Droplet

In your DigitalOcean account, go to Create → Droplets and set:

  • Image: Ubuntu 24.04 LTS x64
  • Plan: Basic 2 GB / 1 vCPU for personal use — 4 GB for multi-agent
  • Authentication: SSH Key
  • Hostname: openclaw-agent
ssh root@YOUR_DROPLET_IP

Step 2: Update System & Install Node.js

OpenClaw requires Node.js v22.16+. Install from NodeSource, not apt:

sudo apt update && sudo apt upgrade -y curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt-get install -y nodejs build-essential node --version # must show v22.x or higher

On a 2 GB Droplet? Add swap before installing:
sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile

NodeSource install and node --version output

NodeSource install — node --version confirms v22.14.0

Step 3: Install OpenClaw

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

If openclaw is not found, fix PATH:

export PATH="$(npm prefix -g)/bin:$PATH" echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc source ~/.bashrc && openclaw --version
OpenClaw installer output

OpenClaw installer — CLI confirmed with openclaw --version

Step 4: Run Onboarding & Connect Your Channels

openclaw onboard --install-daemon
  • Choose your AI provider and enter your API key
  • Select a model
  • Connect a channel — Telegram, WhatsApp, Discord, or others
openclaw status
OpenClaw onboarding wizard

Onboarding — select provider, API key, connect channel

Step 5: Enable systemd & Configure Firewall

loginctl enable-linger $USER systemctl --user enable --now openclaw-gateway systemctl --user status openclaw-gateway
sudo apt install -y ufw sudo ufw default deny incoming && sudo ufw default allow outgoing sudo ufw allow ssh && sudo ufw deny 18789 sudo ufw --force enable && sudo ufw status verbose
systemctl active + UFW 18789 blocked

Gateway running — UFW blocks port 18789 from public access

DigitalOcean vs Ampere.sh

Running OpenClaw on a Droplet gives you full control but requires ongoing server management. Ampere.sh is the managed alternative — same OpenClaw experience, zero infrastructure work.

FeatureDigitalOceanAmpere.sh
Setup Time1–2 hours60 seconds
Technical SkillLinux, SSH, systemdNone
Monthly Cost$12–$24+ (Droplet)Free credits to start
Server ManagementYou manage everythingFully managed
UptimeDepends on Droplet health99.9% SLA
MaintenanceManual updatesAutomatic
Data PrivacyYour server, full controlManaged cloud

Frequently Asked Questions

Which DigitalOcean Droplet plan should I use for OpenClaw?
The Basic 2 GB / 1 vCPU plan is the minimum. The Basic 4 GB plan is recommended for multiple agents or heavier models.
Does OpenClaw work on Ubuntu 22.04 LTS on DigitalOcean?
Yes. Both Ubuntu 22.04 LTS and Ubuntu 24.04 LTS work well. Ubuntu 24.04 is recommended for new Droplets.
Will OpenClaw keep running if I close my SSH session?
Yes — once you set up the systemd service (Step 5), OpenClaw runs as a background daemon. It starts on boot and restarts on crash.
Do I need a domain name for OpenClaw on DigitalOcean?
No. OpenClaw connects to messaging platforms outbound. A domain is only needed if you want a custom nginx HTTPS endpoint.
Is the OpenClaw installer script safe to run?
Yes. To review it first: curl -fsSL https://openclaw.ai/install.sh -o install.sh, inspect with less install.sh, then run bash install.sh.
How do I update OpenClaw on my Droplet?
Run npm install -g openclaw@latest, then: systemctl --user restart openclaw-gateway. Keep system packages updated too.
Can I run multiple OpenClaw agents on one Droplet?
Yes, on a 4 GB+ Droplet. Each agent is a separate Node.js process with its own systemd unit file and port.
What happens if my Droplet runs out of memory?
The OOM killer terminates processes. Add a 2 GB swap file (Step 2) and upgrade to a larger Droplet if crashes persist.

Skip the Server Setup?

Deploy OpenClaw in 60 seconds on Ampere.sh — no Droplet, no systemd, no debugging. Free credits to get started.

Deploy Now — Free Credits →