Self-Hosting
Recommended setup
The simplest production setup is a VPS with Docker:
- Provision a VPS — any provider (AWS EC2, DigitalOcean, Hetzner, etc.) with at least 2 GB RAM and 10 GB disk
- Install Docker — follow Docker’s official docs
- Deploy with Docker Compose — see Docker Compose setup
Security considerations
- The auth token secures the API. Keep it secret and use HTTPS if exposing the port externally.
- The container runs with elevated privileges (
SYS_PTRACE,seccomp=unconfined). Run it on a dedicated VM or isolated Docker host. - Use HTTPS if exposing port 6174 externally. Both the API and VNC viewer at
/vnc/require the auth token.
Monitoring
Check the container health:
# Container statusdocker ps | grep agent-wechat
# Server and login statuswx status
# Container logswx logs# ordocker compose logs -f agent-wechatBackups
Back up the Docker volumes periodically:
# Back up WeChat datadocker run --rm -v agent-wechat-home:/data -v $(pwd):/backup ubuntu tar czf /backup/wechat-home-backup.tar.gz -C /data .
# Back up agent datadocker run --rm -v agent-wechat-data:/data -v $(pwd):/backup ubuntu tar czf /backup/agent-data-backup.tar.gz -C /data .Updates
To update to the latest image:
docker compose pulldocker compose up -dOr with the CLI:
wx downdocker pull ghcr.io/thisnick/agent-wechat:latestwx upAfter updating, the WeChat session usually persists. Scan the QR code in WeChat if prompted.