I am running Pihole in a docker instance. I upgraded to v6 this morning and having trouble with FTLCONF_webserver_api_password. I expected this variable to support secrets so I don't have to include my password in the compose.yaml. Previously, this worked having these variables set in my compose.yaml
-operating system: Raspberry Pi OS Bookworm (Debian 12)
-hardware: RPi4
Actual Behaviour:
After upgrading to v6 and launching the admin interface for the first time, I get an error for password. Here is my new environment section in my compose.yaml
Hello, from my understanding this workaround isn't equivalent from a security point of view. Ability to use Docker Swarm secrets is a must have for me. I'd really like to see this security feature in PiHole v6 as it worked in v5 please.
Other breaking changes about using PiHole in Docker were really well documented and this went smoothly for me so a big thanks for your work
Best regards
The image for V6 was entirely built from scratch - so it might just be that I missed it while developing. Nobody had mentioned it throughout the beta (or I'm really bad at paying attention!!)
But, I'll look into it - it shouldn't be too difficult to add back in
Just tested pihole/pihole:development image, seems ok to me, I've been able to set the password with a secret.
[i] Setting FTLCONF_webserver_api_password from file
[i] Assigning password defined by Environment Variable
Thank you very much.
Are you planning to harmonize the name of the parameter with your new naming convention? Something like FILE_xxx or xxx_FILE (xxx being FTLCONF_webserver_api_password) maybe?
Thanks for this.
I will play around with it, because at the moment all all my input is being ignored. Even when completely removing the container and volumes. But i expect this is my issue:)
- WEBPASSWORD=
- WEBPASSWORD_file=/run/secrets/pihole
- WEBPASSWORD_FILE=/run/secrets/pihole
- WEBPASSWORD=$WEBPASSWORD
I'd suggest reading the docs, it's described in there exactly how to set the password . Here is the complete section about setting the web password, which covers just the password via environment variable, and also the docker secrets method I linked directly to before.
Heads up, I was also setting this up just now and stumbled on a slight issue in that documentation.
It seems like the WEBPASSWORD_FILE environment variable is case sensitive. It is correctly written in all caps everywhere on that page except the example compose file at the bottom of the page, where it is written as WEBPASSWORD_file. My password was not being read with the lowercase _file variable name, but started working once I switched it to all caps.
It's relatively easy to spot and correct while troubleshooting, but still a bit of a snag if someone was following the documentation line for line.