
Ubiquiti Networks UniFi Controller in an Ubuntu LXD Machine Container - kungfudoi
http://blog.dustinkirkland.com/2016/12/unifi-controller-in-lxd.html
======
totalthrowsj
You can combine an EdgeRouter lite plus a 5GHz UniFi AP for a good BBC +
Netflix streaming box. The EdgeRouter has an IPsec VPN offload
[https://community.ubnt.com/t5/EdgeMAX/ERL-Performance-
Testin...](https://community.ubnt.com/t5/EdgeMAX/ERL-Performance-Testing-with-
IPSec-VPN/td-p/1050229) which I use with BlackVPN's "TV subscription" so my
parents can watch HQ BBC shows.

EdgeRouter firewall you can write a small script so whenever the BBC app is
running it and the Chromecast2 are automatically rerouted to the UK VPN, while
everything else is sent over their regular provider like Netflix. This guy
also wrote a php app that manually does this
[https://github.com/TravisCook/Detour](https://github.com/TravisCook/Detour)
though it's easier just to have a go app running automatically reroute the
requests.

The one issue I had with it was Chromecast2 not initially connecting to the
5GHz network, which is solved by creating a 2.4GHz network, setting it up,
disabling that network and then creating a new 5GHz one with the exact same
SSID which the Chromecast2 will automatically connect to. The UnFi AP is so
powerful covering the entire apt building with a good signal I thought about
setting up the guest network and dropping a card charger on there to charge
unlimited WiFi Netflix and BBC access for $5/month to the neighbors as the
building has a fibre ISP w/'unlimited' bandwidth.

~~~
jimmcslim
Unfortunately your BBC access is likely to be cut off soon as I think the Beeb
will be restricting iPlayer access to validated TV license holders only.

~~~
chakalakasp
The Great British Bakeoff ended just in time, it would seem.

------
ericcholis
To clarify for anyone unfamiliar with UniFi from Ubiquiti.

The controller is the GUI that allows you to adopt new UniFi devices and
manage the network devices. It's cross-platform via Java. It doesn't have to
run continually, as the devices themselves hold the settings. However,
continual logging does require the controller to run.

While the switches, Security Gateway and WiFi access points are managed; none
of them actually have their own GUI. The can, however, all be accessed via
SSH.

The Cloud Key is a POE dongle that runs the Controller software. Nice out-of-
the box, plug and play option.

~~~
pbnjay
In addition to logging, I believe if you want hassle free roaming handoff
between wifi APs you also need it running. It's been a while since I played
with it since my setup is so rock-solid now (compared to when I had linksys
gear...)

~~~
rufugee
Wow...so do these APs actually hand off client based on proximity/signal
strength? I'm running a home-grown network with four openwrt routers running
the same SSID, but client stickiness is my biggest problem. I've always been
told this was something you can't get around...that AP selection is left up to
the client. However, clients do weird things...like a FireTV stick selecting
an AP 100 ft away instead of the one sitting around 10 ft away. If Ubiquiti's
solution solves this, I might seriously consider getting a set.

As an additional question assuming the above is true...can you bind different
SSIDs to different VLANs? This is really the best value openwrt provides to me
atm.

~~~
shermozle
Yes. It works beautifully and they're very reasonably priced. Couldn't
recommend more highly. I have 3 built into my house.

~~~
NegativeLatency
Yeah GPL violations aside they make good stuff

~~~
Steltek
I was not aware of this! I take it this hasn't changed in 2 years, has it.

I was looking to buy Ubiquiti gear to get away from failure-prone consumer
all-in-one routers but not anymore. If they're sticking to this, it sincerely
changes my plans as I can't support a company that so brazenly violates FLOSS
licenses.

------
dawnerd
Running their controller in a container was the best move I made on my
network. I went this route though:
[https://hub.docker.com/r/linuxserver/unifi/](https://hub.docker.com/r/linuxserver/unifi/)

Already had an unraid box running so it was trivial to toss that docker image
on it with all the others.

~~~
creeble
Quick q: My understanding is that the unifi controller doesn't actually
control anything actively, it just serves as UI to the APs. When my controller
box goes down, I don't seem to notice any service difference with my 3 APs.

Is that true?

~~~
nikcub
It doesn't need to be running unless you have guest portal.

I recently moved my internal network to containers - forgot to move the
controller and didn't even notice until weeks later.

------
nicolas314
The Unifi controller is largely overkill when you just have one AP to manage.
Booting up 200 megs of Java software on a desktop to just tweak a few bits
quickly became old. Re-flashed my Unifi AC Lite with LEDE and configured it
through Luci. I can happily forget about Unifi controller and maintaining a
live Java stack on a desktop.

~~~
L_Rahman
Is there a particular reason you were running the controller regularly with
just one AP?

I used the controller once to setup my AP and haven't touched it since.

~~~
dawnerd
You can also use their mobile app for just one AP. You scan the little qr code
and setup goes from there.

------
chrissnell
Does anybody know if it's possible to pull a running configuration from a
working AP back to a fresh Controller install?

I configured the APs here at the house with a laptop running UniFi that has
since been decommissioned. Now that I've installed UniFi on the new laptop, it
seems I have to re-adopt the APs to the new controller and start from scratch
with their configuration. This is a huge pain. Is there any way around this?

~~~
creeble
Ug, old thread now, but I've got the same problem.

Is the ssh password the same as the old UniFi password I wonder? I guess I'll
try that.

~~~
graton
Yes, same username and password as whatever is used to login to the controller
software. At least it is for me. I only have one user setup for the Unifi
Controller.

------
praseodym
Just this weekend I created a Docker image to run the UniFi Controller on my
Raspberry Pi. Works like a charm: [https://github.com/praseodym/docker-unifi-
armhf](https://github.com/praseodym/docker-unifi-armhf)

~~~
j_s
Which Pi do you use? Not sure what's needed to get decent Java performance...

~~~
praseodym
I'm using a Raspberry Pi 2 Model B with Java set to use a maximum 512MB heap
(-Xmx512M). The controller is fast enough for my (rather small) home network.

------
rb2k_
Along the same route: I run the UniFi Controller using the linuxserver.io
docker container:
[https://hub.docker.com/r/linuxserver/unifi/](https://hub.docker.com/r/linuxserver/unifi/)

2 commands to get it up and running in a semi isolated environment.

~~~
sofaofthedamned
Linuxserver do some superb containers, including that one, they deserve a lot
of thanks.

From memory I use three of theirs at least (Unifi, NZBGet & Sonarr)

------
zippergz
I ran the controller on my own machines, for a while in AWS and for a while in
my closet, for a few years. It's fine. But I've been happier since I switched
to the Cloud Key. The functionality is the same, but I find the maintenance
(upgrades, etc.) a fair bit easier, and it gives me more freedom in choosing
to run or not run the servers and instances that I had the controller software
on (I do like having the controller running all the time). I guarantee that
I've spent more than $80 worth of my time maintaining the Linux system and
controller running on it over the years. With the Cloud Key, I've never had to
mess around more than clicking the "upgrade" button.

~~~
fpgaminer
Yeah, I brought up a UAP-AC-Pro+ERLite3 network both at my office and my home.
The first time I did that setup I spent maybe an hour learning about the
ERLite3 and configuring it, and then proceeded to spin my wheels for two hours
trying to get the UniFi Controller working under Linux. I just gave up and ran
it on a Windows machine. The second time I brought the EdgeRouter online in 5
minutes, and then proceeded to spend another two hours of my life trying to
get the UniFi Controller running in a container using a pre-built Docker
image. No go. By the end it would see the AP and begin configuration, but then
lose it halfway through. Had to use it on my Windows VM instead, where it
worked first try.

This Ubiquity based setup has been the most stable network I've had at my home
in all my years, even when used in RF-crowded environments. But the UniFi
Controller is the biggest downside for someone like me who just wants to throw
up a network.

~~~
hedora
I was also bummed about having to install the controller, so I double checked
apple's app store. There's an official, but defeatured app that was still
overkill for my home network. I think bootstrapping only worked because I was
replacing an existing access point, and had IP access to the ubiquiti via
etherenet through the old one, but I didn't rtfm, and connecting via wifi to a
non-setup access point seems like an obvious feature to include. Zero issues
connecting to the access point directly now that it is setup.

------
mbrock
If you're interested in WiFi access points beyond the consumer level but still
affordable, check out Mikrotik. It's a Latvian company that makes really cool
stuff. Their cheapest dual band ac access point is around $40, very small and
nicely designed, PoE in and out, and works together with their ecosystem of
access points and routers. They are almost endlessly customizable through ssh,
a web interface, or a Win32 program (supported on Wine).

I only got my first Mikrotik a few days ago but I love it so far. Haven't yet
actually connected it to another one so I can't really comment on using
several access points.

~~~
graton
One issue for me is that they didn't seem to have any "nice looking" access
points. I like the Unifi ones as they look pretty nice mounted on the ceiling.
I took another glance at the Mikrotik site and I see they have an 802.11b/g/n
ceiling mount access point, and I wanted 802.11ac. I have a Mikrotik switch
that I am very happy with though.

~~~
daurnimator
What about the wap-ac?
[https://routerboard.com/RBwAPG-5HacT2HnD](https://routerboard.com/RBwAPG-5HacT2HnD)

~~~
graton
Thanks. Not bad, but I don't think I want to have that on the ceiling in my
living room.

------
myrandomcomment
The cloud key is $79 that they sell. It is the simplest solution by far.

~~~
myrandomcomment
For more colour, I have 4x AP Pro and 2 X POE switch and their gateway. The
key was just logical as it can be plugged into the POE port and done.

I have tried to remove having servers running at home as I am working to cut
down on the power bill. I have the Intel Compute Stick on the 3 TVs that run
Windows 10 and Kodi (I am to lazy to figure out how to get Linux on the
stick). They sleep when not in use (well one does, have not figured the other
2 out - you would think they would behave the same). The only thing I have
running all the time is my FreeNAS system and a Minecraft server (friends and
family). I am thinking about replacing the Minecraft server with a compute
stick also. It is currently an old dual code PC with 4GB of RAM. I am sure
that the power draw it stupidly high.

------
mbesto
I have a Raspberry pi that controls my Unifi Controller. Works great and here
is the script to set it up:

[http://www.lowefamily.com.au/2016/06/02/installing-
ubiquiti-...](http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-
unifi-controller-5-on-raspberry-pi/)

------
mrbill
FYI, there's also an iOS/Android app that you can use for one-off simple setup
of their APs now. I used it when setting up my UAP-AC-LR.

Years ago, I got fed up with the Java-based controller as well, and reflashed
my UAP-LR at the time with plain OpenWRT so it was all self-contained. Still
one of the best APs I've ever used.

------
jimmcslim
Also see [1] for a techie field report on Ubiquiti in the home.

[1] [https://www.troyhunt.com/ubiquiti-all-the-things-how-i-
final...](https://www.troyhunt.com/ubiquiti-all-the-things-how-i-finally-
fixed-my-dodgy-wifi/)

