OpenClaw supports three migration paths: importing from another agent system, moving an existing install to a new machine, and upgrading a plugin in place.
Import from another agent system
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.
The CLI entry point is [openclaw migrate](/docs/openclaw-docs/cli/migrate. Onboarding can also offer migration when it detects a known source (openclaw onboard --flow import).
Move OpenClaw to a new machine
Copy the state directory (~/.openclaw/ by default) and your workspace to preserve:
- Config —
openclaw.jsonand all gateway settings. - Auth — per-agent
auth-profiles.json(API keys plus OAuth), plus any channel or provider state undercredentials/. - Sessions — conversation history and agent state.
- Channel state — WhatsApp login, Telegram session, and similar.
- Workspace files —
MEMORY.md,USER.md, skills, and prompts.
Migration steps
```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.
Common pitfalls
Verification checklist
On the new machine, confirm:
-
openclaw statusshows the gateway running. - Channels are still connected (no re-pairing needed).
- The dashboard opens and shows existing sessions.
- Workspace files (memory, configs) are present.
Upgrade a plugin in place
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:
- [Matrix migration](/docs/openclaw-docs/channels/matrix-migration: encrypted-state recovery limits, automatic snapshot behavior, and manual recovery commands.
Related
- [
openclaw migrate](/docs/openclaw-docs/cli/migrate: CLI reference for cross-system imports. - [Install overview](/docs/openclaw-docs/install: all installation methods.
- [Doctor](/docs/openclaw-docs/gateway/doctor: post-migration health check.
- [Uninstall](/docs/openclaw-docs/install/uninstall: removing OpenClaw cleanly.