Secondary Pi-hole automatic fallover

I have two Pi-hole dockers running on two different NAS units. When I manually shutdown the first or primary Pi-hole, my devices did not automatically pick up the second as desired.

I've seen two solutions offered, one with Keepalived and on with some configuration in Pi-hole.

Is there a viable keepalived solution that is easy to implement and preferably where a docker that can be installed on both NAS units is available?

Or is the configuration option detailed some place clearly?

Thank you.

We need some information to understand the issue.

For each Pi-hole instance:

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or if you run your Pi-hole as a Docker container:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

(If this is a docker installation, please also include the compose file or docker run command used to start the container)

From within UnRaid, Docker, Binhex-Official-Pihole, right-click, >_Console, I type in what you suggested /# docker exec -it Binhex-Official-Pihole pihole -d, I end up with bash: docker: command not found.

Which means I am doing it wrong or in the wrong place.

I'm not sure what is "Binhex-Official-Pihole", but this is definitely not the official Pi-hole installation.

Maybe this is a template or script used to install Pi-hole on UnRaid, but I never heard about it (I never used UnRaid).

Please check if this script/template was created to execute Pi-hole v6 or Pi-hole v5. If it targets Pi-hole v5 it won't work.

This is what I pulled. Running Pi-hole 6.

Ok, I am chipping away at this learning curve. I was able to ssh into my Qnap, ran the command you presented tome and have taken it from my clipboard and posted it in Notepadd++. It is very long. Is there just a section you need. I searched within the file, token URL but could not find it.

You won't find a token if you didn't upload the file.

Execute the command again. When asked to upload, answer "Y". After the upload a Token will be shown. Copy and paste here only the Token.

I discovered in the process of doing this that if I enter the two Pi-hole static IP's in the devices, rather than the router, shutting one down, it seems to rollover to the second one as I hoped it would do on my router. So I am going to go with this option as it would be the simplest than trying to run another app I am not familiar with at the time.