How to Install OpenClaw on a $5 VPS (DigitalOcean & Hetzner Guide)
Step-by-step guide to installing OpenClaw on a VPS. Covers Node 24, PM2, nginx reverse proxy with SSL, and the onboarding wizard on DigitalOcean or Hetzner.
How to Install OpenClaw on a $5 VPS (DigitalOcean & Hetzner Guide)
Running your own OpenClaw AI assistant starts with a single virtual private server. For most personal users, a $5–6/month VPS from DigitalOcean or Hetzner is more than enough to host a responsive, always-on AI gateway that connects to WhatsApp, Telegram, Discord, and iMessage. This guide walks you through every step — from provisioning the server to your first working conversation.
Step 1: Provision Your VPS
Both DigitalOcean and Hetzner offer entry-level servers that comfortably run OpenClaw.
On DigitalOcean, create a new Droplet: choose Ubuntu 24.04 LTS, the Basic plan at $6/month (1 vCPU, 1 GB RAM), and a data center closest to you. Add your SSH key during setup.
On Hetzner, create a new server: choose Ubuntu 24.04, the CX11 plan (1 vCPU, 2 GB RAM, ~$4/month), and your preferred region. Hetzner’s pricing is aggressive — it’s the best value for OpenClaw self-hosted deployment.
Once the server is running, SSH in:
ssh root@YOUR_SERVER_IP
Step 2: Install Node 24
OpenClaw requires Node.js 24 — do not use an older version. The cleanest way to install it is via the NodeSource repository:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version # should output v24.x.x
Confirm npm is also installed:
npm --version
Step 3: Clone the OpenClaw Repository
OpenClaw is MIT-licensed and open source. Clone it directly from the official GitHub repository:
cd /opt
sudo git clone https://github.com/openclaw/openclaw.git
sudo chown -R $USER:$USER /opt/openclaw
cd /opt/openclaw
npm install
The npm install step downloads all dependencies. On a $5 VPS it typically takes 30–90 seconds.
Step 4: Run the Onboarding Wizard
OpenClaw ships with an interactive onboarding wizard that configures your AI provider keys, messaging channels, and port settings. Run it now:
npm run onboard
The wizard will ask you to:
- Choose your AI provider (OpenAI, Anthropic, Google, or local Ollama)
- Paste your API key
- Select which messaging channels to activate (Telegram, WhatsApp, Discord, iMessage)
- Confirm the default port (
18789)
Complete the wizard, then verify your configuration was saved to config/openclaw.yaml.
Step 5: Keep OpenClaw Running with PM2
A process manager ensures OpenClaw stays online after reboots and crashes. Install PM2 globally:
sudo npm install -g pm2
pm2 start npm --name "openclaw" -- start
pm2 startup # follow the printed command to enable auto-start
pm2 save
Verify it’s running:
pm2 status
You should see openclaw with status online. OpenClaw listens on port 18789 by default.
Step 6: Configure Nginx and SSL
Expose OpenClaw securely via nginx with a free Let’s Encrypt SSL certificate. First, point a domain or subdomain (e.g., ai.yourdomain.com) at your VPS IP.
Install nginx and Certbot:
sudo apt-get install -y nginx certbot python3-certbot-nginx
Create an nginx site config at /etc/nginx/sites-available/openclaw:
server {
listen 80;
server_name ai.yourdomain.com;
location / {
proxy_pass http://localhost:18789;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Enable the config and obtain your SSL certificate:
sudo ln -s /etc/nginx/sites-available/openclaw /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo certbot --nginx -d ai.yourdomain.com
Certbot will automatically configure HTTPS and set up auto-renewal. Your OpenClaw installation is now accessible at https://ai.yourdomain.com.
What’s Next?
With the server running, your next step is to connect your first messaging channel. The Telegram integration is the easiest starting point — it takes about five minutes and requires no business verification. Check out our Telegram setup guide to get your first AI conversation flowing.
For OpenClaw’s security hardening — firewall rules, fail2ban, and authentication — see our security guide.
Don’t want to do this yourself? We’ll install it for you.
Ready for Your Personal AI Assistant?
Free 30-minute consultation. We'll assess your setup and recommend the right OpenClaw configuration for you.
Talk to an Expert