PI-hole installation

Pi-hole and HA on the same RPI3?
Possible?

PiHole used to be one of the community add-ons provided by Frenck. However, some time back it was deprecated and eventually removed in favor of AdGuard Home. The reason stated (IIRC) was that AdGuard works better and the team is more responsive.

That said, if someone puts together a repo I am willing to switch. For some reason I prefer PiHole over AGH.

1 Like

It depends how HA is installed. If someone runs HA core on Debian, you just apt install pihole.

apt istall home assistant?

apt install pihole is not a thing afaik.

apt install home-assistant is definitely not a thing.

Give me please some help.
Thanks

How did you install ha?

Don’t. :slight_smile: Use a dedicated and preferable small (old) Pi for that. You don’t want to have your DNS (and possibly your DHCP) server in combination with something, that is possibly restarted every now and then (HA).

Whenever you need to restart your HA machine, you’d switch off your whole network for seconds/minutes, and there is no benefit in installing this together with HA.

I’m using PiHole for a few years now, I had to restart it four or five times. HA on the other hand, I need to restart frequently (at least once a week, because of updates), and I’d guess once a month I need to restart not only HA, but also the Pi that is running on. For this time frame I’d block my whole network - no IPs, no connection and whatnot else. I’d shut down everything, the movie I’m watching, the time pings for all machines and so on.

Me, personally, I wouldn’t want to mess with two so different things on one machine. I know, others don’t see it that way, and for different software I’m all in with them, but PiHole especially is something very different.

Oh, and before I forget: PiHole is so simple to install on a dedicated machine, why not use this advantage? :slight_smile:

1 Like

Raspberry Pi imager selecting HA

This was shorthand for: If the OP has control over the host OS (depending on the installation method used), you can just install pihole directly with apt on Debian.

No you cannot. Debian 11

nick@hass:~$ apt search pihole
Sorting... Done
Full Text Search... Done
nick@hass:~$ apt search pi-hole
Sorting... Done
Full Text Search... Done
1 Like

You’re right. There’s no package for apt. It’s a manual installation as per the pihole docs.

Well I personally would love to have several instances for redundancy. I have Pi-Hole on a dedicated Pi, but also run AGH on my HA box (HAOS). But syncing the settings is a bit of a pain.

If I may ask, but why? Does it make sense to have both? I can’t see any reason why you would want to have two different DNS-privacy-tools used at once? But that doesn’t mean, there couldn’t be any valid reasons, i just don’t know them :rofl:

Seriously, Pi-Hole does an excellent job, and one DNS, published by the router, should do the job quite nicely, even if some VLans are configured.

And for redundancy: I always have a backup from Pi-Hole on an SD-card, so if the first instance is going out if business :slight_smile: , I can simply put in the card and off it goes. I just loose one or two days of query logs, but if I change any of the settings or do an update, I make a backup and have that ready as a fail-safe.

EDIT:
Just for clarification, with AGH you mean AdGuardHome, don’t you?

Redundancy, nothing else. The other Pi I am running for Pi-Hole has a few other things on it as well (such as Flightaware monitoring), because of which it needs to be restarted every now and then as well. So having two instances of Pi-Hole would make less of a hassle.

My HAOS instance is running Adguard Home simply because there is no add-on (that I know of at least) which would run Pi-Hole, and otherwise I greatly enjoy just running the OS version and not having to bother with OS updates myself.

1 Like

I see! :slight_smile: Thanks for the explanation.

There once was a Pi-Hole addOn in HA-OS, but it was discontinued in favor of AGH. Sadly. :slight_smile:

I do run HA-OS for a few weeks for the same reasons, the supervised install I used didn’t offer any benefits anymore, so I changed. But I don’t need a privace guard in ma HA-OS. That’s where I have setup my Pi-Hole on a dedicated Pi and let my router advertise the IP from Pi-Hole to all my devices as DNS server. I might change that to use DHCP from Pi-Hole as well, but for now I already have to many unfinished projects, so this will have to wait. :slight_smile:

I read somewhere about a project, where two Pi-Hole instances were tied together and used with something very much like a load balancer. If machine one drops out, machine two is jumping in with little to no outtime. :slight_smile: Unfortunately I can’t find it right now.

My setup right now uses a FritzBox as a router, with a disabled DNS server. If my Pi-Hole fails, the FritzBox jumps in and does the job. Not very good, but for the few minutes I need to work on the Pi-Hole machine it’s more than enough. Maybe your router can be configured for something like this as well. But my Pi-Hole get’s very little time off, I mostly have to restart it after a Pi-Hole update, to make sure everything is loaded correctly. :slight_smile:

No worries.

You don’t need a load balancer to balance traffic between two DNS servers, you can literally just define two IP addresses as DNS servers in your DHCP settings. Some of your clients will use the first entry primarily and the secondary only if the first one fails, some will pick one at random.

So having the first DNS server as my PI-Hole and the secondary as my router, it would work most of the time but not flawlessly :).

1 Like

I use Pi-Hole on a second Pi. I don’t think I would want it on the same system as HA because I restart HA pretty often for various reasons and that means that each time I do that then my entire DNS system would go down as well while waiting for HA to restart. Pi-Hole, on the other hand, only gets a restart when there’s an update or when I run automation to switch from one Internet router to another in case of a failure (it changes around configs on HA and Pi-Hole for a new gateway address).

The built-in support for Pi-Hole is perfectly fine for my needs, it allows me to disable it via voice control when I might be having a problem getting to something the Pi-Hole is blocking.

Could you explore that a little more, please? What built-in support do you mean? Thanks!

The integration - Pi-hole - Home Assistant I suspect.