Migrating your OpenClaw installation to a new computer doesn’t have to be painful. Whether you’re moving from one VPS to another, upgrading your Raspberry Pi, or switching from your desktop to a server, this guide covers everything you need to know about backing up and restoring OpenClaw.
What Files Do You Need to Backup?
OpenClaw stores its data in a few key locations. Understanding what to save is the first step to a successful migration.
Configuration Files
- config.yaml / config.json – Your main configuration including API keys, providers, and platform settings
- .env file – Environment variables and secrets
- adapters.yaml – Custom adapter configurations
Skills and Plugins
- skills/ directory – All installed skills
- plugins/ directory – Any custom plugins
Data and History
- data/ – Conversation history, user data, learned context
- cache/ – Cached responses (optional, can skip)
- logs/ – Log files (optional)
Step-by-Step Backup Process
Step 1: Stop OpenClaw
Before backing up, make sure OpenClaw is fully stopped to avoid data corruption:
# If using systemd
sudo systemctl stop openclaw
# If running manually
pkill -f openclaw
Step 2: Create Backup Archive
Create a compressed archive of your OpenClaw directory:
# Navigate to your OpenClaw directory
cd ~/openclaw
# Create backup with timestamp
tar -czvf openclaw-backup-$(date +%Y%m%d).tar.gz
config.yaml
.env
skills/
plugins/
data/
Step 3: Verify Your Backup
Always verify the backup was created correctly:
# Check file exists and size
ls -lh openclaw-backup-*.tar.gz
# List contents without extracting
tar -tzf openclaw-backup-20260416.tar.gz | head -20
Step-by-Step Migration Process
Step 1: Install OpenClaw on New Machine
Choose your implementation from our database and follow the installation guide. Make sure the version matches or is newer than your backup.
Step 2: Transfer Backup File
Use a secure method to transfer your backup:
# Using SCP (recommended)
scp openclaw-backup-20260416.tar.gz user@new-server:~/
# Or use RSYNC
rsync -avz openclaw-backup-*.tar.gz user@new-server:~/
# Or download locally and upload via SFTP
<h3:Step 3: Extract and Configure
# Extract backup
tar -xzvf openclaw-backup-20260416.tar.gz
# Copy files to new OpenClaw directory
cp config.yaml ~/openclaw/
cp .env ~/openclaw/
cp -r skills/ ~/openclaw/
cp -r plugins/ ~/openclaw/
cp -r data/ ~/openclaw/
# Set correct permissions
chmod 600 ~/openclaw/.env
Step 4: Update Configuration
Some settings may need updating for the new environment:
- Update IP addresses or domain names
- Check port configurations
- Update webhook URLs for messaging platforms
- Verify provider API endpoints if changed
Step 5: Start OpenClaw
# Start OpenClaw on new machine
cd ~/openclaw
./openclaw start
Migration by Implementation
Main OpenClaw (Node.js)
The standard Node.js installation stores everything in the project directory. Use the tar command above.
ZeroClaw (Rust)
ZeroClaw uses ~/.config/zeroclaw/ for config. Backup this directory along with your project folder.
NullClaw (Zig)
NullClaw stores config in ~/.config/nullclaw/. Include this in your backup.
PicoClaw (Go)
PicoClaw uses ~/.picoclaw/ for configuration. Make sure to include this folder.
Common Migration Issues and Fixes
Issue: API Keys Not Working
Cause: Environment variables not loaded correctly.
Fix: Ensure .env file is in the correct location and has proper permissions (chmod 600).
Issue: Platform Webhooks Not Working
Cause: Webhook URLs point to old server IP/domain.
Fix: Update webhook configuration in each messaging platform (Telegram, Discord, etc.) with new URL.
Issue: Skills Not Loading
Cause: Directory structure changed or missing dependencies.
Fix: Run npm install or pip install -r requirements.txt in skills directories.
Issue: Database Migration Errors
Cause: Different database versions or incompatible formats.
Fix: Export/import database separately, or use built-in migration tools if available.
Automation Script
Here’s a simple backup script you can schedule with cron:
#!/bin/bash
# openclaw-backup.sh
BACKUP_DIR="$HOME/openclaw-backups"
DATE=$(date +%Y%m%d)
mkdir -p "$BACKUP_DIR"
cd ~/openclaw
tar -czvf "$BACKUP_DIR/openclaw-$DATE.tar.gz"
config.yaml .env skills/ plugins/ data/
# Keep only last 7 backups
find "$BACKUP_DIR" -name "openclaw-*.tar.gz" -mtime +7 -delete
echo "Backup complete: openclaw-$DATE.tar.gz"
Add to crontab for daily backups:
0 2 * * * ~/openclaw-backup.sh
Quick Checklist
- ☐ Stop OpenClaw before backup
- ☐ Include config files (config.yaml, .env)
- ☐ Include skills and plugins
- ☐ Include data directory for history
- ☐ Test restore on a test machine first
- ☐ Update webhook URLs after migration
- ☐ Verify all providers connect correctly
For more help, check our implementation database or leave a comment below.