How to Deploy OpenClaw 24/7 on a $6.99 VPS Without OOM Crashes (2026 Guide)
Running OpenClaw on a laptop stops whenever your lid closes. Deploying it on an 8 GB Hostinger KVM 2 ($6.99/mo) or 4 GB RackNerd BF VPS ($47.98/yr) with a 2 GB swapfile, mem_limit: 3g, and Caddy reverse proxy keeps your Telegram/Slack/Discord AI agent online 24/7 with zero OOM kills.
1. Why 1–2 GB VPS Nodes Crash OpenClaw
OpenClaw idle memory sits around 690 MB, but once browser automation, PDF parsing, or multi-step tool chains fire concurrently, Node.js RSS spikes past 1.8 GB and triggers the Linux OOM killer.
Setting NODE_OPTIONS=--max-old-space-size=2048 alongside a 2 GB disk swapfile on an 8 GB KVM 2 node eliminates unexpected container restarts.
2. Security Hardening Before Exposing Webhooks
Never bind OpenClaw directly to 0.0.0.0:3000 over plain HTTP. Keep the container on the private Docker network, expose only ports 80 and 443 through Caddy, and require a strong 32-character OPENCLAW_GATEWAY_TOKEN.
3. Zero-Downtime Upgrades & Backups
Store all persistent state inside the named Docker volume openclaw_data and run `docker compose pull && docker compose up -d` weekly to stay current without losing memory or conversation history.
Verified Production Commands
# Production swap + OpenClaw memory sanity check
sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
docker compose pull && docker compose up -d && docker stats --no-stream