Set Up OpenClaw on Hetzner Cloud
$4.51/mo
Great for developers who want raw performance at a low price. Popular in Europe.
Setup Guide for Hetzner Cloud
Pros
- Excellent performance/price
- European data centers
- Developer-friendly
- Hourly billing
Cons
- EU-only servers
- No managed Docker
Quick Overview
Hetzner Cloud offers some of the best price-to-performance in the industry. Their CX22 plan gives you 2 vCPUs, 4 GB RAM, and 40 GB NVMe for around $4.51/mo. You can use the web console or the hcloud CLI for setup.
Option A: Web Console Setup
- Sign up at hetzner.com/cloud
- Create a new project
- Click Add Server
- Choose location (Falkenstein, Nuremberg, Helsinki, or Ashburn)
- Select Ubuntu 24.04 image
- Pick CX22 (2 vCPU, 4 GB RAM) — ~$4.51/mo
- Add your SSH key (or set a root password)
- Click Create & Buy Now
Option B: hcloud CLI Setup
# Install hcloud CLI (macOS)
brew install hcloud
# Or on Linux
curl -fsSL https://github.com/hetznercloud/cli/releases/latest/download/hcloud-linux-amd64.tar.gz | tar xz
sudo mv hcloud /usr/local/bin/
# Authenticate
hcloud context create openclaw
# Create server
hcloud server create \
--name openclaw \
--type cx22 \
--image ubuntu-24.04 \
--location fsn1 \
--ssh-key your-key-name
Step 2: SSH In and Install Docker
ssh root@YOUR_SERVER_IP
# Update packages
apt update && apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com | sh
apt install -y docker-compose-plugin
docker --version
Step 3: Deploy OpenClaw
mkdir -p /opt/openclaw && cd /opt/openclaw
cat > docker-compose.yml << 'EOF'
services:
openclaw:
image: ghcr.io/nicepkg/openclaw:latest
container_name: openclaw
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./data:/app/data
environment:
- OPENAI_API_KEY=your-api-key-here
- GATEWAY_TOKEN=your-secret-token
EOF
docker compose up -d
Environment Variables
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | Yes | Your OpenAI API key |
GATEWAY_TOKEN | Yes | Secret token to protect the web gateway |
Verify It's Running
docker compose ps
docker compose logs -f openclaw
curl http://localhost:3000
Common Issues
Firewall blocking access: Hetzner's built-in firewall is off by default, but if you enabled it, allow TCP 3000: hcloud firewall add-rule your-fw --direction in --protocol tcp --port 3000 --source-ips 0.0.0.0/0 --source-ips ::/0
Server location matters: Pick Falkenstein (fsn1) or Nuremberg (nbg1) for best EU latency, Ashburn (ash) for US users.
Hourly billing: Hetzner bills hourly, so you can spin up a test server, try OpenClaw, and delete it — costs just a few cents.
Frequently Asked Questions
Is Hetzner Cloud good for beginners?
Yes — Hetzner Cloud is a solid choice for deploying OpenClaw. Excellent performance/price
How long does Hetzner Cloud setup take?
Most users get OpenClaw running on Hetzner Cloud in about 15 minutes. The process involves deploying a VPS, installing Docker, and starting the OpenClaw container.
Is Hetzner Cloud the cheapest option for OpenClaw?
Hetzner Cloud is priced at $4.51/mo. For a full comparison of all hosting options, check our setup guide at setupopenclaw.ai/setup.