Salam Husain – Digital Growth Partner

How to Install OpenClaw on VPS: Complete Openclaw Setup Guide 2026

Introduction

OpenClaw is the most talked-about open-source AI agent of 2026 β€” and for good reason. It runs entirely on your own server, connects to WhatsApp and Telegram, and handles real-world tasks autonomously 24 hours a day. But before you can experience any of that, you need to set it up correctly.

Many beginners get stuck because they install OpenClaw on a machine with too little RAM, skip the security configuration, or struggle with Telegram pairing errors. This complete OpenClaw setup guide 2026 walks you through every single step β€” from choosing the right VPS to connecting your first messaging app β€” so you can get your AI agent running without hitting a single roadblock.

By the end of this guide, you will have OpenClaw fully installed, configured, and connected to Telegram or WhatsApp, running 24/7 on your own private server.

What You Need Before You Start

Before touching any commands, make sure you have these four things ready:​

  • A VPS β€” DigitalOcean, Hetzner, Hostinger, or Oracle Cloud (free tier available)
  • An AI API Key β€” from Anthropic (Claude), OpenAI (GPT-4), or OpenRouter
  • A Messaging App β€” Telegram is recommended for beginners; WhatsApp also supported
  • Basic Terminal Access β€” you will run a few commands, but nothing complex

If you have never used a terminal before, do not worry β€” every command in this guide is copy-paste ready.

Step 1: Choose the Right VPS Plan

This is the most important decision β€” choosing the wrong server size causes memory crashes and poor performance.
​

Minimum vs Recommended Specs

SpecMinimumRecommendedPower User
vCPU2 cores2–4 cores4–8 cores
RAM4 GB8 GB16 GB
Storage40 GB SSD100 GB SSD200 GB NVMe
OSUbuntu 22.04 LTSUbuntu 22.04 LTSUbuntu 22.04 LTS
Docker24.0+24.0+24.0+
Network100 Mbps100 Mbps+1 Gbps

⚠️ Important: OpenClaw’s documentation says 1 GB RAM is enough β€” but in practice, you will hit memory issues. Always use minimum 4 GB RAM. For browser automation tasks, use 8 GB.

Best VPS Providers for OpenClaw

ProviderPlanMonthly CostBest For
HetznerCX22 (4GB RAM)~$6/monthBest value globally
DigitalOceanBasic 4GB~$24/monthEasy UI, $200 free credit
HostingerKVM 2 (8GB)~$12/monthOne-click OpenClaw deploy
Oracle CloudARM 4 CPU / 24GB$0/monthBest free option

Step 2: Create and Connect to Your Server

Once you have signed up with your VPS provider and created a server with Ubuntu 22.04 LTS, follow these steps.

Connect via SSH
Open your terminal (Mac/Linux) or Windows Terminal and run:

ssh root@YOUR_SERVER_IP

Replace YOUR_SERVER_IP with the IP address shown in your VPS dashboard. On Windows, you can also use PuTTY or Termius for SSH access.​

You will see a prompt like this β€” which means you are successfully connected:

root@ubuntu-server:~#

Update Your Server

Always update packages first before installing anything:

apt update && apt upgrade -y

Create a Swap File (Very Important)

This prevents memory crashes during heavy tasks:

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo ‘/swapfile none swap sw 0 0’ | sudo tee -a /etc/fstab
echo ‘vm.swappiness=10’ | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Verify swap is active:

free -h

OpenClaw setup guide 2026
OpenClaw setup guide 2026

Step 3: Install Docker

OpenClaw runs inside Docker containers β€” so Docker must be installed first.

curl -fsSL https://get.docker.com | sh

Verify Docker is installed correctly:

docker –version

You should see something like: Docker version 24.0.x

Enable Docker to start automatically on server reboot:

systemctl enable docker
systemctl start docker

Step 4: Install OpenClaw

Now run the official OpenClaw install script:

curl -fsSL https://openclaw.ai/install.sh | bash

This command downloads and installs OpenClaw along with all its dependencies including Node.js 22+. The installation takes approximately 3–5 minutes depending on your server speed.

When it completes successfully, you will see:

OpenClaw installed successfully.
Run ‘openclaw setup’ to configure your assistant.

Now run the setup wizard:

openclaw setup

This opens an interactive configuration where you will set your admin username, password, and gateway token. Save your gateway token somewhere safe β€” you will need it to connect messaging apps.

Step 5: Configure Your AI API Key

OpenClaw needs at least one AI provider to power its intelligence.​

  1. Go to platform.claude.com
  2. Create an account and navigate to API Keys
  3. Generate a new key and copy it

πŸ’‘ Pro Tip: Use Claude Opus model β€” Claude 4.5 Sonnet has known compatibility issues with OpenClaw in 2026.

Option B β€” OpenAI GPT-4

  1. Go to platform.openai.com/api-keys
  2. Create a new secret key and copy it

Option C β€” OpenRouter (Use Multiple Models)

OpenRouter lets you switch between GPT-4, Claude, and DeepSeek from a single API key β€” great for cost control.​

Add Your Key to OpenClaw

In the OpenClaw dashboard, navigate to:

Settings β†’ Model Configuration β†’ Add API Key

Paste your key, select your preferred model, and click Test Connection to verify it works.

