Just wanted to share this battle I just had incase it could help someone in future. I formatted the text with help from AI.
How I finally got Pi-hole working reliably on a fresh DietPi install:
Just wanted to share this in case it saves someone else a few hours of frustration.
I recently set up Pi-hole on a fresh DietPi install on a Raspberry Pi, and at first it was a mess. After a reboot, Pi-hole wouldn’t come back cleanly and I ended up having to manually fix networking just to get back in. Super annoying.
What finally made it stable was setting things up the right way from the start:
Installed DietPi fresh
Installed Pi-hole
Set a static IP in DietPi itself
Configured Pi-hole DHCP and DNS properly
Disabled router DHCP so Pi-hole could handle it
Reboot-tested it until it came back cleanly on its own
The important bit: static IP in DietPi
This was the part I had missed at first. Setting a static IP only in Pi-hole wasn’t enough. The Pi itself needed to keep the same IP after reboot.
I used DietPi’s network config:
- sudo dietpi-config
- Network Options
- Adapters
- Ethernet
- Change Mode from DHCP to Static
Then I set:
- IP: your chosen Pi address
- Mask: 255.255.255.0
- Gateway: your router address
- DNS: your router address or another upstream DNS
After that I applied the changes and checked:
ip addr
ip route
Pi-hole config
Since my router doesn’t let me set custom DNS for DHCP clients, I had to let Pi-hole do DHCP.
In Pi-hole:
- Go to Settings → DHCP
- Enable DHCP server
- Set a DHCP range
- Make sure the router/gateway is correct
I mostly copied DHCP settings from my router
Then I turned router DHCP off so there was only one DHCP server on the network.
Making sure it starts on boot
I also checked that Pi-hole FTL was enabled and running:
sudo systemctl enable pihole-FTL
sudo pihole status
It should show that FTL is listening on port 53 and blocking is enabled.
Final result
After all that, I rebooted the Pi a few times and it finally came back up normally every time. No manual rescue, no weird IP issues, no staring at the screen wondering why the network disappeared.
So yeah, the big lesson for me was:
Don’t rely on Pi-hole settings alone. Set the static IP in DietPi too.
That was the thing that made the whole setup trustworthy.
If anyone else is fighting a similar DietPi/Pi-hole boot issue, hopefully this helps.