[solved] Unable to login unless password is blank

Hi everyone,

I upgraded my pihole docker from 5 to 6 a while ago, and had an issue where I could no longer login. I would put the same password as before the upgrade, but the login page would just reload with no obvious "bad password" or other error. The forgot password indicates to do 'pihole setpassword' to reset, but this did not solve the issue.

Fast forward to tonight where I am motivated to work on the issue and here is what I had tried:

  • Again, doing the 'pihole setpassword' command to reset the password, and it shows that the password was set successfully. I tried a few different passwords, including leaving it blank to remove, which the command confirmed successfully every time. The UI never let me login. I even tried restarting the container.

  • With some Googling out of the way, I found that I can set the password via a new environment variable "FTLCONF_webserver_api_password" which I set, but again the UI would not let me login, with no error message on screen. I also removed the old password variable (I forget what it looked like now), but this didn't seem to change anything. Attempting to run 'pihole setpassword' says this will not work due to the variable, which is fine, and at least shows the variable should work.

  • More Googling, I found mention on another post (Can't login to Web Interface anymore) that this person could not login using IP, but could using the pihole dns name. In my case, pihole does not resolve, and as my pihole is on a docker with a bridged network, the IP it shows is different than the IP I am hitting (ex: 172.16.0.2 versus 192.168.0.2). Though the post didn't provide additional info.

  • Finally, I decided to try setting blanking out the variable to see what would happen. Low and behold, when the container restarted and I hit the URL, I didn't even get a login screen, and was sent directly to the dashboard!

So at least as it stands now I can get into the UI, but by leaving it unsecure. It is internal-only at least, but I'd rather have a password on it, so I am asking here for assistance.

I ran pihole -d but nothing obvious jumped out at me. It is uploaded to /5SGQdurO/

Appreciate any input!

This looks like a browser issue.

Did you try to clear the browser cache and try again?
Also, does the same happens accessing from a different device or using a different browser?

Hi, thanks for the quick reply!

So it's possible/likely that solved it. Before seeing your post, I found this: [solved] pi.hole resolves to 127.0.0.1 and added the two mentioned environment variables into my config, and removed the password variable, and this allowed me to login with the dns name.

I tried with the IP and it still would not let me login, but trying in a different browser (Chrome), I was able to get in via IP, and clearing history for the site on my main browser (Firefox) has allowed via IP to work as well.

Thanks so much for that suggestion! Feeling a tad silly I didn't think of such a basic step. Unsure how important those other variables are, but thought I'd mention they are not documented here: Docker - Pi-hole documentation

I doubt that unless five different browsers can have the same issue that I tried facing the same situation. With more than one never having had the chance to cache a single thing from the login page, ie. a totally fresh never attempted login using them. With a password set it does not work here on a total of three different machines with a pihole install on them, blank password and it works fine on all of the machines in all browsers.

Well, the user confirmed this was the issue.

If you aren't able to connect, open a new topic. Please include a debug Token.

Please check our documentation. We have a page explaining the differences between v5 and v6 variables:
Docker - Upgrading from v5.x - Pi-hole documentation