Ports issue after upgrade to v.6 (nginx as reverse proxy)

I upgraded from latest v.5.x to v.6 using pihole -up but I am having an issue with reaching the web interface.

This installation is running on a Pi with nginx as reverse proxy. There is two other docker applications running on this little host.
Previously, pihole was set to listen on port 82 (by adjusting lighttpd).

Now, there seems to be a conflict of ports that Pihole wants to use... see snippet from debug log.

*** [ DIAGNOSING ]: Ports in use
    udp:0.0.0.0:34817 is in use by avahi-daemon
[✓] udp:0.0.0.0:53 is in use by pihole-FTL
    udp:0.0.0.0:123 is in use by pihole-FTL
    udp:127.0.0.1:5335 is in use by unbound
    udp:0.0.0.0:5353 is in use by avahi-daemon
[✓] udp:*:53 is in use by pihole-FTL
    udp:*:123 is in use by pihole-FTL
    udp:*:33917 is in use by avahi-daemon
    udp:*:5353 is in use by avahi-daemon
[✗] tcp:0.0.0.0:80 is in use by nginx (https://docs.pi-hole.net/main/prerequisites/#ports)
[✓] tcp:0.0.0.0:53 is in use by pihole-FTL
[✗] tcp:127.0.0.1:8080 is in use by docker-proxy (https://docs.pi-hole.net/main/prerequisites/#ports)
[✓] tcp:0.0.0.0:8443 is in use by pihole-FTL
    tcp:0.0.0.0:9443 is in use by docker-proxy
    tcp:0.0.0.0:2223 is in use by sshd
    tcp:127.0.0.1:5335 is in use by unbound
    tcp:0.0.0.0:8000 is in use by docker-proxy
[✗] tcp:0.0.0.0:443 is in use by nginx (https://docs.pi-hole.net/main/prerequisites/#ports)
[✗] tcp:[::]:80 is in use by nginx (https://docs.pi-hole.net/main/prerequisites/#ports)
[✓] tcp:[::]:84 is in use by pihole-FTL
[✓] tcp:[::]:53 is in use by pihole-FTL
    tcp:[::]:9443 is in use by docker-proxy
    tcp:[::]:2223 is in use by sshd
    tcp:[::]:8000 is in use by docker-proxy
[✗] tcp:[::]:443 is in use by nginx (https://docs.pi-hole.net/main/prerequisites/#ports)
[✓] tcp:[::]:8080 is in use by pihole-FTL


Any ideas how to fix this? How can I make pihole use port 82 again?

full debug log: https://tricorder.pi-hole.net/kysyEPm9/

I took a look at Prerequisites - Pi-hole documentation, where it says:

If you have another webserver already listening on port 80/443, then pihole-FTL will attempt to bind to 8080/8443 instead. If neither of these ports are available, pihole-FTL's webserver will be unavailable until ports are configured manually (see configuration option webserver.port)

Unfortunately, I have no idea where to find webserver.port. Am I on the right track at least?

OK, I guess I found the following in /etc/pihole/pihole.toml
Would that be the right place to do some changes?

  # Possible values are:
  #     comma-separated list of <[ip_address:]port>
  port = "8080o,8443os,[::]:8080o,[::]:84" ### CHANGED, default = "80o,443os,[::]:80o,[::]:443os"

Sorry, but I need some help to understand this.

  • You add o flag to make the ports optional. This means the web server will start even if the optional ports are not available.

  • You add s flag to set secure ports (for https)

  • You can add IPv4 ports (8080 and 443 on the example above) and IPv6 ports ( [::]:8080).
    Note: the example above shows port 84 (IPv6), but this is not expected. It looks like the port was [::]:8443s, but the last characters were cut off.


Use this command:

sudo pihole-FTL --config webserver.port '82,8443s'  

# using 8843 because port 443 is in use by nginx - you can use any other port
# I didn't add the `o` flag in my example, but you can use it.
# IPv6 ports not added in my example (they are optional)
1 Like

Great, thanks for your quick reply and support @rdwebdesign. I will give it a try when I am back tonight.

Is this a bug, or where do you think this was cut off?

It's not a bug, but someone set that IPv6 port to 84.

That should be corrected, by changing it to 8443s.

That worked great. Thanks for your help!!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.