Login/logout missing from the WebGUI

Hey!
So I've successfully set up Pi-Hole in Docker but I noticed that I when going to /admin I am automatically logged in without providing password.

I did docker system prune -a and docker volumes prune. Removed all bind volumes and started my stack again but it still gets me directly into /admin which isn't secure. Anyone knows what is going on?


EDIT: I noticed that it happens in both cases:

  1. When I use environment in Docker Compose file that specifies the password WEBPASSWORD: MyPassword
  2. When I do change my password using docker exec -it pihole_container pihole -a -p

This indicates you have set an empty password.

Are you using a volume mount with files from a previous container?
What happens if you start your container without volumes?

How come I do set up an empty password if I actually do set up a password?

Would you care to share your docker compose file? It might help us identify issues easier...

version: "3"

services:
  letsencrypt:
    container_name: letsencrypt
    image: adferrand/dnsrobocert:latest
    volumes:
      - ./config/letsencrypt/domains.conf:/etc/letsencrypt/domains.conf
      - ./config/dnsrobocert:/etc/dnsrobocert
      - ./letsencrypt:/etc/letsencrypt

  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    command: bash -c "
      sleep 15 && cat /etc/letsencrypt/live/${DOMAIN}/cert.pem \
      /etc/letsencrypt/live/${DOMAIN}/privkey.pem > /etc/letsencrypt/live/${DOMAIN}/combined.pem \
      && tail -f /dev/null"
    depends_on:
      - letsencrypt
    ports:
      - '53:53/tcp'
      - '53:53/udp'
      # - '67:67/udp'
      # - '80:80/tcp'
      - '443:443/tcp'
    environment:
      TZ: 'Europe/London'
      WEBPASSWORD: SomePassword
    volumes:
      - pihole_etc-pihole:/etc/pihole/
      - pihole_etc-dnsmasq.q:/etc/dnsmasq.d/
      - pihole_etc-lighttpd:/etc/lighttpd/
      - ./letsencrypt:/etc/letsencrypt/
      - './config/pihole/lighttpd/external.conf:/etc/lighttpd/external.conf'
      - './config/pihole/lighttpd/lighttpd.conf:/etc/lighttpd/lighttpd.conf'
    restart: always
volumes:
  pihole_etc-pihole:
  pihole_etc-dnsmasq.q:
  pihole_etc-lighttpd:
  letsencrypt_etc-letsencrypt:

As a test:
What happens if you start your container without volumes?