Trying to login to Pi-hole webUI and the login page just reloads

Expected Behaviour:

The expected behaviour is that it logs in instead of just reloading the login page

  • Operating System: Pi-hole is installed on a UGREEN NAS running UGOS Pro. I’m trying to access it from a Windows 11 PC using Firefox
  • Hardware: UGREEN DXP4800 Plus NAS. Trying to access from custom built PC
  • Docker compose file:
  • # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
    services:
      pihole:
        container_name: pihole
        image: pihole/pihole:latest
        network_mode: host
        ports: #Uncomment ports if using network_mode: bridge
          # Ports for tsdproxy
    #      - "9081:8080"
    #      - "8000:8000"
          # DNS Ports
    #      - "53:53/tcp"
    #      - "53:53/udp"
          # Default HTTP Port
          - "8808:80/tcp"
          # Default HTTPs Port. FTL will generate a self-signed certificate
          - "4443:443/tcp"
          # Uncomment the line below if you are using Pi-hole as your DHCP server with network_mode: bridge
    #      - "67:67/udp"
          # Uncomment the line below if you are using Pi-hole as your NTP server
          #- "123:123/udp"
    #    labels:
    #      tsdproxy.enable: "true"
    #      tsdproxy.container_port: "80"
        environment:
          # Set the WebUI ports when using network_mode: host
          FTLCONF_webserver_port: '8808,4443'
          # Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
          TZ: 'America/Toronto'
          # Set a password to access the web interface. Not setting one will result in a random password being assigned
          FTLCONF_webserver_api_password: '[redacted]'
          # If using Docker's default `bridge` network setting the dns listening mode should be set to 'all'
    #      FTLCONF_dns_listeningMode: 'all'
          # Upstream DNS servers for Pi-hole to forward queries to when a domain isn't found on it's blocklists, separated by semicolon
    #      FTLCONF_dns_upstreams: 1.1.1.1;1.0.0.1;8.8.8.8;8.8.4.4
        # Volumes store your data between container upgrades
        volumes:
          # For persisting Pi-hole's databases and common configuration file
          - './etc-pihole:/etc/pihole'
          # Uncomment the below if you have custom dnsmasq config files that you want to persist. Not needed for most starting fresh with Pi-hole v6. If you're upgrading from v5 you and have used this directory before, you should keep it enabled for the first v6 container start to allow for a complete migration. It can be removed afterwards. Needs environment variable FTLCONF_misc_etc_dnsmasq_d: 'true'
          #- './etc-dnsmasq.d:/etc/dnsmasq.d'
        cap_add:
          # See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
          # Required if you are using Pi-hole as your DHCP server, else not needed
          - NET_ADMIN
          # Required if you are using Pi-hole as your NTP client to be able to set the host's system time
          - SYS_TIME
          # Optional, if Pi-hole should get some more processing time
          - SYS_NICE
        restart: always
    
    
  • Docker engine version: 26.1.0

Actual Behaviour:

Currently when trying to login the login page just reloads when I enter my password and click the “Log in (uses cookie)” button. The problem only seems to occur in regular Firefox on the PC. I can log in just fine in a private firefox browser, regular chrome browser and even the Firefox mobile browser on my iPhone.

Sometimes, and only sometimes, deleteing my browsers cache and cookies allows me to then log in properly. But that’s not ideal because then I also have to re-log in to every other website I access on this PC. Plus it doesn’t work consistently doing that. Like right now I can’t log in on my regular firefox on the PC and even clearing that data did not work. I still cannot log in. Yet opening Chrome or a private Firefox window on the same PC allows me to login just fine.

Debug Token:

Debug token is https://tricorder.pi-hole.net/zVlXJJjf/

Notes:

  1. use http.
    You made a mistake in your configuration and Pi-hole web server is using 2 http ports: 8808 and 4443.
    If you want to access via https, you need to add the secure flag (s) to the port:
    FTLCONF_webserver_port: '8808,4443s'
  1. You are using host network mode, so the ports section of your compose file will be ignored and the whole section can be removed:
    ports: #Uncomment ports if using network_mode: bridge

      ...

      # Default HTTP Port
      - "8808:80/tcp"
      # Default HTTPs Port. FTL will generate a self-signed certificate
      - "4443:443/tcp"

      ...

Thanks for the tips. I made the edits for those. But the same issue still persists. The login page just reloads when I try to sign in.

Are you accessing more than one web server using the same URL, but with different ports (http://IP:8000, http://IP:8808)?

If you are, this is your issue.

Cookies are unique to domain/IP but not ports. Browsers can't distinguish cookies that are just using different ports.

If more 2 different services on the same domain/IP are using the same cookie name (like sid used by Pi-hole), the browser will store both cookies as the same one and one of them will be overwritten, causing issues.

Yes I have multiple services running on the NAS. Every other service installed lets me log in just fine though. It’s literally only Pi-hole that has this problem trying to log in. So wouldn’t other services have the same issue attempting to log in?

Plus I said that even clearing my browsers entire cache and cookies doesn’t even always make it work. Which if cookies are the issue then surely clearing them all would make Pi-hole log in work without fail each time I clear them?

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