OpenClaw is a self-hosted personal AI assistant. That means it runs on your own server — not on somebody else's cloud. A VPS (Virtual Private Server) is the most popular way to host it: cheap, always-on, and accessible from anywhere.
This guide walks you through the complete setup: picking a server, installing Node.js, configuring OpenClaw, connecting an AI model, and wiring up Telegram so you can chat with your assistant from your phone.
Total time: 30–60 minutes. Skill level: if you can SSH into a server, you can do this.
What You Need
Before you start, make sure you have:
- A VPS running Ubuntu 22.04 or 24.04 (Debian works too)
- SSH access to the server
- An API key from Anthropic (Claude) or OpenAI — OpenClaw uses these for its AI brain
- A Telegram account (optional but highly recommended)
- About $5–10/month for the server
Step 1: Choose Your VPS
Any basic VPS will do. Here's what actually matters:
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 1 GB | 2 GB |
| Storage | 10 GB SSD | 20 GB SSD |
| OS | Ubuntu 22.04 / 24.04 LTS | |
| Location | Closest to you (lower latency) | |
Popular providers that work well: DigitalOcean ($6/mo Droplet), Hetzner (€4/mo — excellent value), Vultr, Linode. For the UK, Hetzner's Falkenstein or Helsinki regions are solid choices.
💡 Tip: Hetzner's CX22 (2 vCPU, 4 GB RAM, €4.35/mo) is excellent value and more than enough for OpenClaw with n8n alongside it.
Step 2: Initial Server Setup
SSH into your fresh server as root (or a sudo user):
ssh root@YOUR_SERVER_IP
Update the system and install basics:
apt update && apt upgrade -y
apt install -y curl git build-essential ufw
Set up a basic firewall:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
⚠️ Important: Enable the firewall before installing anything that opens ports. If you accidentally lock yourself out, most VPS providers have a web console you can use to recover.
Step 3: Install Node.js
OpenClaw requires Node.js 20 or higher. Use the NodeSource installer for the cleanest result:
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
node --version # should print v22.x.x
npm --version
That's it — no manual PATH fiddling needed with this method.
Step 4: Install OpenClaw
Install OpenClaw globally via npm:
npm install -g openclaw
Verify the install:
openclaw --version
Now run the setup wizard:
openclaw setup
This creates the workspace at ~/.openclaw/workspace, generates default config files, and walks you through the initial configuration interactively.
Creating your workspace
The setup command creates ~/.openclaw/ with your workspace, secrets folder, and default config. Your conversation history, memory files, and skills all live here.
Step 5: Configure Your AI Model
OpenClaw needs an AI API key to work. It supports Claude (Anthropic), GPT (OpenAI), and local models via Ollama.
Edit the config:
nano ~/.openclaw/config.json
For Claude (recommended — best reasoning + tool use):
{
"model": "anthropic/claude-sonnet-4-5",
"anthropicApiKey": "sk-ant-YOUR_KEY_HERE"
}
For OpenAI:
{
"model": "openai/gpt-4o",
"openaiApiKey": "sk-YOUR_KEY_HERE"
}
Get your Anthropic key at console.anthropic.com. OpenAI keys are at platform.openai.com.
💡 Cost reality check: With normal usage (a few dozen messages per day), you'll typically spend $5–15/month on API costs. Claude Haiku is the cheapest option; Sonnet gives the best balance of quality and cost.
Step 6: Start the Gateway
The OpenClaw Gateway is the daemon that routes messages between your assistant and channels like Telegram:
openclaw gateway start
Check it's running:
openclaw gateway status
To keep the gateway running after a reboot, set up a systemd service:
openclaw gateway enable
This registers it as a system service that auto-starts on boot.
Step 7: Connect Telegram
This is where it gets genuinely useful. Connecting Telegram means you can message your AI assistant from your phone anywhere in the world.
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts to create a bot - Copy the bot token (looks like
123456789:AAFxxx...)
Add the token to your OpenClaw config:
openclaw config set telegram.botToken YOUR_BOT_TOKEN
Then connect your Telegram account (so the bot knows who you are):
openclaw channel add telegram
Follow the on-screen prompts. Once connected, send a message to your bot in Telegram — you should get a response from your AI assistant.
Set up heartbeats
Once Telegram is connected, OpenClaw can send you proactive messages — calendar reminders, email alerts, scheduled content publishing. Configure these in your HEARTBEAT.md workspace file.
Step 8: Customise Your Workspace
Your workspace at ~/.openclaw/workspace/ is where the magic happens. Key files to know:
- SOUL.md — defines your assistant's personality and behaviour
- USER.md — context about you (name, timezone, preferences)
- MEMORY.md — long-term memory your assistant maintains
- HEARTBEAT.md — scheduled tasks and proactive checks
- AGENTS.md — workspace rules and conventions
Edit these files to shape how your assistant behaves. The more context you give it, the more useful it becomes over time.
Step 9: Install Skills
Skills extend what OpenClaw can do. Install them from ClawHub:
openclaw skills list
openclaw skills install github
openclaw skills install weather
Popular first skills to install:
- github — manage repos, issues, and PRs via natural language
- weather — get forecasts for any location
- gog — Google Workspace integration (Gmail, Calendar, Drive)
- tmux — remote-control terminal sessions
Step 10: Verify Everything Works
Run a quick sanity check:
openclaw status
You should see: Gateway running, model connected, channels active. Then open Telegram and send your bot a message like "what can you do?" — it should respond with a summary of its capabilities.
🎉 You're done. Your personal AI assistant is now running 24/7 on your own server, accessible via Telegram, with no monthly subscription — just API costs.
Common Issues
Gateway won't start
Check Node.js version (node --version should be 20+). Check logs with openclaw gateway logs. Make sure your config.json is valid JSON.
Telegram bot doesn't respond
Verify the bot token is correct. Make sure the gateway is running. Check that you've sent the bot a message in Telegram (not just added it to a group).
AI responses are slow
This is usually network latency to the AI API, not your server. Pick a VPS location geographically close to Anthropic/OpenAI's servers (US East or EU West).
Out of memory errors
Upgrade to a 2 GB RAM server. OpenClaw itself is lightweight, but if you're running other services (n8n, databases) alongside it, 1 GB runs tight.
What to Do Next
Once you're up and running:
- Fill in USER.md with your name, timezone, and context — this dramatically improves response quality
- Set up HEARTBEAT.md with periodic tasks (check email, post content, monitor things)
- Install the github skill if you work with code
- Connect n8n for no-code workflow automation alongside your AI
- Explore ClawHub for community-built skills
The initial setup is the hard part. After that, OpenClaw gets better over time as its memory fills with context about you and your projects.
If you'd rather skip the setup entirely and get a pre-configured OpenClaw instance, reach out — we set these up as a service.
Want it done for you?
We set up OpenClaw on your VPS, configure your channels, and hand you the keys — ready to use in 24 hours.
Get It Set Up →