Clawist
Beginner12 min readβ€’β€’By Clawist

How to Set Up OpenClaw on a VPS: The Complete Guide

How to Set Up OpenClaw on a VPS: The Complete Guide

OpenClaw is everything I was hoping AI would be β€” a personal assistant that actually does things, not just talks about them. It runs 24/7 on your server, remembers everything you tell it, connects to your apps, and proactively helps you get work done.

In this guide, we'll set up OpenClaw on a VPS (Virtual Private Server) so it runs continuously without needing your laptop open. We'll connect it to Telegram for easy mobile access, add skills for extended functionality, link Google services, and set up scheduled tasks for true automation.

πŸ“Ί Based on: Clawdbot (OpenClaw) is everything I was hoping A.I. would be by Dreams of Code (148K views)

Why a VPS?

Local machine vs VPS comparison A VPS gives you 24/7 availability and reliable access from anywhere.

Running OpenClaw locally on your laptop works great for testing, but has limitations:

  • Stops when you close your laptop β€” no 24/7 availability
  • Requires your machine to be always on β€” burns energy, creates heat
  • Network changes break connections β€” mobile hotspots, coffee shop WiFi, etc.

A VPS solves all of these. For about $5-10/month, you get a server that:

  • Runs 24/7 β€” always available via Telegram/Discord
  • Has a static IP β€” reliable connections
  • Uses minimal resources β€” OpenClaw is lightweight
  • Keeps your data separate β€” isolated from your personal machine

Step 1: Get a VPS from Hostinger

Hostinger VPS pricing page Hostinger's KVM 1 plan at ~$5/month is perfect for OpenClaw.

Hostinger offers affordable VPS hosting that's perfect for OpenClaw. Here's how to get started:

  1. Go to hostinger.com and navigate to VPS Hosting
  2. Select the KVM 1 plan (cheapest option, ~$5/month) β€” it's more than enough for OpenClaw
  3. Choose Ubuntu 22.04 as your operating system
  4. Complete the purchase and wait for your server to provision (usually 1-2 minutes)

Once provisioned, you'll receive:

  • Server IP address
  • Root password (or SSH key if you chose that option)

Alternative VPS providers: DigitalOcean, Linode, Vultr, and Hetzner all work great too. Any Ubuntu 22.04 VPS with at least 1GB RAM will do.

Step 2: Connect to Your VPS via SSH

SSH terminal connection to VPS Connecting to your VPS via SSH β€” you'll see the Ubuntu welcome message.

Open your terminal and connect to your new server:

ssh root@YOUR_SERVER_IP

Enter your password when prompted. You should see the Ubuntu welcome message.

First time setup β€” update the system:

apt update && apt upgrade -y

This ensures you have the latest security patches.

Step 3: Install OpenClaw

OpenClaw homepage with install command OpenClaw's homepage β€” one curl command installs everything.

With your VPS ready, install OpenClaw with the one-line installer:

curl -fsSL https://get.openclaw.ai | bash

The installer will:

  • Install Node.js if needed
  • Install OpenClaw globally
  • Launch the onboarding wizard

Step 4: Complete the Onboarding

Claude Console developer platform Get your API key from the Claude Console to power OpenClaw.

The onboarding wizard walks you through initial configuration:

  1. Choose QuickStart β€” fastest path to a working setup
  2. Select your AI provider β€” Anthropic (Claude) is recommended
  3. Enter your API key β€” get one from console.anthropic.com
  4. Choose your model β€” Claude Sonnet for most tasks, Opus for complex work
  5. Select a chat channel β€” we'll use Telegram (covered next)

Step 5: Set Up Telegram Bot

Telegram BotFather setup guide Create your bot with BotFather and get your API token.

Telegram is the most popular way to interact with OpenClaw. Here's how to connect it:

Create a Telegram Bot:

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts
  3. Give your bot a name (e.g., "My OpenClaw")
  4. Give it a username ending in bot (e.g., my_openclaw_bot)
  5. Copy the API token BotFather gives you

Add to OpenClaw config:

Edit your OpenClaw config file:

nano ~/.openclaw/config.yaml

Add your Telegram configuration:

channels:
  telegram:
    token: "YOUR_BOT_TOKEN_HERE"
    ownerIds:
      - YOUR_TELEGRAM_USER_ID

Get your Telegram user ID: Message @userinfobot on Telegram β€” it will reply with your ID.

Restart OpenClaw to apply the changes:

openclaw gateway restart

Now open Telegram, find your bot, and send it a message. You should get a response!

Step 6: Start the Gateway as a Service

