Ubuntu Server is the most common OS for running OpenClaw on a VPS or home server. Here’s the complete setup from a fresh Ubuntu 22.04 installation.
Prerequisites
- Ubuntu 22.04 LTS server
- SSH access
- A non-root user with sudo privileges
Need a VPS? DigitalOcean gives new users $200 free credit.
Installation
# Update system
sudo apt update && sudo apt upgrade -y
# Install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install OpenClaw
npm install -g openclaw
# Run setup wizard
openclaw setup
# Start OpenClaw
openclaw start
Run as a System Service (pm2)
npm install -g pm2
pm2 start openclaw --name openclaw
pm2 startup
pm2 save
OpenClaw now starts on boot and restarts if it crashes.
Basic Security
sudo ufw allow ssh
sudo ufw allow 443
sudo ufw enable
Run sudo apt update && sudo apt upgrade weekly. OpenClaw’s healthcheck skill can automate security monitoring.
Leave a Reply