Why a VPS
I ran OpenClaw on my laptop for the first week. It worked fine until I closed the lid at night and the scheduled jobs quietly died with it. If you want the agent doing real work, like a 7am report or a midnight email sweep, it has to live on a machine that never sleeps. A VPS is the cheapest way to get that.
Picking a machine
You do not need anything fancy. The official guidance calls for Ubuntu 22.04 with 2 vCPU, 4GB of RAM, and 40GB of disk. Hetzner and AWS Lightsail both have boxes like that for about $5 a month.
One thing I learned the hard way: skip the $2.50 tier with 1GB of RAM. Node plus a model call will push it over and the process gets OOM-killed at the worst possible moment. Pay the extra couple of dollars.
Install Node.js
OpenClaw needs Node 22.16 or newer. On a fresh Ubuntu box, the apt version is usually too old, so install from NodeSource:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
You should see v24.x. If not, stop and sort that out before continuing.
Install OpenClaw
Run the official installer and follow the onboarding. Have your model credential and Telegram bot token ready before you start, because the wizard asks for both.
# copy the latest one-line install command from openclaw.ai/install
The installer changes between releases, so I won't paste a version here that might be stale. Grab the current command from the official install page, not from some random blog.
Keep it running with systemd
Once it's installed and you've confirmed it works, you want it to come back after a reboot. A systemd unit is the clean way. Create /etc/systemd/system/openclaw.service:
[Unit]
Description=OpenClaw agent
After=network-online.target
[Service]
Type=simple
User=ubuntu
ExecStart=/home/ubuntu/.local/bin/openclaw start
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Then enable it:
sudo systemctl daemon-reload
sudo systemctl enable --now openclaw
systemctl status openclaw
Check the path in ExecStart matches where your installer put the binary. Run which openclaw first and use that.
Lock it down
A VPS is on the public internet, which changes the security math. Do not expose the agent itself to 0.0.0.0. Route everything through the gateway, keep auth on, and read the security guide before you let anything in from outside. A box in a datacenter is a much more interesting target than a laptop on your home Wi-Fi.
I also set up fail2ban for SSH on day one. It's two commands and it cuts most of the drive-by login noise.