Migrate OpenClaw
to a New VPS
Outgrew your current server? Moving to a cheaper provider? This guide transfers your entire OpenClaw instance — history, workspace, and all — with less than 10 minutes of downtime.
Pre-Migration Checklist
Run your backup script manually right before starting: ~/openclaw/backup.sh. Even if you have automated daily backups, you want the most current data possible before a migration.
- ✓
Provision and set up the new VPS
New server provisioned, Ubuntu 22.04 installed, Docker Engine running, non-root user created with docker group access.
- ✓
Verify you can SSH to both servers simultaneously
Open two terminal windows — one for old server, one for new. You’ll need both during the transfer.
- ✓
Note your current OpenClaw version
Run
docker inspect openclaw | grep -i imageon old server. Good to verify the new server runs the same version after migration.
Step-by-Step: Transfer in ~10 Minutes
- 1
Stop OpenClaw on the old server gracefully
docker compose stop openclaw # Wait for clean shutdown docker inspect openclaw | grep Status - 2
Create a final archive on the old server
tar -czf ~/openclaw-migration.tar.gz \ ~/openclaw/data/.openclaw/ \ ~/openclaw/.env \ ~/openclaw/docker-compose.yml \ ~/openclaw/update.sh \ ~/openclaw/backup.sh - 3
Transfer to the new server via SCP
# Run from old server — replace NEW_IP with your new server’s IP scp ~/openclaw-migration.tar.gz user@NEW_SERVER_IP:~/ - 4
Extract and set up on new server
# On the NEW server mkdir -p ~/openclaw && cd ~/ tar -xzf openclaw-migration.tar.gz chmod 600 ~/openclaw/.env cd ~/openclaw docker compose pull docker compose up -d - 5
Verify everything works on new server
docker logs openclaw –tail 50 # Send a test Telegram message — it should respond and remember previous conversations - 6
Re-scan WhatsApp QR code if used
WhatsApp sessions may not transfer cleanly between servers. If WhatsApp doesn’t work, go to OpenClaw Control UI → Channels → WhatsApp → Reconnect and scan the QR code again.
- 7
Cancel old server (after confirming new one works)
Wait 24–48 hours before cancelling your old server. This gives you a rollback window if anything unexpected appears after migration.
Total downtime is typically 5–15 minutes. The SCP transfer takes 1–3 minutes depending on your data size. Docker pull takes 2–5 minutes. Your agent is unreachable during this window — schedule migrations during low-usage hours.
Successfully Migrated
Your OpenClaw instance is now running on a better server with full history intact.
Browse Hosting ComparisonsBackup Guide
