Pi-hole stops working after power outage or restart

I dig up this conversation because I had the same issue with a newly installed pi-hole.

I turn off all devices at night, included the pi. So the pi-hole need to restart correctly each day. After one week trying, I finally succeeded! It’s a dirty solution but it work, maybe some of you will find something more clean.

For me, pi-hole can’t work as a DNS server when restarted because he don’t have the right time.
So :
1/ I installed ntp on the Pi.
2/ I forced “nameserver 8.8.8.8” on /etc/resolv.conf
3/ I change the right of this file to 555 to avoid system modification each time.

After each start, the pi need a bit of time to sync with ntp server but after that, all good to go.

1 Like

1/ I installed ntp on the Pi.
2/ I forced “nameserver 8.8.8.8” on /etc/resolv.conf
3/ I change the right of this file to 555 to avoid system modification each time.

Thanks! I had the same problem and this fixed it.

1 Like

And so your Pihole is not used any more.

https://discourse.pi-hole.net/t/alternative-upstream-dns-unbound/12996/20

This is true only for the Pi itself. Other clients will continue to use the Pi-Hole as DNS.

1 Like

You can change it back to 127.0.0.1 after ntp setup if you want. but ntp to be installed and configured, I needed to change the DNS to 8.8.8.8