docs/install/migrating.md
OpenClaw supports three migration paths: importing from another agent system, moving an existing install to a new machine, and upgrading a plugin in place.
Use the bundled migration providers to bring instructions, MCP servers, skills, model config, and (opt-in) API keys into OpenClaw. Plans are previewed before any change, secrets are redacted in reports, and apply is backed by a verified backup.
<CardGroup cols={2}> <Card title="Migrating from Claude" href="/install/migrating-claude" icon="brain"> Import Claude Code and Claude Desktop state, including `CLAUDE.md`, MCP servers, skills, and project commands. </Card> <Card title="Migrating from Hermes" href="/install/migrating-hermes" icon="feather"> Import Hermes config, providers, MCP servers, memory, skills, and supported `.env` keys. </Card> </CardGroup>The CLI entry point is openclaw migrate. Onboarding can also offer migration when it detects a known source (openclaw onboard --flow import).
Copy the state directory (~/.openclaw/ by default) and your workspace to preserve:
openclaw.json and all gateway settings.auth-profiles.json (API keys plus OAuth), plus any channel or provider state under credentials/.MEMORY.md, USER.md, skills, and prompts.```bash
openclaw gateway stop
cd ~
tar -czf openclaw-state.tgz .openclaw
```
If you use multiple profiles (for example `~/.openclaw-work`), archive each separately.
```bash
cd ~
tar -xzf openclaw-state.tgz
```
Ensure hidden directories were included and file ownership matches the user that will run the gateway.
```bash
openclaw doctor
openclaw gateway restart
openclaw status
```
If Telegram or Discord uses the default env fallback (TELEGRAM_BOT_TOKEN or DISCORD_BOT_TOKEN), verify the migrated state-dir .env contains those keys without printing the secret values:
awk -F= '/^(TELEGRAM_BOT_TOKEN|DISCORD_BOT_TOKEN)=/ { print $1 "=present" }' ~/.openclaw/.env
openclaw doctor also warns when an enabled default Telegram or Discord account has no configured token and the matching env variable is unavailable to the doctor process.
On the new machine, confirm:
openclaw status shows the gateway running.In-place plugin upgrades preserve the same plugin id and config keys but may move on-disk state into the current layout. Plugin-specific upgrade guides live alongside their channels:
openclaw migrate: CLI reference for cross-system imports.