Install PiHole on HifiBerry

Hi, this is just my feedback about installing pihole on hifiberry.

I think that it could interest some of you because it is simple and it works well.

For those who don't know PiHole it is a local DNS server which allow to filter ads. Very conveniant because even on your smartphone ads will be filtered. For more information go on the official website.


Thanks to docker and the official documentation, it is pretty simple to add functionalities on HifiBerry-OS :


mkdir -p /data/docker/pihole/config

nano /data/docker/pihole/docker-compose.yaml


Insert this in the created file (change the password !) :

(I didn't change too much the content of the official file, just added "" for each ports mapping as described in this forum post and mapped the web interface to port 8080 to avoird conflict with HifiBerry interface)

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
container_name: pihole
image: pihole/pihole:latest
- ""
- ""
# - "" # Only required if you are using Pi-hole as your DHCP server
- ""
TZ: 'America/Chicago'
WEBPASSWORD: 'Mypassword' #'set a secure password here or it will be random'
# Volumes store your data between container upgrades
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
- NET_ADMIN # Recommended but not required (DHCP needs NET_ADMIN)
restart: unless-stopped


docker-compose up -d


Then access to your PiHole with this url : 




(don't forget the /admin/ at the end ;-) )

Use the Pi-hole web UI to change the DNS settings Interface listening behavior to "Permit all origins", if using Docker's default bridge network setting.

Hope you'll find it useful ;)



Please sign in to leave a comment.