Last updated · 2026-01-30
OpenClaw VPS Setup (Docker or Native)
What you’ll achieve
- Deploy OpenClaw on a VPS with either Docker or a native install
- Keep configs and data persistent
- Complete onboarding and verify the gateway
- Avoid common pitfalls (permissions, networking, data loss)
VPS sizing recommendation
- 2 vCPU / 2GB RAM / 20GB SSD
- Ubuntu 22.04+
(Optional affiliate card)
<AffiliateBox title="2 vCPU / 2GB RAM (Recommended)" desc="Great for 24/7 OpenClaw uptime" href="YOUR_AFFILIATE_LINK" />Option A: Docker (recommended)
Step 1: Update server
sudo apt update && sudo apt upgrade -ysudo apt install -y curl git ca-certificatesStep 2: Install Docker + Compose
sudo apt install -y docker.io docker-composedocker --versiondocker-compose --versionStep 3: Fix Docker permissions
sudo usermod -aG docker $USERLog out and back in.
Step 4: Clone the repo
git clone https://github.com/openclaw/openclaw.gitcd openclawStep 5: Run the official Docker setup
chmod +x ./docker-setup.sh./docker-setup.shOptional: bake extra system packages into the image.
export OPENCLAW_DOCKER_APT_PACKAGES="ffmpeg build-essential"./docker-setup.shHost persistence paths (per official docs):
~/.openclaw/(config/state)~/.openclaw/workspace/(workdir)
Step 6: Onboard via the CLI container
docker compose exec openclaw-cli openclaw onboard --flow quickstartStep 7: Logs + validation
docker compose logs -f openclaw-gatewayOption B: Native install (no Docker)
Step 1: Install Node.js (recommended runtime)
curl -fsSL https://openclaw.bot/install.sh | bashStep 2: Install the CLI
npm i -g openclaw@latestopenclaw --versionStep 3: Run onboarding + install daemon
openclaw onboard --install-daemonStep 4: Verify
openclaw healthopenclaw status --allStep 10: Minimal hardening
sudo ufw allow OpenSSHsudo ufw enablesudo ufw statusStep 11: Backups
cd ~/openclawtar -czf openclaw-data-backup.tar.gz openclaw-dataSecure Control UI access (SSH tunnel)
If you need Control UI access, use SSH tunneling instead of exposing ports:
ssh -N -L 18789:127.0.0.1:18789 user@your-vps-ipTweetEmbed examples:
Next steps
- Channel setup:
/docs/channel-telegram//docs/channel-whatsapp//docs/channel-feishu - Troubleshooting:
/docs/troubleshooting - VPS plan guide:
/vps