Everything that makes your agent unique lives in one folder: /home/openclaw/.openclaw. It holds the configuration, the memory, the sessions and the keys for your AI provider and channels. Your VPS already has daily server backups; to restore just your agent or move it to another server, make your own backups of that folder with these commands, as root.
Important: that folder contains your keys. Keep the backups somewhere safe and do not share them.
Make a backup
For a consistent backup, stop the agent for a moment while it runs:
openclaw-admin gateway stop
tar czf /root/openclaw-copia-$(date +%F).tar.gz -C /home/openclaw .openclaw
openclaw-admin gateway start
You get a file in /root, for example openclaw-copia-2026-10-15.tar.gz.
Schedule a daily backup
Open the task scheduler with crontab -e and add these two lines. The first makes the backup every day at 04:00; the second deletes those older than 7 days:
0 4 * * * tar czf /root/openclaw-copia-$(date +\%F).tar.gz -C /home/openclaw .openclaw
30 4 * * * find /root -name 'openclaw-copia-*.tar.gz' -mtime +7 -delete
Keep backups off the VPS
A backup that only lives on the server itself does not protect you if you reinstall it. Download them to your computer with scp root@YOUR_IP:/root/openclaw-copia-*.tar.gz . or with an SFTP client logging in as root.
Restore a backup
Upload the file to /root on your VPS and run, with the name of your backup:
openclaw-admin gateway stop
tar xzf /root/openclaw-copia-2026-10-15.tar.gz -C /home/openclaw
chown -R openclaw:openclaw /home/openclaw/.openclaw
openclaw-admin gateway start
openclaw-admin doctor
After restoring, the panel access token becomes the one stored in the backup.
Related
- Reinstall or change the application on your VPS
- How to update OpenClaw on your VPS
- Getting started with your OpenClaw VPS
Order: OpenClaw VPS in Frankfurt · in Miami
Was this article helpful?
Need more help?
Open a ticket and the support team goes through it with you.