Update management
Best Practices and Optimization
Manual Updates
Check current version and update Pi-hole:
# Check version
pihole -v
# Update Pi-hole software
pihole -up
# Reboot if required
sudo reboot
Automated Updates
Configure automatic updates using cron:
# Edit crontab
crontab -e
# Add weekly update at 2 AM on Sundays
0 2 * * 7 pihole -up
# Optional: Add weekly system updates at 3 AM on Sundays
0 3 * * 7 sudo apt update && sudo apt upgrade -y && sudo reboot
Update Monitoring
Stay informed about new Pi-hole releases: - Follow the Pi-hole GitHub repository - Set up monitoring tools: - UptimeRobot - Watchtower (for Docker installations) - Custom notification scripts
Docker-Specific Updates
Update Pi-hole running in Docker:
# Pull latest image
docker pull pihole/pihole:latest
# Restart container
docker-compose down
docker-compose up -d
Pre-Update Safety Measures
Always create a backup before updating:
# Create compressed backup
tar -czvf pihole-backup.tar.gz /etc/pihole /etc/dnsmasq.d
Best Practices
- Review release notes before updating
- Test updates in a separate environment if Pi-hole is critical to your infrastructure
- Keep regular backups using Teleporter or system backups
- Monitor system stability after updates
Following these practices ensures your Pi-hole installation remains current and secure while minimizing potential disruptions.
Something here not working for you? Ask in the community — other makers and the Little Bird team read it.