docker+pihole installed, but unable to access dashboard

pihole running in docker, but unable to access dashboard, or use pihole commands.

Fresh install of Ubuntu and Docker engine running on x86. 'sudo docker ps' shows that the pihole container is running with a status of healthy, but no ip or ports listed. Anytime I try to run a pihole command, such as pihole -d to get my debug token, the response I get is "Command 'pihole' not found"

Attempting to access the dashboard also fails: I've tried: https://pi.hole, http://192.168.0.111/admin, http://192.168.0.111:53/admin, https://192.168.0.111/admin, and a few other variations on this address in a browser, but they all return connection timed out or this address is restricted. What am I missing here? Is there some other install step I skipped? The install command listed in expected behavior below is how I got pihole installed in the first place. I also tried to run the docker compose commands found here Docker - Pi-hole documentation , but got a lot of command not found returns. Why is the pihole container listed, but the program doesn't seem to actually be installed?

Expected Behaviour:

  • Ubuntu 26.04.1
  • x86_64
  • docker run --name pihole -p 53:53/tcp -p 53:53/udp -p 80:80/tcp -p 443:443/tcp -e TZ=Europe/London -e FTLCONF_webserver_api_password="correct horse battery staple" -e FTLCONF_dns_listeningMode=all -v ./etc-pihole:/etc/pihole -v ./etc-dnsmasq.d:/etc/dnsmasq.d --cap-add NET_ADMIN --restart unless-stopped pihole/pihole:latest
  • Docker version 29.7.2

Actual Behaviour:

Replace this text with what is actually happening

Debug Token:

Replace this text with the debug token provided from running pihole -d

Your attempts only shows that the URLs you tried are not accessible, but there is no indication that Pi-hole container is not running (on the other hand, the missing ports are actually strange).

Please try to generate a debug log again (docker exec -it pihole pihole -d).

If the command succeeds, wait until the debug log is finished and answer Y to upload the log. Then, post here only the debug token.

If the command fails or generate errors, please post the complete output.

I installed mine using portainer, and I think I "had to" configure additional ports. I just needed 8080:80 so there'd be no conflicts if i decided to add something later, but perhaps you have to explicitly expose specific ports?

Disclaimer: My Pihole doesn't work so idk if it'll be any help, BUT i'm at least able to access the dashboard with :8080/admin just fine.

I ended up doing another fresh OS install, then installing and running docker (managing my docker containers with portainer) then following this guide here to the letter: Running Pi-Hole as a Docker Container - Pi My Life Up And that worked. Ads are being blocked as intended.

Now the only trouble is that my other network devices can no longer see my NAS, but that's another topic