Table of contents
- What you’ll achieve
- VPS sizing recommendation
- Option A: Docker (recommended)
- Step 1: Update server
- Step 2: Install Docker + Compose
- Step 3: Fix Docker permissions
- Step 4: Clone the repo
- Step 5: Run the official Docker setup
- Step 6: Onboard via the CLI container
- Step 7: Logs + validation
- Option B: Native install (no Docker)
- Step 1: Install Node.js (recommended runtime)
- Step 2: Install the CLI
- Step 3: Run onboarding + install daemon
- Step 4: Verify
- Step 10: Minimal hardening
- Step 11: Backups
- Secure Control UI access (SSH tunnel)
- Next steps
OpenClaw Docker / VPS Deployment (Recommended)
Deploy OpenClaw on Ubuntu with Docker, persist data, and keep it running 24/7.
- VPS
- Docker
- Ubuntu
- Deployment
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
Frequently asked questions
Quick clarifications for common blockers while following this tutorial.
Can I deploy OpenClaw without Docker?Installation
Yes. Docker is recommended for reproducibility, but local native setup is supported for first-time learning.
Why does WhatsApp stop responding after QR login?Troubleshooting
Most often this is a session invalidation issue. Re-authenticate with a spare account and verify heartbeat logs before production usage.
How should I store provider keys safely?Security
Keep secrets in environment variables, restrict shell history, and avoid embedding keys in YAML committed to git.
Related tutorials
Connect OpenClaw to Telegram (Recommended)
- Telegram
- Channel
Connect OpenClaw to Feishu / Lark
- Feishu
- Lark
- Channel
OpenClaw Local Install (Mac / Linux)
- Install
- Onboarding
- Mac
- Linux
Was this helpful?