What’s PiHole?

PiHole is self described “A BLACK HOLE FOR INTERNET ADVERTISEMENTS”. In other words a network wide ad blocker.

Why is this an advanced tutorial?

This is an advanced tutorial because you will need to have access to be able to reserve DHCP leases and change DHCP DNS settings on your router.


  1. On your router, locate your UniFiPi and reserve an IP Address. Although you will be setting a static IP later in the tutorial, it’s important to set a DHCP lease so the DHCP server doesn’t allocate your static IP out to another device and cause a network conflict.
  2. Enable SSH on your UniFiPi
  3. Log in via ssh to your UniFiPi (Here is a tutorial from the raspberry pi foundation on how to log in via SSH if you get stuck)
    • ssh pi@unifipi.local
  4. Become root by typing the following:
    • sudo su -
  5. Install Pi-Hole by running the following command, Please note it may take some time and will prompt you for a few things:
    • curl -sSL https://install.pi-hole.net | bash
  6. Set your DHCP DNS addresses to point to your UniFiPi:
  7. Manage Pi-Hole – http://unifipi.local/admin/
    • IMPORTANT: Please note https://unifipi.local will get you to webmin and http://unifipi.local will get you to Pi-Hole (http vs https)
  8. If you want to support UniFiPi make a whitelist exception to allow ads on UniFiPi.com 🙂
Categories: How to

1 Comment

Colin · July 16, 2020 at 10:09 pm

In UnifiPi v1.6 I was experiencing an issue getting Pi-Hole installed due to a certificate error. A change to the unifi repo was also preventing the installation from completing successfully as apt-get update was unable to complete successfully during the install process.

To resolve the repo problem run the command: apt-get update –allow-releaseinfo-change

To resolve the curl certificate issue preventing the command “curl -sSL https://install.pi-hole.net | bash” from working follow the steps in the last comment in the below link:

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.