Is port change supported?

So I started with pihole 5, wanted to install on an RPi4, where an apache2 was already running.
I decided to use pihole with pi-data instead of www-data (user), and 8080 as port (instead of 80), on lighttpd.

Finally it started to work, although pihole5 was always complaining about apache2 and/or port 80.
The upgrade to pihole6 terribly failed. After the upgrade I could not make it work (and also opened a bug report about a quite strange curl error). Network was died.
At the end I had to reconfigure apache2 to use another port (instead of 80 and 443), stop lighttpd to allow pihole to use its default. And I'm still unsure about that pi-data user.

Expected Behaviour:

allow to change port, web data user and co-existence with other web servers

Actual Behaviour:

not sure if default settings can be altered

Debug Token:

Yes, webserver port change is supported. In your file /etc/pihole/pihole.toml look at the following section and make the port change there:

 # Ports to be used by the webserver.
  # Comma-separated list of ports to listen on. It is possible to specify an IP address
  # to bind to. In this case, an IP address and a colon must be prepended to the port
  # number. For example, to bind to the loopback interface on port 80 (IPv4) and to all
  # interfaces port 8080 (IPv4), use "127.0.0.1:80,8080". "[::]:80" can be used to
  # listen to IPv6 connections to port 80. IPv6 addresses of network interfaces can be
  # specified as well, e.g. "[::1]:80" for the IPv6 loopback interface. [::]:80 will
  # bind to port 80 IPv6 only.
  # In order to use port 80 for all interfaces, both IPv4 and IPv6, use either the
  # configuration "80,[::]:80" (create one socket for IPv4 and one for IPv6 only), or
  # "+80" (create one socket for both, IPv4 and IPv6). The '+' notation to use IPv4 and
  # IPv6 will only work if no network interface is specified. Depending on your
  # operating system version and IPv6 network environment, some configurations might not
  # work as expected, so you have to test to find the configuration most suitable for
  # your needs. In case "+80" does not work for your environment, you need to use
  # "80,[::]:80".
  # If the port is TLS/SSL, a letter 's' (secure) must be appended, for example,
  # "80,443s" will open port 80 and port 443, and connections on port 443 will be
  # encrypted. For non-encrypted ports, it is allowed to append letter 'r' (as in
  # redirect). Redirected ports will redirect all their traffic to the first configured
  # SSL port. For example, if webserver.port is "80r,443s", then all HTTP traffic coming
  # at port 80 will be redirected to HTTPS port 443.
  # When specifying 'o' (optional) behind a port, inability to use this port is not
  # considered an error. For instance, specifying "80o,8080o" will allow the webserver
  # to listen on either 80, 8080, both or even none of the two ports. This flag may be
  # combined with 'r' and 's' like "80or,443os,8080,4443s" (80 redirecting to SSL if
  # available, 443 encrypted if available, 8080 mandatory and unencrypted, 4443
  # mandatory and encrypted).
  # If this value is not set (empty string), the web server will not be started and,
  # hence, the API will not be available.
  #
  # Possible values are:
  #     comma-separated list of <[ip_address:]port>
  port = "80,[::]:80" ### CHANGED, default = "80o,443os,[::]:80o,[::]:443os"

This setting is also available in Expert mode on your web GUI interface:

Yes, it is there. Although I don't think it is enough. (or it was not enough for pihole5). I changed it too, worked almost perfectly, just pihole debug was complaining about apache2 and port 80. That actually did not influence functionality. And it is all gone, since I have upgraded to pihole6 with default settings.
www-data relocation and renaming is still a question

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