Skip to content

Storage and backups

~/.config/agent-wechat/
├── server/config.toml daemon settings (optional)
└── client.toml CLI: saved servers and default account
~/.local/share/agent-wechat/ data folder
├── api-token owner API token
└── accounts/<id>/
├── profile/ WeChat profile: history, contacts, media
└── agent/ credentials, jobs, event log
$TMPDIR offline inspection snapshots

On Windows, settings live in %APPDATA%\agent-wechat and data in %LOCALAPPDATA%\agent-wechat. macOS uses the same paths as Linux.

If you logged in with --official, there’s no profile/ folder: the daemon uses WeChat for Linux’s ~/xwechat_files and ~/.xwechat where they are, and keeps only its own files in the data folder.

Back up

Stop the daemon (wx daemon stop, systemctl --user stop agent-wechat-native or docker compose stop), then copy the data folder:

Terminal window
tar -czf wechat-backup.tgz -C ~ .local/share/agent-wechat

With --official, add xwechat_files .xwechat to that command. The profile alone would lose queued sends, OpenClaw’s progress and recall records; the data folder alone would have no history.

Change locations

Set dataDir in ~/.config/agent-wechat/server/config.toml, or pass --data-dir. See Configuration.