I’ve been running OpenClaw for a while now and it’s become pretty essential to my workflow. For those unfamiliar, it’s an open-source AI assistant you can self-host. Think of it as having Claude available through Telegram, WhatsApp, or whatever messaging app you prefer.
This post details how I set it up on a Hetzner VPS.
Why Hetzner?
Hetzner is cheap and reliable. Their CX22 (2 vCPU, 4GB RAM) runs about €4.49/month which is more than enough for OpenClaw. You could probably get away with a CX11 but I wouldn’t go smaller than that.
Server Setup
Create a new server in the Hetzner Cloud Console:
- Ubuntu 24.04
- CX22 (or CX11 if you’re tight on budget)
- Add your SSH key
SSH in and set up a non-root user:
ssh root@your-server-ip
apt update && apt upgrade -y
adduser openclaw
usermod -aG sudo openclaw
Copy your SSH key to the new user:
mkdir -p /home/openclaw/.ssh
cp ~/.ssh/authorized_keys /home/openclaw/.ssh/
chown -R openclaw:openclaw /home/openclaw/.ssh
Logout and reconnect as the new user.
Install Node.js
OpenClaw needs Node 22:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
Install OpenClaw
Run the installer:
curl -fsSL https://openclaw.ai/install.sh | bash
Then run the onboarding wizard:
openclaw onboard
This walks you through setting up your API key (I use Anthropic), workspace location, and channels. I mostly use Telegram so I set that up here.
For Telegram you’ll need to:
- Create a bot with @BotFather
- Copy the token
- Get your user ID (message @userinfobot)
Config
The config lives at ~/.openclaw/openclaw.json. Mine looks something like:
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_BOT_TOKEN",
"dmPolicy": "allowlist",
"allowFrom": ["YOUR_TELEGRAM_USER_ID"]
}
}
}
Running It
Start the gateway:
openclaw gateway start
Check status:
openclaw status
View logs:
openclaw logs --follow
If you installed the daemon during onboarding it will auto-start on boot.
Security
Set up a basic firewall:
sudo ufw allow ssh
sudo ufw enable
You don’t need to expose the gateway port since Telegram communicates outbound.
Remote Access
If you want to access the web dashboard remotely, Tailscale is the easiest option:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Then access via your Tailscale IP.
Updates
openclaw update
Or manually:
npm update -g openclaw
openclaw gateway restart
Troubleshooting
If things aren’t working:
openclaw doctor
openclaw logs --follow
Check your bot token is correct and your user ID is in the allowlist.
That’s basically it. The docs at docs.openclaw.ai cover everything else if you want to dig deeper.