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

**Published:** Mar 19, 2026 | **Author:** Alex Chen | **Read time:** 10 min read

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.

---

Running [OpenClaw](/blog/what-is-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](https://www.ampere.sh) gets OpenClaw running in 60 seconds.

Running [OpenClaw](/blog/what-is-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](https://www.ampere.sh) gets OpenClaw running in 60 seconds.


## Droplet Requirements




| Component | Requirement |
| --- | --- |
| Droplet Plan | Basic 2 GB RAM / 1 vCPU minimum — Basic 4 GB recommended |
| OS Image | Ubuntu 24.04 LTS (or 22.04 LTS) |
| Node.js | v22.16+ required — install via NodeSource, NOT apt |
| SSH Access | SSH key authentication — password auth should be disabled |
| Firewall | UFW — allow SSH (22), block port 18789 from public access |

## Step 1: Create Your Droplet

In your DigitalOcean account, go to **Create &rarr; Droplets** and set:

- **Plan:** Basic 2 GB / 1 vCPU for personal use &mdash; 4 GB for multi-agent
- **Authentication:** SSH Key
- **Hostname:** `openclaw-agent`


## Step 2: Update System & Install Node.js

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

**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 &mdash; node --version confirms v22.14.0


## Step 3: Install OpenClaw

If `openclaw` is not found, fix PATH:

OpenClaw installer &mdash; CLI confirmed with openclaw --version


## Step 4: Run Onboarding & Connect Your Channels

- Choose your AI provider and enter your API key
- Select a model
- Connect a channel &mdash; Telegram, [WhatsApp](/blog/connect-openclaw-whatsapp), Discord, or others

Onboarding &mdash; select provider, API key, connect channel


## Step 5: Enable systemd & Configure Firewall

Gateway running &mdash; UFW blocks port 18789 from public access


## DigitalOcean vs Ampere.sh



| Feature | DigitalOcean | Ampere.sh |
| --- | --- | --- |
| Setup Time | 1\u20132 hours | 60 seconds |
| Technical Skill | Linux, SSH, systemd | None |
| Monthly Cost | $12\u2013$24+ (Droplet) | Free credits to start |
| Server Management | You manage everything | Fully managed |
| Uptime | Depends on Droplet health | 99.9% SLA |
| Maintenance | Manual updates | Automatic |
| Data Privacy | Your server, full control | Managed cloud |

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


## Skip the Server Setup?

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

[Deploy Now &mdash; Free Credits &rarr;](https://www.ampere.sh/setup)


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