How do I set or reset the Web interface Password?

The Web interface password needs to be reset via the command line on your Pi-hole. This can be done locally or over SSH. You will use the pihole command to do this:

pihole -a -p

You will be prompted for the new password. If you enter an empty password, the password requirement will be removed from the web interface.


Are there restrictions regarding the length or characters of the new password?

1 Like

Not that I know of off the top of my head.


How is this acceptable, in 1 line of command, no security check of any sort, an administrative privilege is altered!?

There is an indirect authentication: Before you can execute that command you need to log in (e.g. via SSH) into the command line of the Raspi/operating system.


There is direct authentication. You need sudo privs to do it.


pihole -a -p worked like a charm no sudo needed.

The user you are operating under has sudo by default.

Edit: Either pihole -a -p asked for your password for sudo or you previously used sudo and were still in the authorization period. (Or you're using raspbian and pi user is set to passwordless sudo which is a bad practice but that's raspbian's decision.)

A post was split to a new topic: Storing web admin password in MacOS Safari

You should add this to the interface

1 Like

Yeah, this really needs to be in the interface.

Changing the password via the web interface is possible in the currently running v6.0 beta of Pi-hole, check out Pi-hole V6 Beta Testing – Pi-hole

In Pi-hole v6.0 you can:

  • Set the password (if none is set)
  • Change the password (if set and you know the current one)
  • Remove the password (if set and you know the current one)

What you cannot do is:

  • Reset the password when one is set and you don't know it
    This isn't possible for quite obvious reasons... you will have to use the CLI (over SSH) to reset it in this case

A post was split to a new topic: Unable to reset web interface password