Pihole:command not found

Hi there. I've already read all the other posts with similar issue but I think my problem is a bit different.

  • Installed Pi-hole on container using Portainer (I don't know how to show you the docker-compose.yml file because I don't know if it even exists afer insalling through Portainer).
  • Pihole is working like a charm since last couple of months. I do access the GUI, I already updated Gravity database and it's blocking currently 19.8% of requests, so all is working fine.
  • I still can't use pihole command.

Any ideas?

How did you try to use pihole command?

When you install Pi-hole in a container, this command only exists inside the container.

You can access the container using 2 methods:

  1. Using docker exec command:
    On the command line of your host machine, run this command to access the container:

    docker exec -it <name_of_your_container> bash 
    

    You will be able to run pihole commands.

  2. Using Portainer console:
    In Portainer, find your container and click on the console icon (>_).
    Then you will be able to run pihole commands.

Note:

Some options (like pihole -up and pihole -r) are not available when you run Pi-hole in a container.

That was it. Thank you so much :pray:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.