Now I thought to create a new docker file from scratch for v6 to mimic current setup
version: '3'
services:
pihole:
container_name: pihole-v6
image: pihole/pihole:latest
hostname: pihole
network_mode: host # Use host networking mode
cap_add:
- NET_ADMIN # Necessary for Pi-hole's DHCP server functionality
environment:
TZ: 'dummyvalue' # Timezone setting
FTLCONF_webserver_api_password: 'dummyvalue' # Change this to your desired password
FTLCONF_webserver_port: '8099' # Port
FTLCONF_dns_dnssec: 'true' # Enable DNSSEC
FTLCONF_dns_listeningMode: 'all' # Ensure dnsmasq listens to all interfaces
FTLCONF_dns_revServers: 'true,192.168.1.0/24,192.168.1.1#5335,lan'
FTLCONF_dns_upstreams: '192.168.1.1#5335' # Unbound upstream DNS
volumes:
- '/volume1/docker/pihole-v6/pihole:/etc/pihole:rw'
- '/volume1/docker/pihole-v6/pihole/hosts/hosts:/etc/hosts:rw'
restart: always
depends_on:
- unbound
unbound:
image: mvance/unbound:latest
container_name: unbound
ports:
- "5335:53/tcp"
- "5335:53/udp"
volumes:
- '/volume1/docker/pihole-v6/unbound:/etc/unbound' # Change to your volume path
restart: always
But it keeps falling with error
can't bind to socket: 0.0.0.0:80: Address already in use
Now I can see port 80 is in use by Synology.. but v5 starts fine but not v6
Only difference I can see is the ServerIP mention but it seems it was deprecated a long time ago . I also tried to add this to v6 setup but it fails
FTLCONF_dns_reply_host_IPv4: '192.168.1.1'
So what am I missing here? I am trying to redirect internal 80 to 8099 .. Works on my v5 docker compose but fails on v6 docker compose. v5 is shut when I try v6
If you see something wrong, please recommend a v6 docker compose file when compared to my working v5 file. Happy to keep it simple if something doesn't need to be there (like is hostname needed or I can get rid of it?)
It could be that you are still running the v5 container:
A v5 wouldn't know and thus ignore any of the v6 environment variables and would just try to start on port 80.
You'd have to remove/destroy the v5 container and then start a fresh v6 one.
EDIT:
In case you are using Synology's Container Manager (CM) to manage Docker on your Synology:
I'm not familiar with it, but it would seem that removing and restarting a container won't pull a new image, i.e. the container will be based on the Pi-hole image as downloaded at the time of Project creation in CM.
Unless you find a way to pull a Pi-hole v6 image with your existing CM Project, you may have to create a new Project for v6.
The docker commands above are intended to detect what image your running container is based on, and if a v6 image has been downloaded already.
I can't advise how to execute them under CM, but would be delighted to learn if and how that would be possible.
Cannot bind (…) ( 0.0.0.0:123 (Address in use) indicates that your host system is already running an NTP server.
You should disable Pi-hole's NTP features via Settings | All settings » Network Time Sync.
As you are already using 192.168.1.1 as Pi-hole's only upstream, your dns.revServers entry is redundant, as it points to the very same 192.168.1.1#5335.
You could consider to remove it.
I'm a bit curious about your choice of upstream, though:
Your previous v5 compose file has been pointing to 127.0.0.1#5335, and the rev server target has been 192.168.1.100.
Knowing next to nothing about your network,I can't tell whether your current settings are correct, but you may want to verify they are.
Other than that, your debug log shows Pi-hole v6 to be operational.
Will remove line FTLCONF_dns_revServers: 'true,192.168.1.0/24,192.168.1.1#5335,lan'
I am bit confused of upstream config myself.. 127.0.0.1 is the NAS (192.168.1.1) where Pihole and unbound is installed and 192.168.1.100 is Router. What should I change in docker file?
Any good way to test unbound is working with Pihole?
Thinking this as an update
version: '3'
services:
pihole:
container_name: pihole-v6-8888
image: pihole/pihole:latest
hostname: pihole
network_mode: host # Use host networking mode
environment:
TZ: 'xxxxx' # Timezone setting
FTLCONF_webserver_api_password: 'xxxxx' # Change this to your desired password
FTLCONF_webserver_port: '8888' # Port
FTLCONF_dns_dnssec: 'true' # Enable DNSSEC
FTLCONF_dns_listeningMode: 'all' # Ensure dnsmasq listens to all interfaces
FTLCONF_dns_upstreams: '192.168.1.1#5335' # Unbound upstream DNS
FTLCONF_dns_reply_host_IPv4: '192.168.1.1'
volumes:
- '/volume1/docker/pihole-v6/pihole:/etc/pihole:rw'
- '/volume1/docker/pihole-v6/pihole/hosts/hosts:/etc/hosts:rw'
restart: always
depends_on:
- unbound
unbound:
image: mvance/unbound:latest
container_name: unbound
ports:
- "5335:53/tcp"
- "5335:53/udp"
volumes:
- '/volume1/docker/pihole-v6/unbound:/etc/unbound' # Change to your volume path
restart: always
Should I also keep these as I had it in my old v5 file.. Not sure of usage now