Changing password of Pi-Hole in a Docker instance

Since a random password is automatically set during install in Docker, it is necessary to change this password later, in order to be able to access the admin-panel. You can use this line:

docker exec -it pihole_container_name pihole -a -p

Then change the password and you can login.

For more info on Pi-Hole in Docker, see: