Hostinger OpenClaw Setup: Complete 2026 Guide
Setting up OpenClaw on Hostinger VPS involves four phases: server preparation (Ubuntu + Docker), OpenClaw deployment (Docker Compose), configuration (API keys, tools, agents), and production hardening (SSL, monitoring, backups). This guide covers each phase in detail, including multi-model setup with Claude, GPT, and Grok, plus integrations with Discord, Telegram, and browser automation.
What We're Building
By the end of this guide, you'll have a production-ready OpenClaw instance running on Hostinger VPS with:
- Docker-based deployment with automatic restarts
- Multi-model AI support (Claude, GPT-4, Grok)
- HTTPS with automatic SSL certificate renewal
- Persistent memory and configuration
- Optional integrations: Discord bot, Telegram bot, browser automation
- Automated backups to prevent data loss
Total cost: $4.99/mo (Hostinger KVM 1) + AI API usage ($5-20/mo typical).
Prerequisites
Before starting:
- Hostinger VPS KVM 1 or higher (purchase at hostinger.com)
- A domain name pointed to your VPS IP (for SSL)
- At least one AI API key: Anthropic (Claude), OpenAI (GPT), or xAI (Grok)
- Basic terminal comfort (copy-paste commands is fine)
If you haven't set up your VPS yet, follow our Hostinger VPS setup guide first — it covers SSH, firewall, and Docker installation in detail.
Phase 1: Deploy OpenClaw with Docker Compose
SSH into your VPS and create the OpenClaw project:
mkdir -p ~/openclaw && cd ~/openclaw
mkdir -p data config
# Create the environment file
cat > .env << 'EOF'
# AI Model API Keys (add the ones you have)
ANTHROPIC_API_KEY=sk-ant-your-key
OPENAI_API_KEY=sk-your-key
XAI_API_KEY=xai-your-key
# OpenClaw Configuration
OPENCLAW_PORT=3000
OPENCLAW_DATA_DIR=/app/data
EOF
# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
services:
gateway:
image: openclaw/gateway:latest
env_file: .env
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./data:/app/data
- ./config:/app/config
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
EOF
docker compose up -d
docker compose logs -f --tail=50Wait for the "Gateway ready" message in the logs. Press Ctrl+C to exit log view (the container continues running).
Phase 2: HTTPS with Traefik Reverse Proxy
Add Traefik for automatic SSL:
cat > docker-compose.yml << 'EOF'
services:
traefik:
image: traefik:v3.0
command:
- --api.dashboard=false
- --providers.docker
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.websecure.address=:443
- --certificatesresolvers.le.acme.email=you@yourdomain.com
- --certificatesresolvers.le.acme.storage=/acme.json
- --certificatesresolvers.le.acme.httpchallenge.entrypoint=web
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./acme.json:/acme.json
restart: unless-stopped
gateway:
image: openclaw/gateway:latest
env_file: .env
volumes:
- ./data:/app/data
- ./config:/app/config
labels:
- traefik.http.routers.openclaw.rule=Host(`ai.yourdomain.com`)
- traefik.http.routers.openclaw.tls.certresolver=le
- traefik.http.services.openclaw.loadbalancer.server.port=3000
restart: unless-stopped
EOF
touch acme.json && chmod 600 acme.json
docker compose up -dReplace ai.yourdomain.com with your actual domain. Ensure DNS A record points to your VPS IP. SSL certificate will be obtained automatically within minutes.
Phase 3: Configure Models and Tools
OpenClaw supports multiple AI models and tools. Configure them through the web interface at https://ai.yourdomain.com or via config files:
Multi-model setup: OpenClaw automatically routes to the best available model based on your API keys. With Claude + GPT configured, it uses Claude for complex reasoning and GPT for quick responses.
Tool integrations you can enable:
- Browser automation — web scraping, form filling, research
- File system — read/write files, manage documents
- Shell execution — run commands, scripts, builds
- Messaging — Discord, Telegram, WhatsApp bot integrations
- Calendar — Google Calendar integration
- Email — Gmail send/receive via OAuth
Phase 4: Production Hardening
Make your deployment production-ready:
# Set up automated backups
crontab -e
# Add: 0 3 * * * cd ~/openclaw && tar czf ~/backups/openclaw-$(date +%Y%m%d).tar.gz data config .env
# Set up log rotation
cat > /etc/logrotate.d/docker << 'EOF'
/var/lib/docker/containers/*/*.log {
rotate 7
daily
compress
missingok
delaycompress
copytruncate
}
EOF
# Set up automatic Docker image updates (optional)
# Install watchtower for auto-updates
docker run -d --name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower --interval 86400Also recommended: set up UptimeRobot (free) to monitor your OpenClaw instance and alert you if it goes down.
Frequently Asked Questions
Which Hostinger VPS plan is best for OpenClaw?
KVM 1 ($4.99/mo, 4GB RAM) for a single agent setup. KVM 2 ($6.99/mo, 8GB RAM) if you run multiple agents or heavy tool integrations. KVM 4 ($12.99/mo) for production multi-agent deployments with database-backed memory.
Can I use multiple AI models with OpenClaw?
Yes — OpenClaw supports Claude (Anthropic), GPT (OpenAI), Gemini (Google), and Grok (xAI). Add multiple API keys in your .env file and OpenClaw routes intelligently. You can also specify which model to use per agent or per task.
How do I connect OpenClaw to Discord?
Create a Discord bot in the Discord Developer Portal, get the bot token, add it to your OpenClaw configuration, and invite the bot to your server. OpenClaw handles the Discord API integration — your AI agent responds to messages in channels and DMs.
What happens if my VPS goes down?
Docker's restart policy (unless-stopped) automatically restarts OpenClaw if it crashes. For VPS-level downtime (rare — 99.97% uptime in our tests), services resume automatically when the VPS comes back online. Persistent data is stored in Docker volumes.
How do I back up my OpenClaw data?
The data and config directories contain all persistent state. Set up a cron job to tar and compress these directories daily. For offsite backups, use rclone to sync to any cloud storage (S3, Backblaze B2, Google Drive).
- 1
Deploy OpenClaw with Docker
Create project directory, configure environment variables with API keys, write docker-compose.yml, and run docker compose up -d.
- 2
Add HTTPS with Traefik
Add Traefik reverse proxy to Docker Compose, point your domain DNS to VPS IP, SSL certificates auto-provision via Let's Encrypt.
- 3
Configure models and tools
Access the OpenClaw web interface, configure AI models (Claude, GPT, Grok), and enable tool integrations (browser, messaging, email).
- 4
Harden for production
Set up automated backups, log rotation, and uptime monitoring. Optionally add Watchtower for automatic Docker image updates.
Get Hostinger VPS for OpenClaw
Self-host your AI agent for $4.99/mo. Full guide above — follow along with a fresh Hostinger VPS.
Try Hostinger VPSHenry Fontaine
Chief of Staff & COO, RocketLabs
AI-native operator building the future of search visibility. Part of the team behind 3 tech exits and 400+ programmatic SEO deployments.