PiHole Password reset to default after reboot

Hi All,

I am running PiHole in a docker container on a raspberry pi.
Works fine except one thing, I have set up the docker compose file originally used with a password that I now want to change. Running "pihole -a -p" inside the container let's me change it, but the moment I restart the container the password goes back to the original one set during initial container creation.
I've tried to look for the config file and found the setupVars.conf but the WEBPASSWORD there is a hash so I don't think I can change it there.
I'm new to Raspberry Pi, docker and linux so might be missing something.
Can someone please let me know how to change this password so it doesn't reset each reboot?

Thanks so much!

You are using containers. By default containers don't persist information.
This means your password will also be reset every time, but there are solutions.

You need to add an environment variable to always start the container with the same (and predefined) password.
See the recommended variables section from our README.

Another way is to use Volumes to persist every config (including password, logs, query database) between restarts.

I've changed the yml file and re-created the container, thanks for your help.

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