Guide
OpenClaw on Contabo — Self-Host Your AI Agent on Contabo VPS
A complete walkthrough for deploying OpenClaw on a Contabo VPS: install Docker, configure your AI agent, and optionally add a custom domain with auto-HTTPS.
Why Contabo for OpenClaw?
Contabo has earned a reputation as one of the most value-packed VPS providers on the market. Their Cloud VPS plans offer unusually high specs for the price — you can get 8 GB of RAM for around $7/mo, which is significantly more headroom than comparably priced plans from other providers. For self-hosting OpenClaw, that extra RAM matters: it means fewer out-of-memory crashes and room to run additional skills like browser automation or session memory.
- Outstanding value: Cloud VPS M (4 vCPU, 8 GB RAM, 100 GB SSD NVMe) starts at roughly $7–9/mo — among the best raw specs per dollar available.
- Global data centers: Locations in the US (Ashburn, Chicago, Seattle), EU (Germany, Netherlands), Asia (Singapore, Japan), and Australia — pick the region closest to your users.
- KVM virtualization: Full kernel-level isolation with dedicated resources, so Docker runs natively without compatibility workarounds.
- Ubuntu support: Ubuntu 22.04 and 24.04 are both available, and Docker's official install script works perfectly on both.
Requirements
Before you start, make sure you have:
- A Contabo Cloud VPS on the M plan or higher (4 vCPU, 8 GB RAM, 100 GB SSD — ~$7–9/mo). The S plan (2 vCPU, 4 GB RAM) is the minimum and may cause out-of-memory issues under load.
- Ubuntu 22.04 or 24.04 as the operating system (selected during VPS setup).
- Root SSH access to your server.
- A domain name (optional — only needed if you want HTTPS access to the OpenClaw gateway).
- An OpenRouter API key (or any other supported model provider key) for your AI agent.
- A Telegram bot token and/or Discord bot token to connect channels.
Step 1: Get a Contabo VPS
Head to contabo.com and navigate to Cloud VPS. The Cloud VPS M plan is the recommended starting point for OpenClaw. During setup:
- Select Ubuntu 22.04 or Ubuntu 24.04 as your OS image.
- Choose the data center region closest to your users.
- Set a root password during checkout (Contabo emails you the credentials after provisioning).
- Complete the purchase and wait for provisioning — Contabo typically takes 10–30 minutes to activate a new VPS.
- Note your server's IP address from the Contabo Customer Control Panel (CCP).
Step 2: Install Docker
SSH into your VPS, then update the system and install Docker using the official script:
ssh root@your-server-ip
# Update system packages
apt update && apt upgrade -y
# Install Docker using the official script
curl -fsSL https://get.docker.com | sh
# Verify Docker installed correctly
docker --version
# Enable Docker to start on boot
systemctl enable docker
systemctl start dockerThe install script automatically detects Ubuntu and installs the correct Docker CE version. After running it, docker --version should print something like Docker version 27.x.x.
Step 3: Deploy OpenClaw
Create the config directory and start the OpenClaw container:
# Create the config directory (with credentials subdirectory for DM pairing)
mkdir -p ~/openclaw/credentials
chmod 777 ~/openclaw
chmod 777 ~/openclaw/credentials
# Pull the OpenClaw image
docker pull ghcr.io/openclaw/openclaw:main
# Run the container
docker run -d \
--name openclaw \
--restart unless-stopped \
--memory=4g --memory-swap=6g \
-v ~/openclaw:/home/node/.openclaw \
-p 18789:18789 \
ghcr.io/openclaw/openclaw:main \
node openclaw.mjs gateway --allow-unconfigured
# Verify the container started
docker logs openclawKey flags explained:
--memory=4g --memory-swap=6g— Allocates 4 GB RAM on the M plan. OpenClaw needs at least 2 GB; 4 GB gives comfortable headroom for most workloads.-v ~/openclaw:/home/node/.openclaw— Mounts your config directory into the container. The container writes config changes back to this path.-p 18789:18789— Exposes the OpenClaw web gateway on port 18789.--restart unless-stopped— Auto-restarts the container after crashes or server reboots.ghcr.io/openclaw/openclaw:main— Always use the:maintag, not:latest(which doesn't exist).
chmod 777 on the config directory is required because the container runs as user node (uid 1000), which is different from your host root user. Without it, OpenClaw can't write its config files.Step 4: Configure Your AI Agent
Create ~/openclaw/openclaw.json with your settings. Here's a complete example with Telegram and Discord:
{
"gateway": {
"port": 18789,
"auth": { "token": "your-random-secret-token" },
"controlUi": { "allowInsecureAuth": true }
},
"models": {
"providers": {
"openrouter": {
"apiKey": "sk-or-your-openrouter-api-key"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "openrouter/anthropic/claude-sonnet-4.6"
},
"systemPrompt": "You are a helpful AI assistant."
}
},
"channels": {
"telegram": {
"enabled": true,
"botToken": "123456:ABC-your-telegram-bot-token",
"dmPolicy": "pairing"
},
"discord": {
"enabled": true,
"botToken": "your-discord-bot-token",
"dmPolicy": "open",
"allowFrom": ["*"]
}
},
"plugins": {
"entries": {
"telegram": { "enabled": true },
"discord": { "enabled": true }
}
}
}Important configuration notes:
gateway.authmust be an object with atokenproperty — not a plain string.- Both
channels.X.enabled: trueANDplugins.entries.X.enabled: trueare required for a channel to work. - Model IDs must be prefixed with the provider:
openrouter/anthropic/claude-sonnet-4.6, not justanthropic/claude-sonnet-4.6. - Telegram
dmPolicyshould always be"pairing"— never"open", as that allows anyone on the internet to use your bot. - Discord
dmPolicy: "open"requiresallowFrom: ["*"]to pass config validation.
After saving the config, restart the container to apply it:
docker restart openclawStep 5: Set Up a Domain (Optional)
If you want to access the OpenClaw gateway over HTTPS with a custom domain (e.g. bot.yourdomain.com), set up Caddy as a reverse proxy. Caddy automatically provisions and renews SSL certificates via Let's Encrypt.
First, point your domain's A record to your Contabo VPS IP address. Then:
# Install Caddy
apt install -y debian-keyring debian-archive-keyring apt-transport-https
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 caddyCreate /etc/caddy/Caddyfile:
bot.yourdomain.com {
reverse_proxy localhost:18789
}Restart Caddy to apply:
systemctl restart caddyCaddy will obtain an SSL certificate automatically. Your OpenClaw gateway will be accessible at https://bot.yourdomain.com.
Contabo VPS Plans for OpenClaw
Here's how Contabo's Cloud VPS plans stack up for running OpenClaw:
| Plan | vCPU | RAM | Storage | Est. Price | Verdict |
|---|---|---|---|---|---|
| Cloud VPS S | 2 | 4 GB | 50 GB SSD | ~$5–6/mo | Minimum — tight on RAM under load |
| Cloud VPS M | 4 | 8 GB | 100 GB SSD | ~$7–9/mo | Recommended for OpenClaw |
| Cloud VPS L | 6 | 16 GB | 200 GB SSD | ~$13–15/mo | Ideal for multiple bots or heavy workloads |
| Cloud VPS XL | 8 | 30 GB | 400 GB SSD | ~$22+/mo | Overkill for a single OpenClaw instance |
Self-Hosted vs Managed Hosting
Self-hosting OpenClaw on Contabo gives you full control and maximum specs per dollar, but it also means you're responsible for updates, security patches, monitoring uptime, and handling Docker issues when they arise. Here's how it compares to OpenClaw Launch:
| Contabo VPS (Self-Hosted) | OpenClaw Launch | |
|---|---|---|
| Setup time | 2–4 hours | 10 seconds |
| Monthly cost | ~$7–9/mo (VPS M) + your time | From $6/mo |
| Maintenance | Manual updates, backups, monitoring | Fully managed |
| Visual config editor | No — edit JSON manually | Yes — point-and-click |
| Automatic updates | Manual docker pull + restart | Automatic |
| Uptime monitoring | Set up yourself | Built-in |
Skip the Setup — Deploy in 10 Seconds
Self-hosting on Contabo is a great choice if you want maximum specs per dollar and don't mind managing a server. But if you'd rather skip the VPS setup, Docker troubleshooting, and ongoing maintenance:
OpenClaw Launch deploys a fully managed OpenClaw instance in 10 seconds — no VPS, no Docker, no server maintenance. Visual configuration editor, automatic updates, built-in skills, and plans starting at $6/mo.
Deploy Now →