Deploy OpenClaw on Your VPS
Complete setup guide with copy-paste commands. Works with any VPS provider. Takes about 20 minutes.
⚡ What You'll Get
Your own AI assistant running 24/7 on your own server. Full control, complete privacy, costs £4–14/month total (VPS + AI API).
Step 1: Choose and Create Your VPS
A VPS (Virtual Private Server) is basically a computer in someone else's data centre that you rent. You'll install OpenClaw on it.
Recommended: Hetzner (Best Value)
Why Hetzner: €4.15/month gets you 4GB RAM (double what others offer). Based in Germany, excellent performance.
- Go to Hetzner Cloud and create an account
- Click New Project → name it "OpenClaw"
- Click Add Server
- Choose location: Nuremberg (closest to UK)
- Image: Ubuntu 22.04
- Type: CX21 (2 vCPU, 4GB RAM, €4.15/mo)
- SSH Key: Click Add SSH Key (we'll explain this next)
- Click Create & Buy Now
Alternative: DigitalOcean (Easiest for Beginners)
Why DigitalOcean: Simpler interface, more beginner-friendly. $6/month for 1GB RAM (sufficient but less headroom).
- Go to DigitalOcean Droplets
- Sign up (they offer $200 free credit for new users)
- Click Create → Droplets
- Choose region closest to you
- Image: Ubuntu 22.04 LTS
- Droplet Type: Basic → Regular, $6/mo (1GB RAM)
- Authentication: SSH Key (add yours or create password)
- Click Create Droplet
What About SSH Keys?
SSH keys are how you securely connect to your server. Most providers guide you through creating one. If you skip this step, you'll get a password emailed to you instead (less secure but works).
Once created: You'll get an IP address (something like 123.45.67.89). Save this - you'll need it.
Step 2: Get Your AI Model API Key
OpenClaw needs an AI "brain" to work. You'll connect it to one of these providers.
Recommended: Anthropic Claude
Why Claude: Most capable, best at following complex instructions. Costs £2–10/month for normal use.
- Go to console.anthropic.com
- Sign up for an account
- Add credit: Click Settings → Billing → Add Credit (£5–10 to start)
- Get API key: Click API Keys → Create Key
- Copy the key and save it somewhere safe (you'll paste it later)
Alternative: Google Gemini (Free Tier)
Why Gemini: Generous free tier. Good enough for most tasks. Fast responses.
- Go to ai.google.dev
- Click Get API Key
- Create a project in Google Cloud Console
- Enable the Gemini API
- Create an API key and copy it
Alternative: OpenAI GPT-4
- Go to platform.openai.com
- Sign up and add billing details
- Navigate to API Keys → Create New Key
- Copy and save the key
Step 3: Connect to Your VPS and Install OpenClaw
Now you'll connect to your server and install OpenClaw. Don't worry - it's just copy-paste.
Connect via SSH
On Mac or Linux: Open Terminal and type:
ssh root@YOUR_IP_ADDRESS On Windows: Use PuTTY or Windows Terminal (built into Windows 11).
Replace YOUR_IP_ADDRESS with the IP you got from your VPS provider (e.g., ssh root@123.45.67.89).
If prompted "Are you sure you want to continue?", type yes and press Enter.
Install OpenClaw (One Command)
Once you're connected (you'll see root@... in your terminal), paste this command:
curl -fsSL https://openclaw.ai/install.sh | bash This will:
- Install Node.js (required for OpenClaw)
- Download and install OpenClaw
- Set up the necessary files
Takes about 2–3 minutes. You'll see progress messages.
Step 4: Configure Your API Keys
Now you need to tell OpenClaw which AI model to use.
OpenClaw will ask you some questions during first-time setup. Here's what to enter:
- Gateway token: Just press Enter (creates a random secure token)
- Default model provider: Type
anthropic(oropenai,googleif you chose different) - API key: Paste the API key you saved from Step 2
- Enable WhatsApp? Type
yes
OpenClaw will save these settings to ~/.openclaw/config.yaml.
Step 5: Start OpenClaw
Launch OpenClaw with this command:
openclaw gateway start You should see output like:
OpenClaw Gateway started
Listening on port 3000
WhatsApp: Waiting for connection... Congratulations! OpenClaw is now running on your server.
Keep It Running (Even When You Disconnect)
Right now, OpenClaw will stop if you close your terminal. To keep it running 24/7, use pm2 (a process manager):
npm install -g pm2
pm2 start openclaw -- gateway start
pm2 save
pm2 startup Now OpenClaw will restart automatically if your server reboots.
Step 6: Connect WhatsApp
The final step is linking your WhatsApp account so you can message your AI assistant.
Full WhatsApp setup instructions: WhatsApp Connection Guide
Quick version:
- OpenClaw will display a QR code in your terminal
- Open WhatsApp on your phone
- Go to Settings → Linked Devices → Link a Device
- Scan the QR code
- Done! Message yourself on WhatsApp and your OpenClaw assistant will respond
✅ You're All Set!
OpenClaw is now running on your VPS. Message it on WhatsApp to test it out.
What to Do Next →What to Do Once OpenClaw Is Running
Now that you have OpenClaw set up, here's what you can do with it:
Test Basic Commands
Message your OpenClaw WhatsApp number and try:
- "What's the weather like today?" - Test web search
- "Remind me to call Dave at 2pm tomorrow" - Test reminders
- "Check my calendar for this week" - Test calendar integration (if configured)
- "Help" - See available commands
Connect More Services
OpenClaw can integrate with:
- Email - Check inbox, send emails, flag urgent messages
- Calendar - Google Calendar, Outlook, iCloud
- Task managers - Todoist, Notion, Trello
- Smart home - Home Assistant, Philips Hue
Check the official OpenClaw docs for integration guides.
Customise Your Assistant
You can:
- Change its personality (edit the system prompt)
- Add custom commands and shortcuts
- Install skills from the ClawHub marketplace
- Switch to a different AI model anytime
Monitor and Maintain
Every few weeks:
- SSH into your VPS:
ssh root@YOUR_IP - Update OpenClaw:
npm update -g openclaw - Restart:
pm2 restart openclaw - Check usage:
openclaw status
Frequently Asked Questions
How much will this cost per month?
VPS: €4–6/month (Hetzner or DigitalOcean)
AI API: £2–10/month depending on usage
Total: £7–15/month for complete control
What if I want to change AI providers later?
Easy. Just edit ~/.openclaw/config.yaml, change the provider and API key, then restart: pm2 restart openclaw
Can I run this on a Raspberry Pi instead?
Yes! The installation process is almost identical. Just use a Pi 4 with at least 2GB RAM.
Is my data stored on the VPS or sent to the AI provider?
Your OpenClaw configuration and memory files stay on your VPS. When you send a message, OpenClaw sends it to your chosen AI provider (Anthropic, OpenAI, etc.) to generate a response. The AI provider processes it but doesn't permanently store your conversations (check their privacy policies for details).
What if something breaks?
Check logs: pm2 logs openclaw
Restart: pm2 restart openclaw
Full reinstall: Delete ~/.openclaw folder and run the install script again.
Can I access OpenClaw from multiple devices?
Yes. WhatsApp is the main interface, but you can also:
- Add Telegram as another messaging interface
- Set up Discord bot integration
- Access the web UI (if enabled)
Next Steps
Prefer an easier setup? Try our Railway one-click option - no VPS needed, £5/month.