Self-Hosted Crypto Wallet Reliability: Docker Healthcheck and Auto-Recovery
说明与用途
使用 Docker 运行自托管加密钱包,通过 Docker 的健康检查和重启策略实现容器崩溃后的自动恢复,并通过命名卷保留钱包数据,使用 Docker Secrets 保护凭据。
问题
A self-hosted crypto wallet container can silently crash, leaving an AI agent unable to transact until the issue is detected and the container restarted.
结果
By leveraging Docker’s built‑in healthcheck and restart policies, WAIaaS provides a reliable self‑hosted wallet that automatically recovers from crashes, preserves wallet data via named volumes, and secures credentials with Docker Secrets.
工作流
- Clone the WAIaaS repo and run
docker compose up -dto start the daemon and push‑relay containers. - Verify the container is running and healthy with
docker compose logs -fandcurl http://127.0.0.1:3100/health. - If using auto‑provision, run
docker run -d --name waiaas -p 127.0.0.1:3100:3100 -v waiaas-data:/data -e WAIAAS_AUTO_PROVISION=true ghcr.io/waiaas/waiaas:latestand retrieve the recovery key withdocker exec waiaas cat /data/recovery.key. - For production, create a Docker Secrets overlay to store the master password securely and deploy with
docker compose -f docker-compose.yml -f docker-compose.secrets.yml up -d. - Configure environment variables such as
WAIAAS_DAEMON_HOSTNAME,WAIAAS_DAEMON_PORT, and RPC endpoints to match your infrastructure. - Use the OpenAPI spec at
/docor the Scalar UI at/referenceto test wallet functionality. - Monitor the health endpoint or integrate with tools like Portainer or Watchtower to receive alerts on unhealthy status.
证据
The official Docker Compose configuration ships with a healthcheck already wired in:
<strong>restart: unless-stopped</strong> means Docker will automatically restart the container after a crash, an OOM kill, or a host reboot — without any additional process manager.
Named volumes (<code>waiaas-data</code>) mean your wallet data, session tokens, and configuration survive a <code>docker compose down</code> and come back intact on <code>docker compose up -d</code>.
- 记录日期: 2026-10-12T16:40:55.577Z