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.
Table of Contents
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
| Spec | Minimum | Recommended | Power User |
|---|---|---|---|
| vCPU | 2 cores | 2β4 cores | 4β8 cores |
| RAM | 4 GB | 8 GB | 16 GB |
| Storage | 40 GB SSD | 100 GB SSD | 200 GB NVMe |
| OS | Ubuntu 22.04 LTS | Ubuntu 22.04 LTS | Ubuntu 22.04 LTS |
| Docker | 24.0+ | 24.0+ | 24.0+ |
| Network | 100 Mbps | 100 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
| Provider | Plan | Monthly Cost | Best For |
|---|---|---|---|
| Hetzner | CX22 (4GB RAM) | ~$6/month | Best value globally |
| DigitalOcean | Basic 4GB | ~$24/month | Easy UI, $200 free credit |
| Hostinger | KVM 2 (8GB) | ~$12/month | One-click OpenClaw deploy |
| Oracle Cloud | ARM 4 CPU / 24GB | $0/month | Best 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

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.β
Option A β Anthropic Claude (Recommended)
- Go to platform.claude.com
- Create an account and navigate to API Keys
- 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
- Go to platform.openai.com/api-keys
- 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.
Step 6: Connect Telegram (Recommended for Beginners)
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
- Open Telegram and search for @BotFather
- Send the command
/newbot- Enter a name for your bot β e.g.,
My OpenClaw Assistant- Enter a username β e.g.,
myopenclaw_bot- BotFather will give you a Bot Token β copy and save this
Find Your Telegram User ID
- Search for @userinfobot on Telegram
- Send it any message
- 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:
/startYour 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 toSettings β Authorized Usersin the dashboard and add your User IDβ Error: Pairing Code Not Recognized
Cause: Gateway token entered incorrectly or expired
Fix: Runopenclaw reset-gatewayin 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 psIf 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 -hIf 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
Skill What It Does Google Workspace Read/write Gmail, Calendar, Drive Web Search Real-time internet browsing File Manager Read, write, organize files on server Scheduler Run automated tasks on a time trigger WhatsApp Bridge Connect WhatsApp in addition to Telegram Code Runner Write 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 enableThis 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
Task Schedule Command Daily news briefing Every day 7:00 AM summarize top 5 news headlines and send to TelegramWeekly expense report Every Monday 9:00 AM read my spending data and send summaryServer health check Every hour check disk and memory usage and alert if above 80%Email summary Every day 8:00 AM summarize unread emails from last 24 hours
βOpenClaw VPS Setup: Quick Reference Summary
| Step | Action | Time |
|---|---|---|
| 1 | Choose VPS β min 4GB RAM, Ubuntu 22.04 | 5 min |
| 2 | SSH connect + update server + swap file | 5 min |
| 3 | Install Docker | 3 min |
| 4 | Install OpenClaw via install script | 5 min |
| 5 | Add AI API key (Claude/GPT-4) | 3 min |
| 6 | Connect Telegram via BotFather | 5 min |
| 7 | Test connection β send /start | 1 min |
| 8 | Install skills from ClawHub | 5 min |
| 9 | Configure firewall + security | 5 min |
| 10 | Set up scheduled automations | 10 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