Clean install can't edit web_port (docker)

Expected Behaviour:

Access Pi-hole web gui http://ip:port

Actual Behaviour:

Getting "ERR_CONNECTION_REFUSED" when trying to connect.

Debug Token and other outputs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying... 
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing... 
 ::: Starting docker specific checks & setup for docker pihole/pihole
  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
Configuring default DNS servers: 8.8.8.8, 8.8.4.4
Custom WEB_PORT set to 8080
INFO: Without proper router DNAT forwarding to 0.0.0.0:8080, you may not get any blocked websites on ads
  [✓] New password set
DNSMasq binding to default interface: eth0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "0.0.0.0",
"VIRTUAL_HOST" => "0.0.0.0",
Using IPv4 and IPv6
::: setup_blocklists now setting default blocklists up: 
::: TIP: Use a docker volume for /etc/pihole/adlists.list if you want to customize for first boot
::: Blocklists (/etc/pihole/adlists.list) now set to:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Enabling Query Logging
[i] Enabling logging...
[✓] Logging has been enabled!
::: Docker start setup complete
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Pi-hole version is v5.3.1 (Latest: v5.3.1)
AdminLTE version is v5.5 (Latest: v5.5)
FTL version is v5.8.1 (Latest: v5.8.1)
[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting lighttpd
Starting pihole-FTL (no-daemon) as root
Starting crond
[services.d] done.

I have added the "WEB_PORT" env variable to get it to work, and exposed port 80 as 8080.
Not sure what I'm doing wrong. This setup has worked on earlier versions.

version: "3"

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:dev
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "8080:80/tcp"
      - "2083:443/tcp"
    environment:
      TZ: 'Europe/London'
      WEB_PORT: 8080
      WEBPASSWORD: 'Test9900++'
    volumes:
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped

Trying to connect to what URL? http://ip:port isn't going to get you the admin page. If you want to use the IP address then you'll need to use http://ip:port/admin/ or http://pi.hole which will redirect to http://pi.hole/admin. Only the pi.hole URL will automatically redirect.

You don't need that, there is no server listening on 443 inside the container.

I am trying to connect through: 192.168.1.15:8080/admin

I have removed "2083:443/tcp". But that doens't help in getting the admin GUI on port 8080 working.

Debug token as originally requested please.

Run pihole -d and post the URL provided after you upload your log results.

My guess is that you are using bridge networking mode and there's nothing configured to tell docker how to pass 192.168.1.15 to the running container. The provided yaml doesn't show any of the network configuration.

Yes, it's running in bridge mode. I have zero knowledge about networking modes on docker so that doesn't tell me much sadly.

Here is the token:
https://tricorder.pi-hole.net/fafp9cwwp8

Thanks for helping out

Remove that line. That changes the port that lighttpd is listening to inside the container. If you had that you'd need to use a port expose line that did "8080:8080/tcp". If you just want the web interface to be accessible on port 8080 then you don't want WEB_PORT declared.

I have another docker app that is exposed to the port 80, So I just want to be able to access the admin page on another port.Will try your ideas.

Yes, Excellent! It is now working :slight_smile: Thankk you for your help!