Can't access admin page. Using docker and alternative http port - EDIT: Additionally after some time DNS des not resolve

So I am switching my pihole server from a raspberry pi to an old laptop along with a webserver. For this reason I chose to use the docker implementation and because I need port 80 open for the http server I changed the exposed port/forwarded the port to port 6578, so that my docker-compose.yml file looks like this :

version: "3"
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "6578:80/tcp"
    environment:
      TZ: 'America/New_York'
      WEBPASSWORD: '6nYmKYSgTgtY'
      PIHOLE_DNS_: 1.1.1.1
      WEBTHEME: "default-dark"
      VIRTUAL_HOST: '192.168.1.162:6578'
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    restart: unless-stopped

I have no issue getting a response at pi.hole and 192.168.1.162:6578 however if I click the admin link or try pi.hole/admin and 192.168.1.162:6578/admin the admin page doesn't load.

Running on an Arch linux Kernel: Linux 5.14.2-arch1-2

Fresh container, I haven't tried switching my router DNS server setting to the new container because I would like to/need to configure internal DNS entries first.

This is the log

[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] Installing /etc/dnsmasq.d/01-pihole.conf...
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf,
  [i] Installing /etc/.pihole/advanced/06-rfc6761.conf...
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf,
Setting DNS servers based on PIHOLE_DNS_ variable,
Setting Web Theme based on WEBTHEME variable, using value default-dark,
::: Pre existing WEBPASSWORD found,
DNSMasq binding to default interface: eth0,
Added ENV to php:,
			"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",,
			"ServerIP" => "0.0.0.0",,
			"CORS_HOSTS" => "",,
			"VIRTUAL_HOST" => "192.168.1.162:6578",,
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,
  Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf,
  Pi-hole version is v5.4 (Latest: v5.4),
  AdminLTE version is v5.6 (Latest: v5.6),
  FTL version is v5.9 (Latest: v5.9),
  Container tag is: pihole/pihole:2021.09-amd64-buster,
[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.,
Stopping pihole-FTL,
Starting pihole-FTL (no-daemon) as root

Remove the VIRTUAL_HOST environment variable and try that.

No luck unfortunately. I removed container along with backup data that was created and ran docker-compose again however still no access to admin page, only standard ?block? page.

Interestingly enough, even after switching my router to use the containers IP address as a DNS server I get sent to the (old) raspberry pi instance rather than the new Docker instance when trying to access pi.hole. Also I tried adding a reverse proxy virtual host to apache in order to forward pi.hole to 192.168.1.162:6578 however I still get sent to (old) raspberry pi instance and can only get to Docker instance via IP address:Port (192.168.1.162:6578) and no admin page load.

EDIT: rebooted router now no longer getting any response for pi.hole
Also tried adding pihole to bridge network as well as pihole
I do NOT plan to use DHCP service/feature of pihole

ADDITION / EDIT: Seems FTL isn't working either
So I figured I would just try changing the DNS server on my router to the Docker instance and it seems to work for about 5 or 10 minutes (with the exception that pi.hole still ends up at the (old) raspberry pi instance rather than the Docker) and then I seem to loose internet (WAN) connection. Pages stop loading with DNS could not resolve errors. Not really sure what's going on here. I added rules to iptables to allow port 53 incoming for TCP and UDP and that doesn't help.
When pages stop loading I go to my router and change the DNS back to the raspberry pi instance however it doesn't seem to change back unless I reboot it.

So it seems I can't get the admin page or use the DNS FTL service either.

Any ideas / suggestion?

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