Pi-hole and Ubiquiti Unifi Controller 5 on the same Pi

Install Pi-hole
then follow the instructions on
http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-unifi-controller-5-on-raspberry-pi/2/

At step #4 (page 3), I didn't perform any of the main entry that relates to 'snappy java', rather I opened the 'Oracle 8' entry and followed the 'Oracle 8' instructions

continue on with the installation as listed for the controller and you have Pi-hole with the Unifi controller all on the same pi

I didn't see any load impact with installing the controller with Pi-hole
Load: 0.01 0.05 0.01 (my example load report for a SOHO)

With installing the Unifi controller, it also resolves the 'unifi' domain for my Unifi AP Pro (without that domain, the Unifi AP Pro makes repeated attempts to locate the domain)
https://community.ubnt.com/t5/UniFi-Wireless/Unexpected-Unifi-AP-DNS-Queries/td-p/1591043

edit: to update the controller, enter these commands
sudo apt-get update
sudo apt-get install unifi

and of course updating Pi-hole is easy as
pihole -up

Using pi-hole and unifi controller on same Pi-2 more than 2 months, works perfectly .:+1:

1 Like

Wish I had read this 30 minutes ago :disappointed:
I installed Pi-hole after I installed Unifi; now I can't access the unifi portal anymore.

I managed to find the daily backup file (good thing I enabled that) and then
sudo apt-get install --reinstall unifi

Going to the portal, I was pleasantly surprised to see that I didn't need to restore the backup. Everything was still in place!

Is this really a good idé what happens if you need to put the DNS down for something?
Then your controller also goes down.

What I have done is that I have 3 stand alone Pi's one for DNS1 and one for DNS2 and the other for the controller.

But my network is big so....

And this is also because of the security as my Guest network can access DNS 1 and DNS 2 I don't want to put the controller on this machine as then they can also access the controller if I get a breach in DNS 1 or DNS 2 machines as they are on the same VLAN.

Unifi controller is basically for configuration purposes and statistics - so if the controller goes down it is not an issue.

It's an issue if you have Guest Wifi as the controller are managing that.

Just dropping by to say thanks for this post - I got my Unifi controller running on my PiHole (on an rPi 2 Model B+) thanks to these instructions!

Cheers - thanks for sharing it.