OpenClaw on Hetzner: Cheapest Cloud Setup in 2026
Run OpenClaw on Hetzner Cloud for as low as €4.51/month. Complete setup guide including Docker, Caddy TLS, and security configuration.
Hetzner Cloud offers the best price-to-performance ratio for self-hosting OpenClaw in 2026. A CX22 instance with 4GB RAM costs €4.51/month — roughly half the price of equivalent DigitalOcean or AWS instances. This guide covers the complete Hetzner setup with Caddy as a zero-config reverse proxy for automatic TLS.
Why Hetzner?
- Price: CX22 (4GB RAM, 2 vCPU, 40GB SSD) at €4.51/month is exceptional value
- Performance: Modern AMD EPYC processors with NVMe storage
- Locations: Nuremberg, Falkenstein (EU), Helsinki, Ashburn (US), Singapore (Asia)
- Privacy: German company, GDPR-compliant data centres, no US CLOUD Act exposure
Step 1: Create a Hetzner Server
- Go to hetzner.com/cloud and create a project
- Click Add Server
- Location: Choose the region closest to your users
- Image: Ubuntu 24.04
- Type: Shared vCPU > CX22 (4GB RAM recommended; CX11 at 2GB is minimum)
- Add SSH key
- Click Create & Buy Now
Step 2: Install Docker and Caddy
ssh root@your-hetzner-ip
# Update and install Docker
apt update && apt upgrade -y
curl -fsSL https://get.docker.com | bash
# Install Caddy (Debian/Ubuntu)
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update && apt install caddy
Step 3: Set Up OpenClaw with Docker
mkdir /opt/openclaw && cd /opt/openclaw
curl -O https://github.com/OpenClaw/OpenClaw/releases/latest/download/docker-compose.yml
cp .env.example .env
# Edit .env with your API keys
nano .env
docker compose up -d
Step 4: Configure Caddy for Automatic TLS
Create /etc/caddy/Caddyfile:
openclaw.yourdomain.com {
reverse_proxy localhost:3000
encode gzip zstd
header {
Strict-Transport-Security "max-age=31536000"
X-Content-Type-Options nosniff
X-Frame-Options DENY
}
}
systemctl reload caddy
# Caddy automatically obtains and renews Let's Encrypt certificates
Step 5: Hetzner Firewall (Recommended)
Configure Hetzner's network-level firewall before relying solely on UFW:
- In Hetzner Cloud Console, go to Firewalls > Create Firewall
- Add inbound rules: TCP 22 (SSH), TCP 80 (HTTP), TCP 443 (HTTPS)
- Block all other inbound by default
- Apply the firewall to your server
# Also configure UFW on the server
ufw allow ssh
ufw allow http
ufw allow https
ufw enable
Cost Summary
| Component | Monthly Cost |
|---|---|
| CX22 server | €4.51 |
| Backups (optional) | €0.68 |
| Floating IP (optional) | €1.19 |
| Total | €4.51–€6.38 |
Compare to nacre.sh at $12/month — if you're comfortable with Linux administration, Hetzner saves you about $5–7/month. If your time is worth more than $10/hour, the managed option pays for itself in the first hour of maintenance.
Frequently Asked Questions
Is Hetzner reliable enough for production?
Hetzner's infrastructure reliability is excellent — better than their price suggests. The main risk is self-hosting itself: your configuration and maintenance choices introduce the most failure modes.
How do I back up my OpenClaw data on Hetzner?
Enable Hetzner's server backup feature (€0.68/month) for full-disk snapshots. Additionally, export OpenClaw's memory and configuration regularly using /export to a separate storage location.
nacre.sh
Run OpenClaw without the server headaches
Dedicated instance, automatic TLS, nightly backups, and 290+ LLM integrations. Live in under 90 seconds from $12/month.
Deploy your agent →