Pi-hole Portainer Setup on Raspberry Pi

How to simple install Pi-hole as Docker Container via Portainer on an Raspberry Pi

We did the Portainer Setup in one of the last Posts on an Raspberry Pi, so it’s Time to setup some more Container. This Post is about how to Install the Pi-hole Image with Portainer and a basic Pi-hole Setup.

Requirements

Naming Scheme

Before we begin – We use “pihole” as our Naming Scheme here – If you want another name (especially for your hostname), I recommend to use your custom name also for the Volume to keep things clear.

Pi-hole Provisioning

Login to Portainer first.

Advertisements

Volumes

Go to Menu “Volumes”, press “+ Add volume” and name it “pihole” with default Setting. Click on “Create the Volume”.

Containers

Go to Menu “Containers” – Click on “Add container” and do the following Configuration:

  • Container Name: pihole
  • Image Registry: DockerHub
  • Image: pihole/pihole:latest

At “Manual network port publishing”: Click on “+ publish a new network port” and add these Ports:

Host PortContainer PortProtocol
5353TCP
5353UDP
6767UDP
8080TCP
443443TCP

Setup “Advanced container settings” – We start with “Volumes” – Click on “+ map additional volume”

containervolumeHint
/etc/piholepihole – localThe Volume we created before

Still in “Advanced container settings” – Continue with Tab “Network”

  • Network: Host
  • Hostname: pihole

Env

NameValueHint
TZEurope/BerlinYour Timezone
WEBPASSWORDpiholeLogin Password to pihole Web UI

Last “Advanced container setting” – Finalize with “Restart policy”: Always if you want Pi-hole started automatically.

Deploy Container

Please be patient – the Deployment may take a while. After the Deployment – Portainer will switch into the Container list View and displays the starting Container. If everything was gone right, it should be displayed as healthy:

Pi-hole Configuration

You should now be able to continue the Configuration from the Web UI. Open the hosts IP followed by /admin to login into Pi-hole:

http://your_portainer_host_ip/admin

If you configured your Environment Variables as described here, the login Password is “pihole” or the Password you decided by your own. You can now configure Pi-hole depending on your needs.

To use Pi-hole on one or more Clients, change the DNS-Server to point to your Pi-hole Installation. If you want to automatically use Pi-hole on all Clients, change the DNS Setting in your DHCP-Server to Point to Pi-hole.

*Amazon Affiliate Link