OpenClaw on your laptop is a demo. OpenClaw on a VPS is an assistant.
The difference: when OpenClaw runs on your laptop, it goes offline when you close the lid. Your WhatsApp messages go unanswered. Your Telegram reminders don't fire. The entire point of a persistent AI agent — available 24/7 on your messaging apps — breaks down.
A VPS solves this. It runs continuously, your AI is always reachable, and your data stays on infrastructure you control rather than a SaaS platform.
This is my exact setup on Hostinger KVM 2, and why I chose it over the alternatives.
Why Not Just Use AWS or GCP?
I've used both. For a self-hosted AI agent, they're overkill and overpriced at the low end.
AWS t3.small (2 vCPU, 2 GB RAM): ~₹2,800–3,500/month in ap-south-1 (Mumbai). Barely enough RAM for OpenClaw. USD billing, foreign transaction fees on every charge, complex billing dashboard.
GCP e2-small (0.5–2 vCPU shared, 2 GB RAM): ~₹2,400–3,000/month. Shared CPU that throttles under load.
Hostinger KVM 2 (2 vCPU dedicated, 8 GB RAM, 100 GB NVMe): ~₹600–900/month on 24-month plan. INR billing. 4x the RAM at a third of the price.
For a personal AI agent that doesn't need auto-scaling, multi-region failover, or enterprise SLAs — the right choice is obvious.
Get Hostinger KVM 2: hostinger.in/vps (affiliate link — same price, supports this site)
What I'm Running on This VPS
My Hostinger KVM 2 (India/Mumbai datacenter, Ubuntu 22.04) runs:
- OpenClaw — AI agent, connected to WhatsApp + Telegram
- Ollama (optional) — local Llama 3.1 8B for low-cost routine tasks
- MasterPrompting.net — this Next.js site, via Nginx
- Caddy — reverse proxy handling SSL for all services
Total RAM usage: ~4–5 GB with everything running. Plenty of headroom.
Step 1: Provision Your VPS
After purchasing Hostinger KVM 2:
- Select Ubuntu 22.04 LTS as the OS
- Choose the India (Mumbai) datacenter (lowest latency for India)
- Add your SSH public key during setup (much easier than password auth)
SSH in:
ssh root@YOUR_VPS_IP
Create a non-root user and configure firewall:
adduser deploy
usermod -aG sudo deploy
ufw allow OpenSSH
ufw allow 80
ufw allow 443
ufw enable
Step 2: Install Docker and Docker Compose
sudo apt update && sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker deploy
newgrp docker
Step 3: Clone and Configure OpenClaw
su - deploy
git clone https://github.com/openclaw/openclaw.git
cd openclaw
cp .env.example .env
nano .env
Minimum production config:
# Secret key — generate with: openssl rand -hex 32
OPENCLAW_SECRET=your-64-char-secret-here
# LLM provider
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini # cheaper model for routine tasks
# Or use Anthropic
# ANTHROPIC_API_KEY=sk-ant-...
# ANTHROPIC_MODEL=claude-haiku-4-5-20251001
# Telegram
TELEGRAM_BOT_TOKEN=your-bot-token
TELEGRAM_ALLOWED_USER_IDS=your-telegram-id
# WhatsApp
WHATSAPP_ENABLED=true
WHATSAPP_SESSION_PATH=./data/whatsapp-session
WHATSAPP_ALLOWED_NUMBERS=+91XXXXXXXXXX
# Port (we'll proxy this through Nginx)
PORT=3000
NODE_ENV=production
Step 4: Docker Compose for Production
The default docker-compose.yml is fine. For production, add a restart policy and health check:
version: "3.8"
services:
openclaw:
build: .
restart: unless-stopped # auto-restart on crash or reboot
ports:
- "127.0.0.1:3000:3000" # bind to localhost only — Nginx will proxy
env_file:
- .env
volumes:
- ./data:/app/data # persist session and memory data
- ./soul.md:/app/soul.md # persist your SOUL.md
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
Start OpenClaw:
docker compose up -d
docker compose logs -f openclaw # watch startup
Step 5: Nginx Reverse Proxy + SSL
Install Nginx and Certbot:
sudo apt install nginx certbot python3-certbot-nginx -y
Create a config for OpenClaw's web UI (optional — if you want to access it at a domain):
sudo nano /etc/nginx/sites-available/openclaw.yourdomain.com
server {
listen 80;
server_name openclaw.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache_bypass $http_upgrade;
}
}
sudo ln -s /etc/nginx/sites-available/openclaw.yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
# Add SSL
sudo certbot --nginx -d openclaw.yourdomain.com
Now your OpenClaw web UI is accessible at https://openclaw.yourdomain.com.
Step 6: WhatsApp QR Scan
WhatsApp needs a one-time QR scan to link the session. With the server running:
docker compose logs openclaw | grep -A 30 "WhatsApp QR"
Or visit https://openclaw.yourdomain.com/settings/whatsapp in your browser to scan from the web UI.
After scanning, the session is saved to ./data/whatsapp-session/. It persists across restarts.
Step 7: Optional — Add Ollama for Local LLM
The KVM 2's 8 GB RAM is enough to run Ollama with Llama 3.1 8B alongside OpenClaw:
curl -fsSL https://ollama.ai/install.sh | sh
sudo systemctl enable ollama
sudo systemctl start ollama
ollama pull llama3.1:8b
Add to .env:
# Hybrid setup: use local model by default, cloud for complex tasks
LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.1:8b
# Keep cloud key for fallback
OPENAI_API_KEY=sk-...
With this setup, your AI runs at zero LLM cost for routine tasks — only complex requests hit the cloud API. The VPS itself is the only ongoing cost.
Keeping Everything Running
Auto-updates (optional)
# Cron job to pull latest OpenClaw and restart weekly
crontab -e
# Add this line (runs every Sunday at 3am IST):
0 21 * * 0 cd /home/deploy/openclaw && git pull origin main && docker compose pull && docker compose up -d
Monitoring disk space
OpenClaw's memory database and WhatsApp session files grow over time. Check weekly:
du -sh /home/deploy/openclaw/data/
The 100 GB NVMe on KVM 2 is more than enough for years of conversation memory.
Checking status
docker compose ps # container status
docker compose logs --tail 50 # recent logs
free -h # RAM usage
df -h # disk usage
Total Cost Breakdown
| Item | Cost |
|---|---|
| Hostinger KVM 2 (24-month) | ~₹600–900/month |
| OpenClaw | Free (open source) |
| LLM API (OpenAI gpt-4o-mini) | ~₹500–2,000/month depending on usage |
| LLM with Ollama (local) | ₹0 |
| SSL (Let's Encrypt) | Free |
| Total (with cloud LLM) | ~₹1,200–3,000/month |
| Total (with Ollama) | ~₹600–900/month |
For a fully private, always-on AI agent available on WhatsApp and Telegram, that's exceptional value compared to any SaaS alternative.
What This Gives You
Running OpenClaw on a VPS means:
- Always on — responds at 3am, on weekends, when your laptop is closed
- Fully private — your data never leaves servers you control
- Persistent memory — knows everything you've told it, indefinitely
- Your numbers — WhatsApp/Telegram on your phone, AI runs silently in the background
- Extendable — run other projects on the same VPS, build custom skills
This is the setup I use for MasterPrompting and my own daily workflow. The Hostinger KVM 2 has been reliable for months without intervention.
If you haven't set up OpenClaw yet: Getting Started Guide → For connecting messaging apps: WhatsApp and Telegram Setup →