Skip to main content

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.

  1. Go to Hetzner Cloud and create an account
  2. Click New Project → name it "OpenClaw"
  3. Click Add Server
  4. Choose location: Nuremberg (closest to UK)
  5. Image: Ubuntu 22.04
  6. Type: CX21 (2 vCPU, 4GB RAM, €4.15/mo)
  7. SSH Key: Click Add SSH Key (we'll explain this next)
  8. 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).

  1. Go to DigitalOcean Droplets
  2. Sign up (they offer $200 free credit for new users)
  3. Click CreateDroplets
  4. Choose region closest to you
  5. Image: Ubuntu 22.04 LTS
  6. Droplet Type: BasicRegular, $6/mo (1GB RAM)
  7. Authentication: SSH Key (add yours or create password)
  8. 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.

  1. Go to console.anthropic.com
  2. Sign up for an account
  3. Add credit: Click SettingsBillingAdd Credit (£5–10 to start)
  4. Get API key: Click API KeysCreate Key
  5. 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.

  1. Go to ai.google.dev
  2. Click Get API Key
  3. Create a project in Google Cloud Console
  4. Enable the Gemini API
  5. Create an API key and copy it

Alternative: OpenAI GPT-4

  1. Go to platform.openai.com
  2. Sign up and add billing details
  3. Navigate to API KeysCreate New Key
  4. 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:

  1. Gateway token: Just press Enter (creates a random secure token)
  2. Default model provider: Type anthropic (or openai, google if you chose different)
  3. API key: Paste the API key you saved from Step 2
  4. 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:

  1. OpenClaw will display a QR code in your terminal
  2. Open WhatsApp on your phone
  3. Go to SettingsLinked DevicesLink a Device
  4. Scan the QR code
  5. 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)

Need Help?

Join the OpenClaw community for troubleshooting and tips.

Join Discord Community →

Next Steps

Prefer an easier setup? Try our Railway one-click option - no VPS needed, £5/month.