Installing Ubiquiti UniFi Controller in a jail

Installing Ubiquiti UniFi Controller in a jail

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Most people now just 'pkg install unifi5'. It's easier and only takes a minute to do. Installing from Ports is not required any more.
Indeed so.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
@m0nkey_ you might want to change that first command in that update to pkg upgrade as update just updates the database, upgrade updates and applies them with one command. As it's currently written it might confuse new users.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Agreed.
See I looked around online to find the install instructions and I found this thread but ended up with the errors so thought I'd post what did work but you're right.
Would this be the correct update and install order?

freebsd-update fetch
portsnap fetch extract update
pkg update
pkg upgrade
pkg install -y openjdk8
echo "fdesc /dev/fd fdescfs rw 0 0" > /etc/fstab
echo "proc /proc procfs rw 0 0" >> /etc/fstab
setenv BATCH yes
cd /usr/ports/net-mgmt/unifi5/
make install clean
echo 'unifi_enable="YES"' >> /etc/rc.conf
service unifi start
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
The simple instructions are posted 2 posts above yours. It's literally 4 commands to run to install it and get it running.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
no need to do the portsnap fetch update extract or java?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Yes, perfectly, my question WAS it necessary to do the portsnap fetch extract update to do a full update/upgrade of the jail and internal components of that jail.
If you're going to create a jail, setup a machine you might as well install all available updates and patches as well, correct?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Yes, there's a lot I don't know, what about portsnap or is portsnap fetch update extract going to accomplish the same task as pkg upgrade?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974

Ixian

Patron
Joined
May 11, 2015
Messages
218
Yes, there's a lot I don't know, what about portsnap or is portsnap fetch update extract going to accomplish the same task as pkg upgrade?

A package is a prebuilt port with default configs (or tweaked, depending on the package). You don't need to deal with the port if you are installing the package, generally speaking.

Depending on what the port is, there may be <reasons> to install and configure it yourself vs. the pkg but for Unifi5 it's not necessary, all compiling from the port will get you is a bunch of extra installation steps you could easily trip up on if you don't know what you are doing, which you've indicated is the case.

Just install the pkg for Unifi5. It works fine, I use it. Like many ports/pkg's it's a bit behind (currently 5.9.29, GA is 5.9.40 I believe) but that isn't the fault of the package, that's the version of the port too.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
ahh, got ya.
I think I understand a bit better now. Thanks for the explanation.
Now the question is how can we get the software current?
How long is it going to take the package manager to push out the update?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
How long is it going to take the package manager to push out the update?
As long as it takes. For a popular software package, that usually isn't very long (and 5.9.29 is in fact the current release version of the Unifi controller). For a not-so-popular package, it may take longer. If you have a pathological need to be right up to the minute, as it seems lots of people do with Plex, you might get frustrated.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Granted I can be a bit pathological at times, I think for the sake of time and sanity I can wait on a Unifi update unless it's months out, then I may end up finding a way to do a manual upgrade.
But you are correct, 5.9.29 is the current release. I'm happy it works and is up to date. I guess if I wanted a simpler setup I should probably pay for the controller.
Still, I do thank you all for answering my seemingly stupid questions. If I don't ask I can't learn.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
I'm happy it works and is up to date.
...and now that jails are using iocage, you should be able to keep it up to date without problems. The FreeBSD pkg will probably lag a bit--it might take a week or so for an update to get rolled out there--but it will still be generally current.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
.29 is the most current version of the FreeBSD port. The actual Unifi software version, available via Docker, etc. is past .40. FYI.
 
Top