๐ฆ How to Migrate OpenClaw
to a New Machine
VPS ยท Mac Mini ยท Laptop โ Step by Step
~10 min walkthrough ยท Works for any Linux or macOS target
Why Migrate?
Three common scenarios
๐ฅ๏ธ
VPS for 24/7 Uptime
Move from your laptop to a $5/mo VPS. Your agent runs while you sleep. Cron jobs, Discord bot, always on.
๐
Mac Mini Home Server
Apple ecosystem integration. Siri Shortcuts, AirDrop files to your agent, low power draw.
๐ป
New Laptop / Upgrade
Got a new machine? Bring your skills, workspace, and config with you. 15 minutes tops.
What Files Need to Move
Your entire agent lives in one folder
$ tree ~/.openclaw/ -L 2
/home/user/.openclaw/
โโโ ๐ workspace/
โ โโโ SOUL.md
โ โโโ MEMORY.md
โ โโโ memory/
โ โโโ skills/
โโโ ๐ skills/
โ โโโ crypto-analysis/
โ โโโ ssh/
โ โโโ ...
โโโ ๐ .env
โโโ ๐ openclaw.json
โโโ agents/
โโโ sessions/
๐ก The workspace/, skills/, openclaw.json, and .env are the critical four. Everything else regenerates.
Step 1: Install Node + OpenClaw
On the NEW machine
๐ง Linux / VPS
$ sudo apt update && sudo apt install -y curl
$ curl -fsSL https://deb.nodesource.com/setup_18.x \
| sudo -E bash -
$ sudo apt install -y nodejs
$ npm install -g openclaw
$ openclaw --version
openclaw v2026.2.23
๐ macOS
$ brew install node
$ npm install -g openclaw
$ openclaw --version
openclaw v2026.2.23
Step 2: Backup the Old Machine
One command โ grab everything that matters
$ cd ~
$ tar -czf openclaw-backup.tar.gz \
.openclaw/workspace/ \
.openclaw/skills/ \
.openclaw/openclaw.json \
.openclaw/.env
$ ls -lh openclaw-backup.tar.gz
-rw-r--r-- 1 user user 2.4M Feb 25 12:00 openclaw-backup.tar.gz
๐ก Skip sessions/ โ they're large and regenerate automatically. Skip node_modules/ โ npm install handles that.
Step 3: Transfer the Backup
Pick your method
๐ฅ๏ธ VPS โ VPS
scp openclaw-backup.tar.gz \
user@new-vps-ip:~/
๐ Mac โ Mac
AirDrop ยท USB Drive
iCloud Drive
๐ Cross-Platform
Google Drive ยท Dropbox
rsync ยท USB stick
$ mkdir -p ~/.openclaw
$ tar -xzf openclaw-backup.tar.gz -C ~/
$ ls ~/.openclaw/
workspace/ skills/ openclaw.json .env
โ
All files restored
Step 4: Set Up API Keys
Check your .env โ update if needed
OPENROUTER_API_KEY=sk-or-v1-xxxxxxxxxxxxxxxxxxxx
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxx
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=eyJhbGciOi...
DISCORD_TOKEN=MTIzNDU2Nzg5...
โ ๏ธ Keep keys in .env, not in shell profiles. The .env file is loaded by OpenClaw directly and stays out of your shell history.
Step 5: Configure & Start
Fire it up
$ openclaw gateway start
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฆ OpenClaw Gateway v2026.2.23 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Loading workspace from ~/.openclaw/workspace
โ 4 skills loaded
โ Discord channel connected
โ Gateway started on port 3000
Ready. Listening for messages...
[Discord] Michael: hey, you alive?
[Discord] ๐ฆ: I'm here! Running on the new machine.
Migration successful. ๐
Step 6: Auto-Start on Boot โ Linux
systemd service โ survives reboots
Description=OpenClaw Gateway
After=network.target
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/usr/bin/openclaw gateway start
Restart=on-failure
RestartSec=5
EnvironmentFile=/home/ubuntu/.openclaw/.env
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl enable openclaw
Created symlink ... โ openclaw.service
$ sudo systemctl start openclaw
$ sudo systemctl status openclaw
โ openclaw.service - OpenClaw Gateway
Active: active (running) since Tue 2026-02-25 12:05:00 UTC
Step 6: Auto-Start on Boot โ macOS
launchd plist โ the Mac way
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.openclaw.gateway</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/openclaw</string>
<string>gateway</string>
<string>start</string>
</array>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
</dict></plist>
$ launchctl load ~/Library/LaunchAgents/com.openclaw.gateway.plist
โ
Service loaded โ starts automatically on login
Step 7: Reboot Test
The moment of truth
$ sudo reboot
Connection to new-machine closed.
$ systemctl status openclaw
โ openclaw.service - OpenClaw Gateway
Loaded: loaded (/etc/systemd/system/openclaw.service; enabled)
Active: active (running) since Tue 2026-02-25 12:06:32 UTC; 45s ago
Main PID: 1842 (node)
Memory: 128.4M
CPU: 2.1s
Feb 25 12:06:33 vps openclaw[1842]: ๐ฆ Gateway started on port 3000
Feb 25 12:06:34 vps openclaw[1842]: โ Discord connected
Feb 25 12:06:34 vps openclaw[1842]: โ Ready. Listening for messages...
๐ก If it doesn't start, check journalctl -u openclaw -f for logs. Most common issue: wrong Node.js path in the service file.
โ
Migration Checklist
Everything in one place
โ
Install Node.js 18+ on new machine
โ
npm install -g openclaw
โ
Backup: tar workspace, skills, config, .env
โ
Transfer backup to new machine
โ
Extract into ~/.openclaw/
โ
Verify / update API keys in .env
โ
openclaw gateway start
โ
Set up auto-start (systemd / launchd)
โ
Reboot test โ confirm it survives
โ ๏ธ Common Issues
Gateway won't start?
โ Check node path: which openclaw
Bot not responding?
โ Verify DISCORD_TOKEN in .env
Skills missing?
โ Ensure skills/ was in your tar backup
Permission denied?
โ Check file ownership: chown -R $USER ~/.openclaw
๐ฆ
That's it. Your agent is migrated.
The whole process takes about 15 minutes.
Your skills, memory, and personality come with you.
๐ Subscribe for more OpenClaw guides
Drop a comment if you hit any snags โ I'll help you debug it.
github.com/openclaw/openclaw ยท MIT License ยท Free forever