0

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 "0.0.0.0:" 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/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "0.0.0.0:53:53/tcp"
- "0.0.0.0:53:53/udp"
# - "0.0.0.0:67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "0.0.0.0:8080:80/tcp"
environment:
TZ: 'America/Chicago'
WEBPASSWORD: 'Mypassword' #'set a secure password here or it will be random'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- 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 : 

http://You_HifiBerry_IP:8080/admin/

or

http://hifiberry.local:8080/admin/

(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 ;)

 

0 comments

Please sign in to leave a comment.