How to Install OpenClaw on a VPS: Complete Guide
Ready to get your own OpenClaw AI assistant up and running? This step-by-step guide walks you through the entire OpenClaw installation process on a VPS. Whether you’re a seasoned sysadmin or setting up your first server, you’ll be up and running in under 20 minutes.
Prerequisites
Before you start the OpenClaw setup, you’ll need:
- A VPS running Ubuntu 20.04+ or Debian 11+ (1-2GB RAM minimum, 2GB+ recommended)
- SSH access to your server (root or sudo user)
- A domain name (optional but recommended for SSL)
- 10 minutes of your time
Recommended VPS Providers
- Hostinger — Budget-friendly, great for beginners ($4-8/month)
- DigitalOcean — Reliable developer-focused ($4-6/month droplets)
- Hetzner — Excellent performance-to-price ratio
- Vultr — Good global coverage, flexible plans
Step 1: Connect to Your VPS via SSH
Open your terminal and connect to your server:
ssh root@your-server-ip
If you’re using a non-root user with sudo access:
ssh username@your-server-ip
Step 2: Update Your Server
Always start with a fresh update:
sudo apt update && sudo apt upgrade -y
Step 3: Install Node.js
OpenClaw requires Node.js 18 or later. Install it using NodeSource:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
Verify the installation:
node --version
npm --version
Step 4: Install OpenClaw
Install OpenClaw globally via npm:
sudo npm install -g openclaw
Verify the installation:
openclaw --version
Step 5: Initialize OpenClaw
Run the initialization wizard:
openclaw init
This will guide you through:
- Setting up your admin user and password
- Configuring your AI model (API key for OpenAI, Anthropic, Google, etc.)
- Setting your preferred communication channels
- Configuring your gateway URL and ports
Step 6: Start the OpenClaw Gateway
Start the OpenClaw gateway service:
openclaw gateway start
Check the status:
openclaw gateway status
To run the gateway as a background service (recommended):
openclaw gateway start --daemon
Step 7: Configure Your Domain (Optional but Recommended)
Point your domain’s DNS A record to your VPS IP, then set up a reverse proxy with Nginx:
sudo apt install -y nginx certbot python3-certbot-nginx
Create an Nginx configuration file:
sudo nano /etc/nginx/sites-available/openclaw
Add the configuration (replace your-domain.com):
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
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 site and secure it with SSL:
sudo ln -s /etc/nginx/sites-available/openclaw /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo certbot --nginx -d your-domain.com
Step 8: Install Skills
Browse and install skills from ClawHub:
openclaw skill search weather
openclaw skill install weather
Step 9: Verify Everything Works
Run through this checklist:
- Gateway running? —
openclaw gateway status - Web interface accessible? — Visit
http://your-server-ip:3000or your domain - AI model responding? — Send a test message through the web interface
- Skills loaded? —
openclaw skill list
Troubleshooting Common Issues
Gateway Won’t Start
Check the logs: openclaw gateway logs. Common causes include port conflicts (change the port in config) or missing Node.js dependencies.
Can’t Access Web Interface
Ensure your firewall allows traffic on port 3000: sudo ufw allow 3000. If using Nginx, verify the proxy configuration.
AI Model Not Responding
Verify your API key is correctly set: openclaw config show. Test with a simple model that you know works.
Next Steps
Congratulations! Your OpenClaw installation is complete. From here, explore the ClawHub marketplace for skills, connect your communication channels, and start building automated workflows.
Ready to Transform Your Workflow?
OpenClaw is free to start — no credit card required. Experience the power of a true AI assistant that works alongside you, not just for you.
Book a Free 30-Minute Consultation and let us show you what OpenClaw can do for your business.



