Pi-hole setup in docker on UGREEN NAS

The issue I am facing:
I'm installing the Pi-hole in docker running on my UGREEN NAS. This is my first time installing and configuring, hence used the latest (6.x.x). And I'm facing a problem with web ui when I try to enter the password. It's always says incorrect no matter what I try.

my compose configuration:

services:
  nginx-proxy-manager:
    image: jc21/nginx-proxy-manager:latest
    container_name: nginx-proxy-manager
    restart: unless-stopped
    ports:
      - "80:80"       # HTTP
      - "443:443"     # HTTPS
      - "81:81"       # NPM Admin UI
    volumes:
      - /volume2/docker/nginx-proxy-manager/data:/data
      - /volume2/docker/nginx-proxy-manager/letsencrypt:/etc/letsencrypt
    networks:
      - proxy_net

  pihole:
    image: pihole/pihole:latest
    container_name: pihole
    hostname: pihole
    restart: unless-stopped
    environment:
      TZ: 'Europe/London'
      FTLCONF_webserver_api_password: 'A*>@notAcutalPass'
      #FTLCONF_webserver_port: '8080o,[::]:8080o,8443os,[::]:8443os'
      FTLCONF_dns_listeningMode: 'all'
      FTLCONF_webserver_interface_theme: 'default-dark'
      FTLCONF_dns_upstreams: '1.1.1.1;8.8.8.8'
    volumes:
      - /volume2/docker/pihole/etc-pihole:/etc/pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "8080:80/tcp"

networks:
  proxy_net:
    driver: bridge

Running sudo docker ps suggest the status is healthy with configured ports.

To verify whether the password is set correctly, I ran below command

$ sudo docker logs pihole | grep password

and the result is,

[i] Assigning password defined by Environment Variable
2025-07-26 21:37:40.460 BST [53M] INFO:    [✓] FTLCONF_webserver_api_password is used

This assures the password is set as expected from the environment variable. So I'm not sure what I'm doing wrong here!

Details about my system:

Pi-hole + Docker on NAS (UGREEN - UGOS)

I'm accessing the web interface by http://<NAS-IP>:8080/admin

Inside your container, execute the command env and check if the env variable is using the expected value.

Probably you used some special characters and the shell expansion is modifying the password.

I ran this docker exec -it pihole env and I can confirm I'm seeing the exact password that I set in the compose configuration.

Just to clarify your point, I replaced my password with only alphabet and numbers and removed all special chars. Still I'm facing the same problem

Ok it is working as expected now.

Just to confirm what I did, as soon as I post this, I doubted I might have done something wrong, so I deleted everything and did it fresh. Upon doing that, I set a simple password and that's when I saw your reply and tried docker exec -it pihole env. But it wasn't working and then I remember seeing similar post on clearing the cache of the web browser so I gave it a try and it started working.

So I assume, your answer might be right - the special char could have been the problem! But unfortunately, I can't confirm now!

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