This is a quick write up for the hardware and software config for the high availability Pi-hole cluster with Nginx load balancing. Add this to nginx.c

High availability Pi-hole cluster with Nginx load balancing

submited by
Style Pass
2020-08-13 18:51:23

This is a quick write up for the hardware and software config for the high availability Pi-hole cluster with Nginx load balancing.

Add this to nginx.conf (make sure to change IPs to match your two pihole pi)
stream {
upstream dns_servers {
server 192.168.1.136:53 fail_timeout=60s;
server 192.168.1.152:53 fail_timeout=60s;
}
server {
listen 53 udp;
listen 53; #tcp
proxy_pass dns_servers;
error_log /var/log/nginx/dns.log info;
proxy_responses 1;
proxy_timeout 1s;
}
}
to restart nginix run this:

Leave a Comment