Systemd service status showing OpenClaw running OpenClaw running as a systemd service β€” it starts automatically on boot.

To keep OpenClaw running 24/7 (even after you close SSH), set it up as a system service:

openclaw gateway start --daemon

Or for more control, create a systemd service:

sudo nano /etc/systemd/system/openclaw.service

Add this content:

[Unit]
Description=OpenClaw Gateway
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/root/.openclaw
ExecStart=/usr/bin/openclaw gateway start
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl enable openclaw
sudo systemctl start openclaw

Now OpenClaw will automatically start on boot and restart if it crashes.

Step 7: Add Skills for Extended Functionality

OpenClaw skills list in terminal Skills extend OpenClaw's capabilities β€” weather, search, calendar, and more.

Skills give OpenClaw new abilities. Check available skills:

openclaw skills list

Install a skill (e.g., weather):

openclaw skills add weather

Popular skills include:

  • weather β€” get forecasts and current conditions
  • web-search β€” search the internet
  • browser β€” control a web browser
  • calendar β€” manage Google Calendar

After adding skills, restart the gateway:

openclaw gateway restart

Step 8: Connect Google Services

Google Cloud setup guide Set up a Google Cloud service account to connect Calendar, Gmail, and Drive.

OpenClaw can integrate with Google Calendar, Gmail, and other Google services via a service account.

Create a Google Cloud Project:

  1. Go to console.cloud.google.com
  2. Create a new project
  3. Enable the APIs you need (Calendar API, Gmail API, etc.)
  4. Create a Service Account and download the JSON key
  5. Share your Google Calendar with the service account email

Add to OpenClaw:

Copy your service account JSON to the server:

scp ~/Downloads/service-account.json root@YOUR_SERVER_IP:~/.config/gcloud/

Configure OpenClaw to use it by adding the path to your config.

Now you can tell OpenClaw things like:

  • "What's on my calendar today?"
  • "Schedule a meeting for tomorrow at 2pm"
  • "Check my Gmail for unread messages"

Step 9: Set Up Scheduled Tasks (Cron Jobs)

OpenClaw cron configuration Schedule automatic tasks β€” morning briefings, weekly reports, and more.

OpenClaw can run tasks automatically on a schedule. This is where it goes from assistant to autonomous agent.

Example: Daily morning briefing

Tell OpenClaw via Telegram:

"Every morning at 8am, send me a summary of my calendar, any urgent emails, and the weather forecast."

OpenClaw will create a cron job that runs automatically.

Example: Weekly report

"Every Friday at 5pm, compile a summary of what we accomplished this week and send it to me."

You can also manage cron jobs directly in the config:

cron:
  jobs:
    - name: "Morning Briefing"
      schedule: "0 8 * * *"
      task: "Send me today's calendar, weather, and any urgent emails"

Step 10: Test Your Setup

OpenClaw test checklist Run through these tests to verify your setup is working correctly.

Now that everything is configured, test the full system:

  1. Send a message via Telegram β€” should get a response
  2. Ask about the weather β€” tests the weather skill
  3. Ask about your calendar β€” tests Google integration
  4. Set a reminder β€” tests cron/scheduling
  5. Ask it to search the web β€” tests web search skill

If something doesn't work, check the logs:

openclaw gateway logs

Tips for Success

OpenClaw best practices Follow these best practices for security, cost management, and productivity.

Security:

  • Use a strong API key
  • Set ownerIds to restrict who can use your bot
  • Keep your VPS updated with apt update && apt upgrade

Cost management:

  • Start with Claude Sonnet (cheaper) for routine tasks
  • Use Opus only for complex work
  • Monitor your Anthropic usage dashboard

Productivity:

  • Train your bot by correcting its mistakes
  • Create custom instructions in SOUL.md
  • Use heartbeats for proactive check-ins

Conclusion

OpenClaw running on VPS - setup complete Your AI assistant is now running 24/7 and ready to help.

You now have a fully functional OpenClaw instance running 24/7 on a VPS. It can:

  • Chat with you via Telegram from anywhere
  • Access your Google Calendar and Gmail
  • Run scheduled tasks automatically
  • Use skills for weather, web search, and more

The total cost is roughly:

  • VPS: ~$5-10/month
  • Claude API: ~$20/month with moderate usage
  • Total: ~$25-30/month

For that price, you get a personal AI assistant that's always available and actually takes action β€” not just another chatbot.

πŸ“Ί Watch the full video: Clawdbot (OpenClaw) is everything I was hoping A.I. would be by Dreams of Code

Related guides:

Happy automating! πŸš€