**Motivations:**
- Export Signet and mining wallet backups to git with only 2 versions kept
- Document and add backup/restore scripts for signet and mining wallet
**Correctifs:**
- Backup-to-git uses SSH URL for passwordless cron; copy timestamped files only; prune to 2 versions; remove *-latest from backup repo
**Evolutions:**
- data/backup-to-git-cron.sh: daily export to git.4nkweb.com/4nk/backup
- save-signet-datadir-backup.sh, restore-signet-from-backup.sh, export-mining-wallet.sh, import-mining-wallet.sh
- features/backup-to-git-daily-cron.md, docs/MAINTENANCE.md backup section
- .gitignore: data/backup-to-git.log
**Pages affectées:**
- .gitignore, data/backup-to-git-cron.sh, docs/MAINTENANCE.md, features/backup-to-git-daily-cron.md
- save-signet-datadir-backup.sh, restore-signet-from-backup.sh, export-mining-wallet.sh, import-mining-wallet.sh
- Plus autres fichiers modifiés ou non suivis déjà présents dans le working tree
**Motivations:**
- Docker services (bitcoind and mempool) were not starting automatically after reboot
- Mempool API was unhealthy because it tried to connect to bitcoind before it was ready
- No restart policy for bitcoind container
- Restart script started mempool before bitcoind, causing connection errors
**Root causes:**
- Bitcoind container had no restart policy (restart: no)
- Restart script started mempool before bitcoind
- No wait for bitcoind RPC to be ready before starting mempool
- No boot startup script for Docker services
**Correctifs:**
- Configured restart policy for bitcoind container: docker update --restart=always
- Improved restart-services-cron.sh:
- Start/restart bitcoind BEFORE mempool
- Wait for bitcoind RPC to be ready (max 60s) before starting mempool
- Detect if container is stopped (start) or running (restart)
- Use 'docker compose up -d' for mempool instead of 'restart'
- Created start-docker-services.sh:
- Start bitcoind first
- Wait for bitcoind RPC to be ready (max 120s at boot)
- Start mempool after bitcoind
- Logging to data/start-docker-services.log
- Created docker-services.service:
- Systemd service to start Docker services at boot
- Runs after docker.service and network.target
- Executes start-docker-services.sh
**Evolutions:**
- Automatic startup at boot: Docker services start automatically after reboot
- Guaranteed startup order: Bitcoind always starts before mempool
- Availability check: Wait for bitcoind to be ready before starting mempool
- Restart policy: Bitcoind container restarts automatically if stopped
- Better observability: Detailed logs for diagnosis
**Pages affectées:**
- data/restart-services-cron.sh: Improved startup order and availability checks
- data/start-docker-services.sh: New boot startup script
- data/docker-services.service: New systemd service for automatic startup
- fixKnowledge/docker-services-boot-startup.md: Documentation of improvements