🦞OpenClaw Guide
← Back to BlogTutorial

OpenClaw VPS Setup That Actually Works

2026-02-2510 min read

Last Updated: February 2026

"Like pulling teeth." That's how one Reddit user described Hostinger's one-click OpenClaw setup. WhatsApp QR code failing. Chromium not integrating. JSON schemas broken out of the box.

This guide skips all of that. Here's a VPS setup for OpenClaw that actually works — tested, reliable, and ready for 24/7 operation.


Which VPS Should You Use?

Don't use the "one-click" OpenClaw installs from hosting providers. They're outdated and poorly configured. Install manually — it takes 15 minutes and works properly.

Recommended providers:

ProviderCheapest PlanNotes
Hetzner€4.15/mo (CX22)Best price/performance in Europe
DigitalOcean$6/mo (Basic)Easy, reliable, good docs
Vultr$6/moSimilar to DO
Linode (Akamai)$5/moSolid option

Minimum specs: 2 vCPU, 2GB RAM, 20GB storage

If you want browser automation (Chromium), go 4GB RAM minimum. Browser tasks are memory-hungry.

Get $200 credit on DigitalOcean: m.do.co/c/35a6bc0da4fc — enough for 2–3 months free.


Step 1: Create Your VPS

  1. Create an account on your chosen provider
  2. Create a new droplet/server with:
    • OS: Ubuntu 22.04 LTS (not 24.04 — some packages behave differently)
    • Region: Closest to where you'll use it (reduces latency on browser tasks)
    • SSH key: Add your public key now. Don't rely on passwords.
  3. Note your server IP address

Step 2: Initial Server Setup

SSH into your server:

ssh root@YOUR_SERVER_IP

Update everything:

apt update && apt upgrade -y

Create a non-root user (don't run OpenClaw as root):

adduser openclaw
usermod -aG sudo openclaw
rsync --archive --chown=openclaw:openclaw ~/.ssh /home/openclaw

Switch to the new user:

su - openclaw

Step 3: Install Node.js

OpenClaw requires Node.js 18+:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
node --version  # should show v20.x

Step 4: Install OpenClaw

npm install -g openclaw
openclaw --version

Run the setup wizard:

openclaw setup

This will walk you through:

  • Setting your model provider (Anthropic, OpenRouter, etc.)
  • Setting your API key
  • Choosing your default model

Important: During setup, when asked about the gateway bind address, choose 127.0.0.1 (loopback only) — not 0.0.0.0. This keeps your agent inaccessible from the public internet.


Step 5: Set Up Messaging (Telegram Recommended)

For VPS deployments, Telegram is the most reliable channel. No QR code required (unlike WhatsApp), works anywhere.

openclaw channel add telegram

Follow the prompts to connect your bot token. Once connected, you can talk to your agent from your phone while the server handles everything in the background.

If you want WhatsApp: it requires a QR code scan, which requires running it locally first. For VPS, set up Telegram first and add WhatsApp later if needed.


Step 6: Configure Chromium (Optional but Important)

If you want browser automation (web scraping, form filling, etc.):

sudo apt install -y chromium-browser

Then configure OpenClaw to use it:

openclaw config set browser.executable /usr/bin/chromium-browser
openclaw config set browser.headless true

VPS browser issue: Many VPS providers block display output. For headless Chromium, you need Xvfb:

sudo apt install -y xvfb
Xvfb :99 -screen 0 1280x720x24 &
export DISPLAY=:99

Add that to your startup script so it persists across reboots.


Step 7: Run OpenClaw as a Service (24/7)

Don't just run openclaw gateway start in a terminal — it dies when you disconnect. Use systemd:

sudo nano /etc/systemd/system/openclaw.service

Paste:

[Unit]
Description=OpenClaw Gateway
After=network.target

[Service]
Type=simple
User=openclaw
WorkingDirectory=/home/openclaw/clawd
ExecStart=/usr/bin/openclaw gateway start
Restart=always
RestartSec=10
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable openclaw
sudo systemctl start openclaw
sudo systemctl status openclaw

Your agent now runs on boot and restarts automatically if it crashes.


Step 8: Security Hardening (Don't Skip This)

Firewall

sudo ufw allow OpenSSH
sudo ufw enable

Only SSH should be exposed. OpenClaw's gateway should never be publicly accessible.

Fail2Ban (blocks brute force SSH attacks)

sudo apt install -y fail2ban
sudo systemctl enable fail2ban

Automatic Security Updates

sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades

Disable Root SSH Login

Edit /etc/ssh/sshd_config:

PermitRootLogin no
PasswordAuthentication no

Then: sudo systemctl restart ssh


Common VPS Problems (and Fixes)

Gateway keeps crashing Check the logs: sudo journalctl -u openclaw -f Most crashes are out-of-memory — upgrade to 4GB RAM or reduce model context.

"Gateway failed to start: non-loopback Control UI requires..." You updated OpenClaw and the config changed. Run:

openclaw config set gateway.host 127.0.0.1

Browser times out Either Xvfb isn't running, or Chromium can't find the display. Check:

echo $DISPLAY  # should show :99
pgrep Xvfb     # should show a process ID

WhatsApp QR code won't scan This happens because the QR code expires too fast over SSH. Use tmux or screen so you can see it in real time:

tmux new -s openclaw
openclaw channel add whatsapp
# scan QR code
# Ctrl+B, D to detach

"All Models Failed" error Usually an API key issue or provider outage. Check:

openclaw test model

Port 3000 connection refused The gateway is running on localhost only (correct). To access the web UI, use SSH tunneling:

ssh -L 3000:localhost:3000 openclaw@YOUR_SERVER_IP

Then open http://localhost:3000 in your browser.


Monitoring Your VPS Agent

Set up a simple health check cron in OpenClaw:

"Every hour: check if all services are running normally. If anything is wrong, send an alert to Telegram immediately."

And watch system resources:

htop          # CPU + RAM usage
df -h         # disk usage

At 2GB RAM, OpenClaw uses ~300–500MB at idle, more during active tasks. If you're running browser automation, keep an eye on memory.


Want Managed Hosting Instead?

If this is too much to manage yourself, cloud.getopenclaw.ai offers fully managed OpenClaw hosting — server setup, updates, monitoring, and backups handled for you. No terminal required.


Related Guides

Skip the setup entirely

OpenClaw Cloud handles hosting, updates, and configuration for you — ready in 2 minutes.