Pi-Hole on Raspberry Pi all models using Docker

Published by Harish Kumar on

In this segment we are going to show you how to “Install Pi-Hole on Raspberry Pi B Plus with the help of Docker

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.
Pi-hole has the ability to block traditional website adverts as well as adverts in unconventional places, such as smart TVs and mobile operating system adverts.

    Equipment Equipment Required :
Equipment Raspberry Pi
Equipment Micro SD Card 8 GB
Equipment Power Supply
Equipment Ethernet Cord for LAN Connection
Equipment External Hard Drive or USB Drive
    Equipment Optional :
Equipment Raspberry Pi Case
Equipment Keyboard
Equipment Mouse

Raspbian OS Installation

Download Raspbian OS from Official Website : raspberrypi.org
Then write the image to the SD Card using : Etcher


Now, Boot the Raspberry Pi with this SD Card, Follow the On-Screen Instructions and then open Terminal.

Pull Pi-Hole Docker Image

 docker pull pihole/pihole

 Run Pi-Hole Docker Image

 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 \
    -e \
    --restart=unless-stopped \

 Access Pi-Hole Web Interface


 To get random Password

docker logs pihole 2 /dev/null | 'grep password:'

 Reset Pi-Hole Password

docker exec -it pihole pihole -a -p

Now, You are ready 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. 

Smile (“_”)

Harish Kumar

As a founder of the PcMac YouTube channel and website, Our goal is to provide Free Technical help to people and spread knowledge to everyone.


Leave a Reply

Your email address will not be published. Required fields are marked *