How to Self-Host OpenClaw in 2026: VPS Setup vs Managed Hosting
OpenClaw is fully open source, which means you can self-host it on any Linux server you control. That's one of its biggest strengths — and if you enjoy running your own infrastructure, a DIY OpenClaw VPS is a perfectly valid setup. But "can" and "should" are different questions. This guide walks through the real OpenClaw server requirements, the actual commands you'd run on a fresh VPS, the maintenance work nobody mentions in quickstart tutorials, and how the managed route compares.
New to the project? Start with What is OpenClaw? for an overview of what the agent actually does.
What OpenClaw Needs to Run 24/7
OpenClaw isn't a script you run once — it's a long-lived gateway process that listens on your messaging channels around the clock. That shapes the requirements:
- A dedicated Linux VM — Ubuntu LTS or Debian works well. Around 4 GB of RAM is the comfortable baseline; the
pnpm buildstep in particular is memory-hungry, and the agent itself holds sessions, tools, and channel connections in memory. - Node.js (current LTS) and pnpm — OpenClaw is a Node/TypeScript project. pnpm comes via
corepack, which ships with modern Node. - Git — you install OpenClaw from a checkout of the latest release tag (currently
v2026.7.1), not from a package manager. - systemd — the gateway must restart automatically after crashes and reboots. A terminal session with the process running in the foreground is not a deployment.
- Always-on networking — the Telegram connection only works while the process is up. If the server sleeps, your assistant sleeps.
The DIY Walkthrough: OpenClaw on a Bare VPS
Here's the honest, summarized version of a manual install. These steps mirror what a production setup actually needs — a dedicated system user, a release-tag checkout, a build, an environment file, and a service unit.
1. Rent a VPS and prepare it
Any provider works — Hetzner, DigitalOcean, Vultr. Pick a 2 vCPU / 4 GB plan, SSH in as root, and install the basics:
apt update && apt install -y git curl
# Install Node.js LTS (via your preferred method), then:
corepack enable
useradd -m -s /bin/bash openclaw
2. Check out the latest release
git clone https://github.com/openclaw/openclaw.git /opt/openclaw
cd /opt/openclaw
git fetch --depth=1 origin tag v2026.7.1
git checkout v2026.7.1
chown -R openclaw:openclaw /opt/openclaw
3. Install dependencies and build
sudo -u openclaw bash -c 'cd /opt/openclaw && pnpm install --no-frozen-lockfile && pnpm build'
The build should produce dist/entry.js. If it doesn't, the service will not start — check the build output before going further.
4. Configure secrets
Put your Telegram bot token (free from @BotFather) and your LLM API key (OpenAI, Anthropic, or Google) in an environment file the service can read — and lock it down:
mkdir -p /etc/openclaw
nano /etc/openclaw/user.env # bot token + provider API key
chown openclaw:openclaw /etc/openclaw/user.env
chmod 600 /etc/openclaw/user.env
5. Create the systemd service
[Unit]
Description=OpenClaw AI Agent
After=network.target
[Service]
Type=simple
User=openclaw
WorkingDirectory=/opt/openclaw
EnvironmentFile=-/etc/openclaw/user.env
ExecStart=/usr/bin/node /opt/openclaw/openclaw.mjs gateway run --port 18790 --bind loopback
Restart=always
[Install]
WantedBy=multi-user.target
Then systemctl daemon-reload && systemctl enable --now openclaw, message your bot on Telegram, and approve the pairing code. Done — first time through, expect the whole process to take 30–60 minutes if nothing surprises you.
Where DIY Starts to Hurt
Getting OpenClaw running once is the easy part. Keeping it running is where the real cost lives:
- Updates on every release. OpenClaw ships new tags regularly. Each update means fetching the new tag, checking it out, re-running
pnpm install, rebuilding, and restarting the service — and being ready to roll back if something breaks. - Crashes at 3am.
Restart=alwayscovers clean crashes, but not a build that went stale, an out-of-memory loop, a revoked API key, or a full disk. Someone has to notice, readjournalctl -u openclaw, and fix it. - Secrets management. Your bot token and API key sit in plaintext on the box. File permissions, rotation, and not leaking them into shell history are your job.
- Rebuild drift. Node upgrades, lockfile changes, and extension links all have ways of leaving
dist/out of sync with the checkout. The symptom is usually a bot that silently stops answering. - Nobody is watching. There's no dashboard, no health check, no alert. The first monitoring system for most DIY setups is a friend asking why the bot went quiet.
The Managed Path: Same Code, None of the Ops
This is exactly the gap Claw Deployer exists to close. It runs the same open-source OpenClaw code with the same production layout you'd build by hand — dedicated Hetzner VM, isolated openclaw system user, release-tag checkout in /opt/openclaw, locked-down environment file, systemd service — but the whole setup compresses into under a minute, and the ops burden goes away:
- Automatic provisioning — VM purchase, install, build, and service start happen for you.
- Auto-updates — new OpenClaw release tags are tracked and rolled out to your server.
- Recovery — the service is monitored and repaired when it misbehaves, so 3am stays quiet.
- Your keys, your bot — you still bring your own Telegram token and LLM API key (or sign in with a ChatGPT subscription), so there's no lock-in. It's your agent on your dedicated server.
If that flow sounds appealing, the step-by-step deployment guide shows the entire process from sign-in to first message.
DIY vs Managed: The Decision Table
| Factor | DIY VPS | Claw Deployer (managed) |
|---|---|---|
| Setup time | 30–60 minutes, plus debugging | Under 1 minute |
| Updates | Manual fetch, rebuild, restart on every release | Automatic, tracks the latest release tag |
| Uptime | You watch logs and fix failures yourself | Managed monitoring and service recovery |
| Cost | ~$8–30/mo VPS + your ongoing hours | From $29/mo flat, dedicated VM included |
| Control | Full root access, full responsibility | Your own keys, model choice, and dedicated VM; ops handled |
For the full money picture — server plus LLM usage plus your time — see the complete cost breakdown.
FAQ
What are the minimum server requirements for OpenClaw?
A dedicated Linux VM with 2 vCPU and about 4 GB of RAM, current Node.js LTS with pnpm, git, and systemd. Less RAM can work for light chatting but often falls over during builds and heavier tool use.
Can I run OpenClaw at home on a spare machine or Raspberry Pi?
Technically yes — it's open source and runs anywhere Node runs. In practice, residential power cuts, ISP hiccups, and sleep settings undermine the whole point of a 24/7 assistant. A VPS or managed server keeps it genuinely always-on.
How do I update a self-hosted OpenClaw install?
Fetch and check out the new release tag in /opt/openclaw, re-run pnpm install --no-frozen-lockfile, rebuild with pnpm build, confirm dist/entry.js exists, then restart the systemd service. On managed hosting this happens automatically.
Is managed hosting still "self-hosting"?
You keep the parts that matter: it's the same open-source code on a dedicated VM that runs only your agent, with your own API keys and your own Telegram bot. What you hand off is the DevOps — provisioning, updates, and recovery.
Skip the Server Setup
Deploy the same open-source OpenClaw on a dedicated server in under a minute — updates and recovery included. Plans start at $29/mo.
See Plans →