OpenClaw on DigitalOcean
Want to run OpenClaw 24/7 without keeping your laptop on? DigitalOcean lets you run OpenClaw on a cloud VPS so your AI agent can stay online, connect tools, and handle workflows remotely.
Why Deploy OpenClaw on DigitalOcean?
- Run OpenClaw on a cloud VPS instead of your laptop.
- Keep your AI agent online 24/7.
- Use OpenClaw even when your computer is off.
- Get full control over CPU, RAM, storage, ports, and firewall rules.
- Connect tools and channels like Telegram, Discord, Slack, WhatsApp, Gmail, and Calendar.
- Run always-on workflows like reminders, research, browser tasks, and chat automation.
- Upgrade your Droplet later when your workflows need more power.
- Test OpenClaw in a real server environment before using it for bigger workflows.
- Best for users who are comfortable with SSH, Linux commands, and basic server maintenance.
When DigitalOcean Is A Good Choice For OpenClaw
Full server control
Use DigitalOcean when you want full control over the VPS, firewall, ports, storage, and OpenClaw configuration.
24/7 OpenClaw runtime
DigitalOcean is useful when you need OpenClaw to stay online even when your laptop is off, sleeping, or disconnected.
Multiple channel workflows
Choose DigitalOcean when you want to connect OpenClaw with Telegram, Discord, Slack, WhatsApp, Gmail, Calendar, or other tools.
Browser automation support
Use DigitalOcean when your OpenClaw setup needs to run browser-based tasks, research workflows, or web automation with enough RAM.
Scalable VPS resources
Start with a smaller Droplet and upgrade CPU, RAM, or storage later as your workflows become heavier.
Developer-friendly setup
DigitalOcean is a good fit if you are comfortable with SSH, Linux commands, firewall rules, updates, and basic server maintenance.
What You Need Before You Start
| Requirement | What You Need | Why It Matters |
|---|---|---|
| DigitalOcean account | A verified account | Needed to create and manage your Droplet |
| Ubuntu Droplet | Ubuntu 24.04 LTS recommended | Gives OpenClaw a stable Linux server |
| SSH access | SSH key or root login | Lets you connect to the server |
| Node.js | Node.js 24 recommended | Required to run OpenClaw properly |
| AI model API key | OpenAI, Anthropic, Gemini, or another provider | Lets OpenClaw use an AI model |
| Gateway token | Strong secure token | Protects OpenClaw gateway access |
| Firewall rules | SSH, HTTP, HTTPS only when needed | Keeps the VPS safer |
| Storage path | Persistent folders for state and workspace | Helps save config, sessions, and workflow files |
| Backup plan | DigitalOcean backups, snapshots, or manual backups | Helps recover if something breaks |
Best DigitalOcean Droplet Size for OpenClaw
| Use Case | Recommended Droplet | Notes |
|---|---|---|
| Basic testing | 1 vCPU, 1 GB RAM | Only for light testing |
| Simple chat workflows | 1 vCPU, 2 GB RAM | Better for basic always-on use |
| Multiple channels | 2 vCPU, 4 GB RAM | Good for Telegram, Discord, Slack, WhatsApp |
| Browser automation | 2 vCPU, 4 GB RAM minimum | Browser tasks need more memory |
| Heavy workflows | 4 vCPU, 8 GB RAM or higher | Better for larger workflows and multiple agents |
| Local LLMs | Not ideal on small Droplets | Use API-based models instead |
How to Set Up OpenClaw on DigitalOcean
Follow these steps to create the Droplet, install OpenClaw, run onboarding, verify the gateway, and access the Control UI safely.
Create a new Droplet in your DigitalOcean account.
Use these settings:
| Setting | Recommended Option |
|---|---|
| Image | Ubuntu 24.04 LTS |
| Size | Basic Droplet, 1 vCPU / 1 GB RAM / 25 GB SSD |
| Region | Closest to your users |
| Authentication | SSH key recommended |
| Backups | Optional, but useful |
For better performance, use a 2 GB or 4 GB RAM Droplet if you plan to run heavier workflows, browser tasks, or multiple channels.
After the Droplet is created, copy the server IP address and connect with SSH:
ssh root@YOUR_DROPLET_IPReplace YOUR_DROPLET_IP with your actual DigitalOcean Droplet IP.
Run this command:
apt update && apt upgrade -yThis updates Ubuntu before installing OpenClaw.
OpenClaw needs Node.js. Install Node.js 24:
curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
apt install -y nodejsCheck the version:
node -vInstall OpenClaw using the official installer:
curl -fsSL https://openclaw.ai/install.sh | bashDo not run OpenClaw as the root user. Create a separate user:
adduser openclaw
usermod -aG sudo openclaw
loginctl enable-linger openclawThen switch to the new user:
su - openclawCheck OpenClaw:
openclaw --versionThis keeps OpenClaw state inside:
/home/openclaw/.openclaw/Cleaner setup. Less “why did root own my entire agent state?” nonsense.
Run:
openclaw onboard --install-daemonThe onboarding wizard helps you set up:
- AI model provider
- API key
- Gateway token
- Channel setup
- Background daemon service
This step is important because it installs OpenClaw as a background service.
If you use a 1 GB RAM Droplet, add 2 GB swap:
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstabSwap helps reduce memory issues on small Droplets. It does not make 1 GB RAM powerful. It just makes it slightly less tragic.
Check if OpenClaw is running:
openclaw statusCheck the gateway service:
systemctl --user status openclaw-gateway.serviceView live logs:
journalctl --user -u openclaw-gateway.service -fOpenClaw gateway binds to loopback by default. That means you should not expose it directly to the public internet.
Use an SSH tunnel from your local computer:
ssh -L 18789:localhost:18789 root@YOUR_DROPLET_IPThen open this in your browser:
http://localhost:18789This is the safest simple method.
Do not publicly open port 18789 unless you know how to secure it properly.
Persistence and Backup
OpenClaw state is stored under:
~/.openclaw/The workspace is stored under:
~/.openclaw/workspace/To create a portable backup, run:
openclaw backup createYou can also use DigitalOcean snapshots to back up the full Droplet.
DigitalOcean Cost Reality For OpenClaw
DigitalOcean can look cheap at first, but the real cost is more than the Droplet price. Tiny surprise: servers need more than vibes and a monthly invoice.
| Cost Item | Estimated Cost |
|---|---|
| Basic Droplet for testing | Starts around $4/month |
| Practical OpenClaw VPS | Usually $12-$24/month |
| Larger VPS for browser automation | Usually $24+/month |
| Backups | Extra monthly cost |
| Extra storage | Around $0.10/GiB/month |
| Domain name | Usually $10-$20/year |
| AI model/API usage | Varies by usage and provider |
| Monitoring or uptime tools | Free to paid, depending on tool |
| Maintenance time | Your own time, sadly not free |
DigitalOcean vs Managed OpenClaw Hosting
| DigitalOcean | Managed OpenClaw Hosting |
|---|---|
| Best for users who want full VPS control | Best for users who want less server work |
| You manage SSH, Linux, firewall, storage, updates, and uptime | Hosting layer is handled for you |
| More flexible for technical users | Easier for beginners and teams |
| Can look cheaper at first | Saves setup and maintenance time |
| Requires server maintenance | Reduces server maintenance |
| Good for custom infrastructure | Good for faster OpenClaw deployment |
- Use DigitalOcean if you want control.
- Use managed hosting if you want OpenClaw running without dealing with server setup, Docker, ports, updates, and uptime maintenance.
Frequently Asked Questions
Can I run multiple OpenClaw agents on one DigitalOcean Droplet?
Can OpenClaw run 24/7 on DigitalOcean?
Do I need Docker to run OpenClaw on DigitalOcean?
What happens if my Droplet runs out of memory?
How do I update OpenClaw on DigitalOcean?
Which ports should I open for OpenClaw on DigitalOcean?
How do I keep OpenClaw data safe on DigitalOcean?
What is the best setup for beginners?
Also Read
Want to Run OpenClaw Without Managing a VPS?
Use Ampere.sh if you want to run OpenClaw without managing DigitalOcean setup, SSH, ports, updates, or server maintenance.
Run OpenClaw Now

