I am running Pi-hole in Synology Docker container. It appears up and running, but I cannot log onto the web UI. I do have a password set in the YAML config:
pihole:
image: pihole/pihole:latest
container_name: pihole-host
cap_add:
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SYS_NICE
- CAP_SYS_TIME
environment:
- PIHOLE_UID=1027
- PIHOLE_GID=100
- TZ=US/Pacific
- FTLCONF_webserver_api_password=notmyrealpassword
- FTLCONF_webserver_port=8000
- DNSMASQ_USER=pihole
volumes:
- /volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d
- /volume1/docker/pihole:/etc/pihole
network_mode: host
labels:
- com.centurylinklabs.watchtower.enable=false
restart: unless-stopped
I wanted to try the sudo pihole setpassword option - but here it comes: I don't know how to ssh into the container
I thought the api_password setting in the config would override, no?
Are you using "special" characters ($
, #
, \
, spaces, etc.) in your password?
Try using single quotes around the password:
- FTLCONF_webserver_api_password='notmyrealpassword'
You don't ssh
directly into the container.
You access the host machine and then you use docker exec
to access the container:
docker exec -it <container_name> pihole setpassword
NOTE: This won't work if you already set the password via environment variable. Pi-hole container makes all options set by env vars as read only.
2 Likes
Thanks for the quick response. I did not have the pw in single quotes - tried that, no luck.
I then tried running the setpassword command and got this error:
[✗] webserver.api.password set by environment variable. Please unset it to use this function
I then commented out the FTLCONF_webserver_api_password line - no luck.
I was then able to run the setpassword command - tried blank and tried a manual password - neither one worked.
This is so weird - it worked a week ago, but then after shutting docker down and back up it doesn't work.
Should the URL be http://192.168.1.101:8000/admin/login - based on my config above?
Hmmm... I missed that.
I remember I saw many recent issues with password and Synology.
You can take a look here:
https://github.com/pi-hole/FTL/issues/2245
Maybe it is related to your issue.
@MortalGeek - What model of Synology are you using?
Are you able to share the docker startup logs?
I am in the same boat too.
running pi-hole on truenas scale. recently updated to version 6.0.
login with password is not working, i tried setting up password again through shell
login only works when i set blank password and any changes to the pihole settings in the UI would require me to run the command again to set blank password.
/ # pihole -v
Core version is v6.0.4 (Latest: v6.0.4)
Web version is v6.0.1 (Latest: v6.0.1)
FTL version is v6.0.2 (Latest: v6.0.2)
pihole setpassword
Thanks
Jag
DS1520+ running DSM 7.2.2u3
I found a workaround for this. I CAN set the password with FTLCONF_webserver_api_password. And I can log on - BUT only after i clear all my cookies - not just the pi-hole cookies - not sure exactly which one does it, but after clear all i can log on one time. after that, if i close browser and open again - back to enter password loop.
OK, thanks - a quick look at the web suggests that you're not on a model affected by the issue we've been seeing.
The FTLCONF_webserver_api_password=notmyrealpassword
variable should be enough here - and it shouldn't be changing at all.
Can you provide two things please?
- A debug token (
docker exec -it <container_name> pihole -d
- choose yes to upload it and share the token here)
- The log output when you start your container. (
docker logs -f <container_name>
should do it)
Edit: Side-note, you've no idea how happy it makes me to see this: