Reply
New Member
Posts: 2
Registered: 3 weeks ago

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

A quick comment on SSH. It does not seem to be supported by Windows 10 any more - use Putty

New Member
Posts: 5
Registered: ‎11-28-2015
Kudos: 1

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Looks great. I would only add that it's easier IMO to update the Unifi controller via the package manager by adding the repository information:

 

https://help.ubnt.com/hc/en-us/articles/220066768-UniFi-How-to-Install-and-Update-via-APT-on-Debian-...

 

I've never had an issue although it seems to be a little behind when a new version is released, not a big deal to me.

New Member
Posts: 30
Registered: ‎05-22-2016
Kudos: 45

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

@SoulCheese wrote:

Looks great. I would only add that it's easier IMO to update the Unifi controller via the package manager by adding the repository information:

 

https://help.ubnt.com/hc/en-us/articles/220066768-UniFi-How-to-Install-and-Update-via-APT-on-Debian-...

 

I've never had an issue although it seems to be a little behind when a new version is released, not a big deal to me.


Yea, the apt-get way is also a great method if you don't really care about getting the newest controller as soon as it launches.
I've had it fail in the past when setting it up with the info on that link (Couldnt reach the controller via webbrowser) though.
I guess most people will try it first via that official UBNT guide, if they can't figure out how to do it or if it fails to properly install, then they can still try this alternative way of installing Smiley Happy

But I mainly use this method because I like to immediately try out a new controller as soon as the blog is posted ^^

New Member
Posts: 30
Registered: ‎05-22-2016
Kudos: 45

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

I've updated the opening post:

• added the apt-get install/update package manager/repo method of installing
• added a link to the MiniTool Partition Wizard for people having issues with the partitions (if you want to start from scratch again).

 


@Torbenan wrote:

A quick comment on SSH. It does not seem to be supported by Windows 10 any more - use Putty


 Still seems to work for me, what version of windows 10 are you on?

New Member
Posts: 34
Registered: ‎11-20-2018
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

I was just trying to do this on a Pi (already running pi-hole) running the default (w/ gui) rapsbian OS. But I got a bunch of errors from the unifi install step that, being new to linux, I have no idea how to resolve:

 

root@raspberrypi:/home/pi/Downloads# sudo dpkg -i unifi_sysvinit_all.deb; sudo apt-get install -f -y
Selecting previously unselected package unifi.
(Reading database ... 133870 files and directories currently installed.)
Preparing to unpack unifi_sysvinit_all.deb ...
Unpacking unifi (5.9.29-11384-1) ...
dpkg: dependency problems prevent configuration of unifi:
unifi depends on mongodb-server (>= 2.4.10) | mongodb-10gen (>= 2.4.14) | mongodb-org-server (>= 2.6.0); however:
Package mongodb-server is not installed.
Package mongodb-10gen is not installed.
Package mongodb-org-server is not installed.
unifi depends on mongodb-server (<< 1:3.6.0) | mongodb-10gen (<< 3.6.0) | mongodb-org-server (<< 3.6.0); however:
Package mongodb-server is not installed.
Package mongodb-10gen is not installed.
Package mongodb-org-server is not installed.
unifi depends on jsvc (>= 1.0.8); however:
Package jsvc is not installed.

dpkg: error processing package unifi (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u6) ...
Errors were encountered while processing:
unifi
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

New Member
Posts: 34
Registered: ‎11-20-2018
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

While trying to apt-get the missing packages, it suggested a command to fix my unmet depencies:

 

root@raspberrypi:/home/pi/Downloads# sudo apt-get -u install mongodb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-server : Depends: mongodb-clients but it is not going to be installed
Depends: libboost-filesystem1.58.0 but it is not going to be installed
Depends: libboost-program-options1.58.0 but it is not going to be installed
Depends: libboost-system1.58.0 but it is not going to be installed
Depends: libboost-thread1.58.0 but it is not going to be installed
Depends: libpcrecpp0v5 (>= 7.7) but it is not going to be installed
Depends: libv8-3.14.5 but it is not going to be installed
unifi : Depends: jsvc (>= 1.0.8) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

 

Running that did a large number of package installs and after that the controller was up and running successfully:

 

root@raspberrypi:/home/pi/Downloads# sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
jsvc libboost-filesystem1.58.0 libboost-program-options1.58.0 libboost-system1.58.0 libboost-thread1.58.0 libcommons-daemon-java libpcap0.8 libpcrecpp0v5
libv8-3.14.5 mongodb-clients mongodb-server
The following NEW packages will be installed:
jsvc libboost-filesystem1.58.0 libboost-program-options1.58.0 libboost-system1.58.0 libboost-thread1.58.0 libcommons-daemon-java libpcap0.8 libpcrecpp0v5
libv8-3.14.5 mongodb-clients mongodb-server
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 34.0 MB of archives.
After this operation, 118 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libboost-system1.58.0 armhf 1.58.0+dfsg-5.1+rpi1+b1 [31.1 kB]
Get:2 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libboost-filesystem1.58.0 armhf 1.58.0+dfsg-5.1+rpi1+b1 [57.4 kB]
Get:3 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libboost-program-options1.58.0 armhf 1.58.0+dfsg-5.1+rpi1+b1 [137 kB]
Get:4 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libboost-thread1.58.0 armhf 1.58.0+dfsg-5.1+rpi1+b1 [63.4 kB]
Get:5 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libpcap0.8 armhf 1.8.1-3 [123 kB]
Get:6 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libpcrecpp0v5 armhf 2:8.39-3 [149 kB]
Get:7 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libv8-3.14.5 armhf 3.14.5.8-11 [1,083 kB]
Get:8 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf mongodb-clients armhf 1:2.4.14-4 [28.8 MB]
Get:9 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf mongodb-server armhf 1:2.4.14-4 [3,466 kB]
Get:10 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf libcommons-daemon-java all 1.0.15-7 [52.4 kB]
Get:11 http://mirror.web-ster.com/raspbian/raspbian stretch/main armhf jsvc armhf 1.0.15-7 [23.1 kB]
Fetched 34.0 MB in 15s (2,253 kB/s)

... bunch of package installs

New Member
Posts: 34
Registered: ‎11-20-2018
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

And 2 minutes later I have my controller migrated from a PC to the Pi following these instructions:

https://help.ubnt.com/hc/en-us/articles/115002869188-UniFi-Migrating-Sites-with-Site-Export-Wizard 

Emerging Member
Posts: 72
Registered: ‎04-26-2014
Kudos: 10
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Hello,

I'm new to the pi world. Just set a couple up for other things and decided to give this a whirl.

Great tutorial! Super easy to follow.

My one question is what is pi-hole for? Is it just to act as a DNS server? If so, is it necessary?

I'm guessing it's needed for something else since it wasn't mentioned as optional but I missed what its purpose is.

If someone could enlighten me I would appreciate it!

New Member
Posts: 2
Registered: 3 weeks ago

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

Pi Hole works as an Add-blocker - for all Phone and Computers and Browser. Adds are not allowed to get into you network at all.

 

Emerging Member
Posts: 72
Registered: ‎04-26-2014
Kudos: 10
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

So it's in no way a necessity, correct?

New Member
Posts: 30
Registered: ‎05-22-2016
Kudos: 45

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

@UniGuy wrote:

So it's in no way a necessity, correct?


Correct. 

You can run the controller or pi-hole on its own without installing the other. It's just a nice combo Smiley Happy

 

Pi-hole is a dns server that will return 0.0.0.0 when a domain in the blacklist is requested. There are several lists with domains that serve up ads that it uses. 

Emerging Member
Posts: 72
Registered: ‎04-26-2014
Kudos: 10
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Excellent. Thank you so much!

That's what I was thinking. I just wanted to make sure since it wasn't mentioned as an optional step. 

New Member
Posts: 1
Registered: 2 weeks ago

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Just wanna jump in and give my praise to this guide as well. Very well made and written; worked like a charm!

I was a little skeptic to whether it would fit on a 2gb card, but I had to give it a go. Needless to say I had redo it with a bigger sd card Man Happy

Thanks!

 

New Member
Posts: 16
Registered: a month ago
Kudos: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

the password raspberry does not autheticate onto the device. any ideas?

New Member
Posts: 22
Registered: ‎01-31-2014
Kudos: 3

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

User : pi

Pass : raspberry

New Member
Posts: 37
Registered: ‎10-14-2016
Kudos: 6
Solutions: 1

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Awesome idea indeed

 

I got it working together with a POE HAT for my pi... 

New Member
Posts: 42
Registered: ‎09-10-2016
Kudos: 9
Solutions: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

BTW, another not quite as elegant but maybe easier alternative to the PI PoE Hat:

https://www.amazon.com/d/Powerline-Network-Adapters/UCTRONICS-802-3af-Splitter-Ethernet-Raspberry/B0...

New Member
Posts: 37
Registered: ‎10-14-2016
Kudos: 6
Solutions: 1

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

the poe hat is basically plug and play the only issue would bethat you need a case to put the assembled device that allows for proper airflow but thats it. no dongle required... one cable 

New Member
Posts: 1
Registered: a week ago
Kudos: 1

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Made an account just to say thank you SmokingCrop. Had a pi3 laying around, wasn't aware of pihole, living the life now.

New Member
Posts: 30
Registered: ‎05-22-2016
Kudos: 45

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

You'll need a newer version for the new 5.10.x 'unstable' controller. The default java version in Raspbian is too old.
You can follow this guide to install the latest version:

https://ribasco.wordpress.com/2018/02/11/how-to-install-the-latest-java-version-in-raspbian-stretch/

Reply