What is Pi-Hole?
Pi-hole is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole (and optionally a DHCP server), intended for use on a private network. It is designed for use on embedded devices with network capability, such as the Raspberry Pi, but it can be used on other machines running Linux and cloud implementations.
Software Required :
|Raspberry Pi 4||Case|
|SD Card||Raspberry Pi Keyboard|
Raspbian OS Installation
Now, Boot the Raspberry Pi with this SD Card, Follow the On-Screen Instructions and then open Terminal.
Docker installation guide on Raspberry Pi
Pull Pi-Hole Docker Image
- To pull the latest Pi-Hole docker image, we need to open Terminal and type the below-given command.
docker pull pihole/pihole
Run Pi-Hole Docker Image
- Now we need to use the below-given command to run the docker container.
- You have to set the path for docker folders in this command to successfully configure Pi-Hole.
docker run -d \ --name pihole \ -p 53:53/tcp \ -p 53:53/udp \ -p 67:67/udp \ -p 80:80 \ -p 443:443 \ -e PUID=1000 -e PGID=1000 \ -e TZ=Asia/Kolkata \ -v /mnt/pihole/pihole/:/etc/pihole/ \ -v /mnt/pihole/dnsmasq.d/:/etc/dnsmasq.d/ \ -e 127.0.0.1 \ -e 126.96.36.199 \ --restart=unless-stopped \ pihole/pihole:latest
Access Pi-Hole Web Interface
- To access the Pi-Hole web interface, we need to use the HTTP://RaspberryPi_IP_Address/admin or just type HTTP://localhost/admin.
To get random Password
docker logs pihole 2 /dev/null | 'grep password:'
Reset Pi-Hole Password
docker exec -it pihole pihole -a -p
- You are all set to use Pi-Hole on your Raspberry Pi with Docker.
- If you come across any issues or have some feedback related to this tutorial, Please share your thoughts.
Did you find us helpful?
|Subscribe our YouTube Channel|
|Support us on Patreon|
|Like us on Facebook|
|Share This Article with others|