OpenClaw on DigitalOcean: Step-by-Step Setup Guide
This guide is for people who want to run OpenClaw on DigitalOcean with a self-hosted setup.
I’ll keep it practical and honest: the goal is a setup that stays up, is reachable securely, and doesn’t require constant babysitting.
If you’d rather skip server work entirely, the managed option is:
Now, the DIY route.
1) Choose a Droplet Size
For most personal use cases, start with:
- 1–2 vCPU
- 2–4 GB RAM
- SSD storage
If you plan heavier usage (more integrations, more parallel requests), size up.
Tip: picking a region close to you reduces latency in chat.
2) Create the Droplet (Security Defaults)
When creating the Droplet:
- use SSH keys (avoid password login)
- enable backups if you care about quick recovery
After creation, do basic hardening:
- update packages
- create a non-root user
- disable root password login
If you want the bare-minimum commands for a fresh Ubuntu droplet:
sudo apt-get update
sudo apt-get -y upgrade
Create a non-root user (example name openclaw), add it to sudo, and use SSH keys:
sudo adduser openclaw
sudo usermod -aG sudo openclaw
Then log in as that user and continue.
3) Install Docker
OpenClaw is commonly deployed via Docker.
Install Docker and verify:
docker --versiondocker compose version
On Ubuntu, the official Docker install docs are the safest reference. The goal is simply: Docker + Compose installed cleanly and running.
4) Deploy OpenClaw
Follow the OpenClaw docs for the most accurate install steps.
At minimum, confirm:
- OpenClaw starts without errors
- you can access the UI locally on the server
Don’t expose it publicly yet.
If you’re using Docker Compose, keep your config in a folder like:
/opt/openclaw/
That makes it easier to back up and upgrade.
5) Set Up a Firewall (Do This Before Exposing Anything)
At a minimum, you generally want:
- allow SSH (ideally restricted)
- allow HTTP/HTTPS only through your reverse proxy
Avoid opening random ports “just to test.” It’s easy to forget them later.
On Ubuntu, a simple starting point is UFW:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status
This is intentionally conservative: SSH + web ports only.
6) Add HTTPS With a Reverse Proxy
To use OpenClaw safely from your phone, you’ll want HTTPS.
Typical approach:
- a reverse proxy (Nginx/Caddy/Traefik)
- a domain name pointing to your Droplet
- Let’s Encrypt certificates
This is often the hardest part for first-time self-hosters.
A simple approach: Caddy
If you want a beginner-friendly reverse proxy, Caddy is popular because it can manage HTTPS certificates automatically.
High-level steps:
- buy a domain
- point DNS
Arecord to your droplet IP - run a reverse proxy that terminates HTTPS
Then route requests to OpenClaw internally.
If you’ve never done reverse proxies before, expect to spend time here.
If you do this wrong, you risk:
- exposing admin UI
- running without TLS
- breaking access when certificates renew
7) Make It Survive Reboots
“It works right now” is not the same as “it runs 24/7.”
Make sure:
- Docker containers restart automatically
- the system reboots cleanly
- you can recover from failures
Test it:
- reboot the Droplet
- confirm OpenClaw is still reachable
If it isn’t reachable after a reboot, that usually means one of:
- containers weren’t configured to restart
- reverse proxy didn’t come back up
- firewall rules changed
8) Monitoring (Keep It Simple)
You don’t need enterprise monitoring, but you should be able to answer:
- is it running?
- is disk full?
- are errors happening?
At minimum, keep a quick way to view logs.
Two simple habits that prevent most “mystery outages”:
- check disk usage weekly for the first month
- keep a notes file with: domain, ports, proxy config, compose file location
9) Updates Without Regret
Before updating:
- snapshot/back up
- write down current versions
After updating:
- verify your main workflow
- check logs
If you’re upgrading frequently, consider snapshots before major changes. Snapshots are often the fastest rollback.
Common Problems (And What They Usually Mean)
UI won’t load externally
Often:
- firewall rules
- reverse proxy config
- DNS mismatch
Also check:
- whether your reverse proxy is listening on ports 80/443
- whether the OpenClaw service is bound only to localhost (which is good) vs public (which is risky)
Messages work sometimes, then stop
Often:
- container restarts
- credentials expiry
- network reachability issues
Also check timeouts and rate limits on the provider side.
When You Should Not Self-Host
If you read the above and thought “I don’t want to do any of this,” that’s exactly what managed hosting is for.
It’s also worth being honest about why most self-host attempts fail:
- it works on day one
- a reboot or update happens
- something small breaks
- nobody wants to debug it again
If your goal is a reliable assistant, not a server project, managed hosting is often the correct tool.
LeapClue is the simplest “OpenClaw in the cloud” path:
If you want more context before deciding, read:
Ready to deploy OpenClaw in the cloud?
Skip the server setup. LeapClue gives you your own OpenClaw instance in under 2 minutes.
Get Started Free