Connecting Telegram lets you control your OpenClaw agent from your phone β€” send a message and your AI gets to work instantly.​

Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send the command /newbot
  3. Enter a name for your bot β€” e.g., My OpenClaw Assistant
  4. Enter a username β€” e.g., myopenclaw_bot
  5. BotFather will give you a Bot Token β€” copy and save this

Find Your Telegram User ID

  1. Search for @userinfobot on Telegram
  2. Send it any message
  3. It will reply with your User ID number β€” copy this

Add Telegram to OpenClaw

In your OpenClaw dashboard:

Settings β†’ Channels β†’ Add Channel β†’ Telegram

Enter your Bot Token and your User ID, then click Save.​

Test Your Connection

Open Telegram, find your bot, and send:

/start

Your OpenClaw agent should reply with a welcome message. Try sending:

What can you do?

If it responds β€” congratulations! Your OpenClaw agent is live and running. πŸŽ‰

Step 7: Fix Common Errors

These are the most frequently reported issues after installation:​

❌ Error: “Not Authorized to Use This Command”

Cause: Your Telegram User ID is not whitelisted
Fix: Go to Settings β†’ Authorized Users in the dashboard and add your User ID

❌ Error: Pairing Code Not Recognized

Cause: Gateway token entered incorrectly or expired
Fix: Run openclaw reset-gateway in terminal to generate a new gateway token​

❌ Error: Bot Not Responding After Pairing

Cause: Docker container crashed silently
Fix: Run these commands to restart:

openclaw restart
docker ps

If the container is not listed, run:

openclaw start

❌ Error: Docker Deployment Failure

Cause: Insufficient RAM or disk space
Fix: Check available resources:

free -h
df -h

If RAM is under 1 GB free, upgrade your VPS plan to 4 GB minimum.​

❌ Error: OpenClaw Running Slow

Cause: Shared vCPU throttling on cheap plans
Fix: Upgrade to a dedicated vCPU plan β€” shared CPU plans cause significant slowdowns under AI workloads.

Step 8: Install Skills to Expand Capabilities

OpenClaw’s power comes from skills β€” modular tools you can add to expand what your agent can do.

In your dashboard navigate to:

Skills β†’ Browse ClawHub β†’ Install

Recommended Skills to Install First

SkillWhat It Does
Google WorkspaceRead/write Gmail, Calendar, Drive
Web SearchReal-time internet browsing
File ManagerRead, write, organize files on server
SchedulerRun automated tasks on a time trigger
WhatsApp BridgeConnect WhatsApp in addition to Telegram
Code RunnerWrite and execute code autonomously

You can browse more skills at clawhub.ai or the community repository at GitHub

Step 9: Security Hardening (Do Not Skip This)

Running OpenClaw on a public server without security is dangerous. CVE-2026-25253 showed that exposed OpenClaw instances can be accessed by unauthorized users. Follow these steps:

Set Up a Firewall

ufw allow 22
ufw allow 3000
ufw enable

This blocks all ports except SSH (22) and OpenClaw’s dashboard port (3000).

Keep Your Server Updated

Run this monthly:

apt update && apt upgrade -y

Back Up Your Configuration

Your entire OpenClaw configuration β€” including memory, skills, and API keys β€” is stored in:

~/.openclaw/

Back up this directory regularly to avoid losing your setup if the server crashes.​

Use a Strong Dashboard Password

When you ran openclaw setup, you set an admin password. Make sure it is at least 16 characters with numbers and symbols β€” especially if your dashboard is accessible from the public internet.

Step 10: Schedule Automated Tasks

One of OpenClaw’s most powerful features is running tasks automatically on a schedule β€” without any manual trigger.​

In your dashboard go to:

Automation β†’ Schedule β†’ New Job

Example Scheduled Tasks

TaskScheduleCommand
Daily news briefingEvery day 7:00 AMsummarize top 5 news headlines and send to Telegram
Weekly expense reportEvery Monday 9:00 AMread my spending data and send summary
Server health checkEvery hourcheck disk and memory usage and alert if above 80%
Email summaryEvery day 8:00 AMsummarize unread emails from last 24 hours

​OpenClaw VPS Setup: Quick Reference Summary

StepActionTime
1Choose VPS β€” min 4GB RAM, Ubuntu 22.045 min
2SSH connect + update server + swap file5 min
3Install Docker3 min
4Install OpenClaw via install script5 min
5Add AI API key (Claude/GPT-4)3 min
6Connect Telegram via BotFather5 min
7Test connection β€” send /start1 min
8Install skills from ClawHub5 min
9Configure firewall + security5 min
10Set up scheduled automations10 min
Total~47 minutes

Conclusion

Setting up OpenClaw on a VPS in 2026 is one of the best investments you can make in your productivity setup. You get a private, always-on AI agent that runs your workflows, manages your communications, and automates your daily tasks β€” all from your own server with zero data leakage.

The key to a successful setup is choosing the right server size (minimum 4 GB RAM), following the security steps, and starting with simple skills before adding complex automations. Once your OpenClaw agent is running, the possibilities are genuinely unlimited.

Now that your setup is complete, the next step is exploring what OpenClaw can actually do for you β€” check out our guide on the Top 10 OpenClaw Use Cases 2026 to get inspired.

Tags: OpenClaw setup guide 2026, OpenClaw VPS install, OpenClaw Telegram setup, how to install OpenClaw, Clawdbot VPS setup, OpenClaw Docker configuration

πŸ‘‰ OpenClaw vs AutoGPT 2026

πŸ‘‰ OpenClaw Use Cases 2026