π¦ ClawHub
OpenClaw Checkpoint - Personal AI Assistant Backup & Recovery (Github)
by @anthonyfrancis
Backup and restore OpenClaw workspace state and agents across machines using git. Enables disaster recovery by syncing SOUL.md, MEMORY.md, memory files, cron...
π‘ Examples
# Backup everything (default)
checkpoint-backupBackup only agents
checkpoint-backup --agents-onlyBackup only the 'alex' agent
checkpoint-backup --agent alexRestore workspace but skip agents
checkpoint-restore --latest --workspace-onlyRestore only agents from backup
checkpoint-restore --agents-onlyCheck which agents are backed up
checkpoint-status
Backwards Compatibility
~/.openclaw/agents/ does not exist or is empty, all commands skip agent handling with an info messageagents/ directory work fine -- restore simply skips agentsβοΈ Configuration
Easy Setup (Recommended)
Just run the interactive wizard:
checkpoint-setup
This handles everything: git init, SSH keys, GitHub setup, and first backup.
First Time Setup (Manual)
# 1. Initialize checkpoint system
checkpoint-init2. Create PRIVATE GitHub repository
Go to https://github.com/new
Name: openclaw-state
β οΈ Visibility: PRIVATE (important - contains your personal data!)
3. Add remote (use SSH, not HTTPS)
cd ~/.openclaw/workspace
git remote add origin git@github.com:YOURUSER/openclaw-state.git
checkpoint-backup
Setup on Second Machine
Option 1: Interactive Restore (Recommended)
# Install the checkpoint skill first
curl -fsSL https://raw.githubusercontent.com/AnthonyFrancis/openclaw-checkpoint/main/scripts/install-openclaw-checkpoint.sh | bashRun checkpoint-restore - it will guide you through the entire process
checkpoint-restore
This will:
Option 2: Manual Clone
# 1. Clone repository (use SSH)
git clone git@github.com:YOURUSER/openclaw-state.git ~/.openclaw/workspace2. Restore secrets from 1Password/password manager
Create ~/.openclaw/workspace/.env.thisweek
Create ~/.openclaw/workspace/.env.stripe
(Copy from secure storage)
3. Start OpenClaw
openclaw gateway start
π Tips & Best Practices
"Not a git repository" or "'origin' does not appear to be a git repository"
Runningcheckpoint-restore will now automatically start the interactive restore onboarding flow to help you connect to your backup repository. Alternatively, run checkpoint-setup to create a new backup from scratch."Failed to push checkpoint"
Another machine pushed changes. Runcheckpoint-restore first, then checkpoint-backup."You have uncommitted changes"
checkpoint-restore will prompt you to choose:
1. Save changes first (runs checkpoint-backup)
2. Discard local changes and continue
3. CancelYou can also skip the prompt with checkpoint-restore --force to discard changes directly.
Behind remote after restore
This is expected if another machine checkpointed since you last synced.GitHub prompting for username/password
GitHub no longer accepts password authentication for HTTPS. Switch to SSH:cd ~/.openclaw/workspace
git remote set-url origin git@github.com:YOURUSER/REPO.git
"Host key verification failed"
GitHub's SSH host key isn't in your known_hosts. Fix with:ssh-keyscan -t ed25519 github.com >> ~/.ssh/known_hosts
"Permission denied (publickey)"
Your SSH key isn't added to GitHub. Runcheckpoint-auth and choose SSH option.GitHub repo is empty after setup
The oldcheckpoint-init only committed .gitignore. This is fixed now. Run:
cd ~/.openclaw/workspace && git add -A && git commit -m "Full backup" && git push
Starting fresh
Runcheckpoint-reset to remove local git repo and optionally SSH keys, then checkpoint-setup.Agents not being backed up
Check that your agents are in~/.openclaw/agents/ (not somewhere else). Run checkpoint-status to see which agents are detected and which are backed up. Make sure you're not passing --workspace-only.Agent has nested .git errors
The backup process automatically strips.git directories from agent copies. If you see submodule warnings, run a fresh backup:
rm -rf ~/.openclaw/workspace/agents
checkpoint-backup
Restored agents missing files
Agent restore copies the backup as-is. If the backup was taken before certain files were added to the agent, those files won't be present. Runcheckpoint-backup on the source machine first to capture the latest state."Permission denied, mkdir '/Users/olduser'" after restoring on a new machine
This means files contain hardcoded paths from the original machine. If the backup was created before path normalization was added, run:cd ~/.openclaw/workspace
grep -rl "/Users/olduser" --include="*.md" --include="*.json" --include="*.sh" | \
xargs sed -i '' "s|/Users/olduser|$HOME|g"
Future backups will normalize paths automatically.Files show {{HOME}} instead of real paths
This is expected in the backup repo on GitHub. The{{HOME}} placeholder is replaced with the real $HOME path on each restore. If you see {{HOME}} in your local workspace after a restore, run checkpoint-restore --latest again.TERMINAL
clawhub install openclaw-checkpoint