This guide moves an RemoteClaw gateway to a new machine without redoing onboarding.
What Gets Migrated
When you copy the state directory (~/.remoteclaw/ by default) and your workspace, you preserve:
Config — remoteclaw.json and all gateway settings
Auth — API keys, OAuth tokens, credential profiles
Sessions — conversation history and agent state
Channel state — WhatsApp login, Telegram session, etc.
Workspace files — MEMORY.md, USER.md, skills, and prompts
Run `remoteclaw status` on the old machine to confirm your state directory path.
Custom profiles use `~/.remoteclaw-/` or a path set via `REMOTECLAW_STATE_DIR`.
Migration Steps
On the **old** machine, stop the gateway so files are not changing mid-copy, then archive:
```bash
remoteclaw gateway stop
cd ~
tar -czf remoteclaw-state.tgz .remoteclaw
```
If you use multiple profiles (e.g. `~/.remoteclaw-work`), archive each separately.
[Install](/install) the CLI (and Node if needed) on the new machine.
It is fine if onboarding creates a fresh `~/.remoteclaw/` -- you will overwrite it next.
Transfer the archive via `scp`, `rsync -a`, or an external drive, then extract:
```bash
cd ~
tar -xzf remoteclaw-state.tgz
```
Ensure hidden directories were included and file ownership matches the user that will run the gateway.
On the new machine, run [Doctor](/gateway/doctor) to apply config migrations and repair services:
```bash
remoteclaw doctor
remoteclaw gateway restart
remoteclaw status
```
Common Pitfalls
If the old gateway used `--profile` or `REMOTECLAW_STATE_DIR` and the new one does not,
channels will appear logged out and sessions will be empty.
Launch the gateway with the **same** profile or state-dir you migrated, then rerun `remoteclaw doctor`.
The config file alone is not enough. Credentials live under `credentials/`, and agent
state lives under `agents/`. Always migrate the **entire** state directory.
If you copied as root or switched users, the gateway may fail to read credentials.
Ensure the state directory and workspace are owned by the user running the gateway.
If your UI points at a **remote** gateway, the remote host owns sessions and workspace.
Migrate the gateway host itself, not your local laptop. See [FAQ](/help/faq#where-does-remoteclaw-store-its-data).
The state directory contains API keys, OAuth tokens, and channel credentials.
Store backups encrypted, avoid insecure transfer channels, and rotate keys if you suspect exposure.
Verification Checklist
On the new machine, confirm:
remoteclaw status shows the gateway running
Channels are still connected (no re-pairing needed)