Migrate OpenClaw to a New Machine
Move your config, skills, and tokens — without losing anything
What gets migrated
- ✅ Your
openclaw.jsonconfig (LLM providers, gateway settings, skills) - ✅ Installed skills and plugins
- ✅ Gateway auth tokens
- ⚠️ Device tokens — these are machine-specific, you will need to re-pair
- ❌ Browser Control session state — re-authenticate in the new browser
Migration Steps (5 total)
Step 1 — Export Your Config from the Old Machine
All OpenClaw settings live in a single JSON file. Find it and copy it to a safe location (USB drive, cloud storage, or transfer directly via SSH/SCP).
Find the config file
macOS / Linux
~/.openclaw/openclaw.jsonWindows
C:\Users\<YourUser>\.openclaw\openclaw.jsonopenclaw config path
Copy the entire .openclaw/ directory, which includes:
# Backup to a folder on your desktop cp -r ~/.openclaw ~/Desktop/openclaw-backup-$(date +%Y%m%d) # Or show exact path echo ~/.openclaw
# Copy .openclaw folder xcopy "%USERPROFILE%\.openclaw" "%USERPROFILE%\Desktop\openclaw-backup" /E /I
Your config contains API keys
openclaw.json stores your LLM provider API keys. Transfer it over an encrypted channel (SSH, encrypted USB, or end-to-end encrypted cloud). Do not email it.
Step 2 — Install OpenClaw on the New Machine
Install OpenClaw fresh on the target machine. Do not configure it yet — you will overwrite the config in Step 3.
npm install -g openclaw@latest # Verify install openclaw --version
If you run into Windows-specific install errors, see the Windows npm install guide.
Step 3 — Import Config to the New Machine
Copy your backed-up openclaw.json to the correct location on the new machine.
# Create the .openclaw directory if it doesn't exist mkdir -p ~/.openclaw # Copy your backup config cp /path/to/backup/openclaw.json ~/.openclaw/openclaw.json # Verify it loaded openclaw config get gateway.auth.token
# Create the directory if needed mkdir "%USERPROFILE%\.openclaw" # Copy the config copy "D:\openclaw-backup\openclaw.json" "%USERPROFILE%\.openclaw\openclaw.json"
Transfer via SSH (fastest for Linux/macOS)
Step 4 — Reinstall Skills and Plugins
Skills (plugins) are installed per-machine and are not transferred via the config file. You need to reinstall them on the new machine.
# Run this on the OLD machine to see what you had clawhub list --installed
# Install each skill you need, for example: clawhub install obsidian-cli clawhub install proactive-agent clawhub install nano-banana-pro # Or use the search to find what you need clawhub search <skill-name>
Browse the full Skills Registry to find and reinstall your skills.
Step 5 — Re-authenticate and Verify
Device tokens are machine-specific and cannot be transferred. On the new machine, you need to start fresh with device authentication.
# Start the gateway openclaw gateway start # Check status openclaw gateway status # Open Control UI in a fresh browser window to re-authenticate # (use Incognito for a clean device token handshake)
Re-paste your gateway token in Control UI
Open Control UI → Settings → Gateway Token and paste your token. It is stored per-browser, so the new machine needs it again.
Re-pair any Docker or remote devices
If you had Docker containers or remote devices paired to the old gateway, they need to be paired again on the new machine.
Run openclaw doctor to confirm everything works
The doctor checks token alignment, gateway health, and config validity in one pass.
openclaw doctor
Special Cases
Migrating to a different OS
Your openclaw.json is cross-platform — the same file works on Windows, macOS, and Linux. However, any absolute paths in your config (e.g. for local file access) will need to be updated to match the new OS path format.
Migrating just the config, keeping the old machine
If you want to run OpenClaw on two machines simultaneously, each machine gets its own device token. Both can share the same gateway.auth.token and LLM provider keys — just copy the config and start the gateway on each machine independently.
Config on a shared drive or NAS
Do not point multiple machines at the same openclaw.json on a shared drive. Concurrent writes will corrupt the config. Always keep a local copy on each machine.
Related Guides
Did this guide solve your problem?