🔥 50,000+ apps shipped by non-developers — build yours in 2 minutes
Try Lovable Free →
Skip to content
codingbutvibes

How to Host OpenClaw on a VPS for $5/Month

Running OpenClaw on your laptop is fine until it isn't. The moment you want your AI assistant available 24/7 — responding to messages while you sleep, running o

Ready to Build This?

Follow this step-by-step guide to build your own version.

Explore AI Tools

How to Host OpenClaw on a VPS for $5/Month

Running OpenClaw on your laptop is fine until it isn't. The moment you want your AI assistant available 24/7 — responding to messages while you sleep, running overnight agents, keeping your bots alive — you need a server that doesn't close when you shut the lid.

The good news: you can host OpenClaw on a VPS for about $5/month. Here's the step-by-step.


Disclosure: Some links in this article are affiliate links. We earn a small commission if you sign up — at no extra cost to you.


The Hardware You Actually Need

OpenClaw is lightweight. For most personal and small-team setups:

  • CPU: 1-2 vCores
  • RAM: 1-2 GB
  • Storage: 20 GB SSD
  • Bandwidth: 1 TB/month (way more than you'll use)

A $5/month VPS covers all of this. You don't need a $40/month "AI server" — that's overkill for running a personal assistant.


VPS Options at the $5 Price Point

Contabo — Best Value (Primary Recommendation)

Contabo is the standout pick at this price. Their $5/month Cloud VPS includes 4 vCores, 4 GB RAM, and 50 GB SSD — specs that would cost $20-30 anywhere else.

Contabo even has an OpenClaw hosting page specifically noting compatibility with self-hosted AI workloads. That's not typical for budget hosts — it signals they've thought about this use case.

The tradeoff: Contabo's support is slower than premium hosts and their network isn't as globally distributed. For a personal OpenClaw server, this doesn't matter. For production apps with latency requirements, factor it in.

Best for: Anyone running OpenClaw for personal use, overnight agents, or small-team automation.

Hetzner — Best for Europe-Based Devs

Hetzner's CX11 starts at around €3.79/month (roughly $4) and gets you 2 vCores, 2 GB RAM, 20 GB SSD. German engineering: reliable, fast, environmentally focused data centers in Nuremberg and Falkenstein.

If you're in Europe or your users are, Hetzner's latency advantage is real. Their Cloud dashboard is also one of the cleanest in the budget segment.

Best for: EU-based developers, anyone who values environmental impact.

Interserver — Solid US Alternative

Interserver's standard VPS starts at $6/month and has been around since 1999 — ancient by tech standards. They offer price-lock guarantees (your rate won't suddenly jump after the promo period), which matters if you're setting this up and forgetting about it.

Best for: US-based hosting, people burned by providers raising prices post-promo.


01

Create Your VPS

  1. Go to contabo.com and sign up
  2. Select Cloud VPS S (~$5/month)
  3. Choose your region (pick closest to you)
  4. Select Ubuntu 22.04 LTS as your OS
  5. Set a root password (or add SSH key — do this)
  6. Complete checkout

You'll get an email with your server IP in about 5-10 minutes.

02

Connect to Your Server

ssh root@YOUR_SERVER_IP

If you added an SSH key, it connects immediately. If password-only, it'll prompt you.

First thing: update the system.

apt update && apt upgrade -y
03

Create a Non-Root User

Don't run everything as root. Takes 30 seconds to fix.

adduser openclaw
usermod -aG sudo openclaw
su - openclaw
04

Install Node.js

OpenClaw requires Node 22+.

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

Install OpenClaw

sudo npm install -g openclaw

Verify it installed:

openclaw --version
06

Configure OpenClaw

Run the setup wizard:

openclaw setup

This walks you through:

  • API key configuration (Claude, OpenAI, etc.)
  • Gateway settings
  • Agent configuration

Your config lives at ~/.openclaw/openclaw.json. Edit it directly for advanced settings.

07

Run OpenClaw as a System Service

You want OpenClaw to start automatically and restart if it crashes. Use systemd.

Create the service file:

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

Paste this (replace openclaw with your username if different):

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

[Service]
Type=simple
User=openclaw
WorkingDirectory=/home/openclaw
ExecStart=/usr/bin/openclaw gateway start --foreground
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
sudo systemctl status openclaw

You should see Active: active (running). That means OpenClaw survives reboots.

08

Configure Your Firewall

Open only what you need:

sudo ufw allow 22      # SSH
sudo ufw allow 18789   # OpenClaw gateway (default port)
sudo ufw enable

Check your OpenClaw config to confirm the gateway port if it's different.

09

Point Your Agents at the VPS

In your local OpenClaw config or client apps, update the gateway URL to point at your VPS IP:

http://YOUR_SERVER_IP:18789

Or set up a domain name and HTTPS (recommended if you're exposing this publicly — use Caddy or nginx with Let's Encrypt).


Security Basics

Don't skip these:

  1. SSH key only — disable password auth: PasswordAuthentication no in /etc/ssh/sshd_config
  2. Keep your gateway token secret — this is your auth layer
  3. Firewall on — ufw with minimal rules
  4. Regular updatesapt update && apt upgrade monthly

Monthly Cost Breakdown

ItemCost
Contabo Cloud VPS S~$5/month
Domain (optional)~$1/month
SSL certFree (Let's Encrypt)
Total~$5-6/month

Compare that to leaving your laptop on 24/7: electricity, wear, and the inability to close the lid.


Troubleshooting

OpenClaw won't start:

sudo journalctl -u openclaw -n 50

Check the logs. Usually a config issue or missing API key.

Can't connect from local machine: Check ufw rules and that your gateway port is correct. Also confirm OpenClaw is actually listening: ss -tlnp | grep 18789

Service crashes and doesn't restart: The Restart=on-failure in the service file handles this. If it's crash-looping, check your API keys and config.


What to Build Next

Once OpenClaw is running on your VPS:

  • Overnight content agents — let Casey write while you sleep
  • Always-on Discord or iMessage bots — respond to messages 24/7
  • Scheduled tasks — run agents on cron schedules
  • Team access — multiple people connecting to one OpenClaw instance

The $5/month investment unlocks OpenClaw as infrastructure instead of a desktop tool.


Related guides:

Ready to Build Something Amazing?

Discover the best AI coding tools, tutorials, and comparisons. Start building your next project today.

Explore All Tools

Curated by developers • Updated 2026 • No pay-to-rank