A question

Presumably a web server already running on that host (a container manager maybe)? Pi-hole needs port 80 to run the web admin interface, so if another web server already has it it can't start.

Note there's nothing wrong with the two-subnet setup you posted. Do you need it to be on the same subnet?

If needed you can change Pi-hole's web admin port number by adding a line to /etc/lighttpd/external.conf. You would pick a port that doesn't clash with anything on the host. Eg for port 580

server.port := 580

Or you can choose to not install the web admin interface, if you're okay managing it all via the command line.

Edit – I'm not a Docker user and I notice the compose file contains the section below. Therefore maybe with Docker it is here that the port is changed, and not the config file mentioned above. Someone who knows Docker is best to advise on this.

ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "80:80/tcp"

I think this is your Reddit post:
https://www.reddit.com/r/pihole/comments/16pmq0h/ips_not_showing_up_correctly/

This issue is related to Docker Desktop (docker for Windows).

In Windows and MacOS docker runs inside a special VM. This is the default docker VM subnet.

I don't use Docker Desktop, so I never saw this issue before.
You will need to verify how you configured your container (including which network mode you are trying to use).

Ok.

No, I dont have any web server running on the same computer.
EDIT I do have a plex server, but it runs on a different port.

This the what I set it to (my real config for the network)
image

Even when starting it with host and a modded file it still spits out this error.


(I set the GUI to port 80)

You shouldn't change this range to the same range you use to your network.

You need to fix the network use by your container.

How did you start your container? Please post the compose file or docker run command.

As I said on the Reddit post, you can't use host mode using Docker Desktop.

Docker docs makes it clear (emphasis added):

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.

You don't need to change the docker desktop subnet range. You need to fix your compose file or docker run command to use the correct IP.

docker run 
  --hostname=a5cfa4d82038 
  --env=WEBPASSWORD=REDACTED 
  --env=TZ=America/Chicago 
  --env=ServerIP=192.168.86.190 
  --env=PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
  --env=phpver=php 
  --env=PHP_ERROR_LOG=/var/log/lighttpd/error-pihole.log 
  --env=IPv6=True 
  --env=S6_KEEP_ENV=1 
  --env=S6_BEHAVIOUR_IF_STAGE2_FAILS=2 
  --env=S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 
  --env=FTLCONF_LOCAL_IPV4=0.0.0.0 
  --env=FTL_CMD=no-daemon 
  --env=DNSMASQ_USER=pihole 
  -p 443:443 
  -p 53:53 
  -p 53:53/udp 
  -p 70:70 
  --restart=unless-stopped 
  --label='org.opencontainers.image.created=2023-05-30T18:51:05.660Z' 
  --label='org.opencontainers.image.description=Pi-hole in a docker container' 
  --label='org.opencontainers.image.licenses=' 
  --label='org.opencontainers.image.revision=37bd3d2f0f9321211d9370fc96b7d06325cee887' 
  --label='org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole' 
  --label='org.opencontainers.image.title=docker-pi-hole' 
  --label='org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole' 
  --label='org.opencontainers.image.version=2023.05.2' 
  --runtime=runc 
  -d 
  pihole/pihole:latest

That output does not look as if it were supplied to start a container, rather like it was extracted from a running container?

Are you perhaps using an additional tool like Portainer to manage your Docker deployments?

If so, Portainer may hold on to variable values set on previous container launches.
To avoid that, discard all environment variables and fill at least the recommended ones before restarting a container.

In addition, you should also replace the deprecated ServerIP by the recommended FTLCONF_LOCAL_IPV4.

docker run -d --name pihole -e ServerIP=192.168.86.190 -e WEBPASSWORD=************* -e TZ=America/Chicago -e DNS1=104.238.130.180 -e DNS2=1.1.1.1 -e DNS3=1.0.0.1 -p 80:80 -p 53:53/tcp -p 53:53/udp -p 443:443 --restart=unless-stopped pihole/pihole:latest

@Bucking_Horn

I did that but now its only showing my routers IP, how can I resolve this without changing DHCP settings?

Is there a way to make my router not act as a the DNS then forward the traffic to my Pi-Hole

You did not answer any of my questions, nor did you apply the change I've recommended?

Note that Docker for Windows is considerably poorer in certain configuration options than a Linux Docker installation.

In particular, you are restricted to run Docker in a bridge network mode, where network trafffic to a container would be NATted, so it would appear to come from Docker's internal gateway address.

This perfectly matches your original observation:

In short, that observation would be expected for Docker on Windows.

You should adopt your Pi-hole configuration so it would line up with the current environment variables.

When I tried using FTLCONF_LOCAL_IPV4 it just shows my router's IP. I don't know how to avoid my router being the DNS server. Im using my isp ( google fiber ) default router and modem.

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 do it through the Web interface:

Tools > Generate Debug Log

https://tricorder.pi-hole.net/m7GiQiMR/

@Bucking_Horn