Pihole stops working after power outage

It appears that the Pi may be losing track of time when it loses power (Pi's don't have a built in clock). Then, when it starts up, it cannot resolve DNSSEC since the time is not correct, thus cannot connect to an ntp server to set the time.

There are several potential solutions.

  1. Put the Pi on a battery backup or UPS so it won't lose power and won't lose time.

  2. Install an inexpensive clock module (this is one example https://www.amazon.com/battery-Raspberry-Arduino-Atomic-Market/dp/B01M105UFC).

  3. You can also set the Pi itself to use an upstream DNS resolver other than Pi-Hole. By default, Pi-Hole sets the DNS resolver in /etc/resolv.conf to the loopback address (assuming that you will want the Pi to use Pi-Hole for DNS resolution). You can do this with local changes to your installed Pi-Hole code:

One note - since you are using a local DNS resolver (unbound, it appears) that does DNSSEC resolution natively, you don't need to (nor do you want to) enable DNSSEC in Pi-Hole as well.

2 Likes