Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Installing Ubiquiti UniFi Controller in a jail

Installing Ubiquiti UniFi Controller in a jail

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
11,579

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
.40 is of version 5.6, .29 is of 5.9, seems the .29 is the latest according to what I'm seeing...

Unifi.JPG
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
11,579

Ixian

Member
Joined
May 11, 2015
Messages
95
Yep, you all are right, my mistake. And to think for the past month, after I migrated from a docker to a Freenas jail w/Unifi I've been thinking I've been behind a few versions when actually I've been ahead.

In a way no one loses here :)
 

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
Yea, I almost did the same thing on a actual Unifi controller and was like, "Why isn't this updating to .40" then looked closer and realized I wasn't paying close enough attention, DOH! LOL
None the less, thanks all! and I appreciate you putting up with my ignorance!
 

Tremek

Neophyte
Joined
Jan 27, 2017
Messages
4
For what it's worth I have been running the UniFi controller in a jail for nearly a month and no problems, it works well.
 

ThreeDee

Senior Member
Joined
Jun 13, 2013
Messages
366
For what it's worth I have been running the UniFi controller in a jail for nearly a month and no problems, it works well.
same here .. ran into my first kinda of hassle though with my UniFi AP's not upgrading through the controller software and had to use WinSCP and Putty to SSH into each of them and manually update their firmware. Last couple updates upgraded just fine so I don't know what the deal was/is on this latest firmware upgrade.
 

ChrisChros

Member
Joined
Nov 24, 2018
Messages
155
Hi guys,
has anybody of you tried to update the controller to 5.10.12?
When I follow the instruction on the first page I am not able to run the update. I can run the instruction till
Code:
service unifi stop
. When I do the clean reinstall I get the following error:
Code:
root@unifi:/usr/ports/net-mgmt/unifi5 # make reinstall clean
===>  Installing for unifi5-5.9.29_1
===>   Registering installation for unifi5-5.9.29_1
*** Error code 70

Stop.
make[1]: stopped in /usr/ports/net-mgmt/unifi5
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/unifi5
root@unifi:/usr/ports/net-mgmt/unifi5 #


Can anybody help me to fix this issue?

Regards Chris
 

ChrisChros

Member
Joined
Nov 24, 2018
Messages
155
ahh ok...that make sence. sorry for that question.
 

Ixian

Member
Joined
May 11, 2015
Messages
95
Going by past history the Unifi port is usually updated within a few days, particularly for large updates to the stable branch, like this version of Unifi.
 

Dayve

Junior Member
Joined
Nov 24, 2018
Messages
18
Will be nice to see the Unifi update get added to the port. I just installed it in jail on my freeNAS. I was using a Rasberrypi and it was up to date and all my backups are 5.10.17

I'm pretty much stuck until the ports get updated.
 

gt2416

Member
Joined
Feb 4, 2018
Messages
193
Considering unifi has released a ton of updates after .12 maybe the portmasters are waiting for it to finally be stable lol. They made a lot of changes with .12 and turns out there were a lot of problems.
 

ChrisChros

Member
Joined
Nov 24, 2018
Messages
155
Hi guys,
I tried to update my controller to 5.10.19 but it look like it wont work.
I followed the old instruktion with portsnap and so on and the new controller is also found but it stops with an error code during installation.
Code:
root@unifi:/usr/ports/net-mgmt/unifi5 # make reinstall clean
===>   unifi5-5.10.19 depends on file: /usr/local/sbin/pkg - found
=> unifi_sysvinit_all.deb doesn't seem to exist in /usr/ports/distfiles/unifi5-5.10.19.
=> Attempting to fetch http://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
unifi_sysvinit_all.deb                        100% of   77 MB 5758 kBps 00m14s
===> Fetching all distfiles required by unifi5-5.10.19 for building
===>  Extracting for unifi5-5.10.19
=> SHA256 Checksum OK for unifi5-5.10.19/unifi_sysvinit_all.deb.
===>  Patching for unifi5-5.10.19
(cd /usr/ports/net-mgmt/unifi5/work/unifi5-5.10.19/usr/lib/unifi/lib && /bin/ln-f -s /usr/local/share/java/classes/snappy-java.jar snappy-java-*.jar)
/bin/rm -f -r /usr/ports/net-mgmt/unifi5/work/unifi5-5.10.19/usr/lib/unifi/lib/native
===>  Configuring for unifi5-5.10.19
===>  Staging for unifi5-5.10.19
===>   unifi5-5.10.19 depends on package: mongodb36>0 - found
===>   unifi5-5.10.19 depends on package: snappyjava>0 - found
===>   unifi5-5.10.19 depends on file: /usr/local/openjdk8/bin/java - found
===>   Generating temporary packing list
===> Creating groups.
===> Creating users
/bin/mkdir -p /usr/ports/net-mgmt/unifi5/work/stage/usr/local/share/java/unifi
(cd /usr/ports/net-mgmt/unifi5/work/unifi5-5.10.19/usr/lib/unifi && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) &&  /usr/bin/find -Ed $1 $3 \(   -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} +  -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE \* /usr/ports/net-mgmt/unifi5/work/stage/usr/local/share/java/unifi/)
/bin/ln -sf /usr/local/bin/mongod /usr/ports/net-mgmt/unifi5/work/stage/usr/local/share/java/unifi/bin/mongod
/bin/mkdir -p /usr/ports/net-mgmt/unifi5/work/stage//usr/local/share/java/unifi/data
/bin/mkdir -p /usr/ports/net-mgmt/unifi5/work/stage//usr/local/share/java/unifi/logs
/bin/mkdir -p /usr/ports/net-mgmt/unifi5/work/stage//usr/local/share/java/unifi/run
/bin/mkdir -p /usr/ports/net-mgmt/unifi5/work/stage//usr/local/share/java/unifi/work
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Installing for unifi5-5.10.19
===>   Registering installation for unifi5-5.10.19
*** Error code 70

Stop.
make[1]: stopped in /usr/ports/net-mgmt/unifi5
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/unifi5
root@unifi:/usr/ports/net-mgmt/unifi5 # service unifi start
Starting unifi.
root@unifi:/usr/ports/net-mgmt/unifi5 #

Can anybody help me to get it run.
Regards Chris

UPDATE:
Gote it back working with the following command:
Code:
make deinstall reinstall all clean    

It can be so simple.
 
Last edited:

SW77

Junior Member
Joined
Apr 1, 2017
Messages
14
I installed my controller with
Code:
pkg update
pkg install unifi5
sysrc unifi_enable=YES
service unifi start

I see that ports are now updated to 5.10.19 but the package is still on 5.9.29. When I try to update with
Code:
pkg upgrade
it stays on 5.9.29.
Am I missing something or are packages not updated at the same time as ports?

Thanks
 

bernieke

Neophyte
Joined
Feb 17, 2013
Messages
4
By default the jails now follow the quarterly release branch. You could change it to the latest branch, or wait until April for the update to reach the quarterly branch.
 

SW77

Junior Member
Joined
Apr 1, 2017
Messages
14
By default the jails now follow the quarterly release branch. You could change it to the latest branch, or wait until April for the update to reach the quarterly branch.
Already changed that to fetch the latest.
 

gt2416

Member
Joined
Feb 4, 2018
Messages
193
Ports != pkg
Usually pkg are updated few days after ports. The new version is available on pkg right now, so just
pkg upgrade
 

ChrisChros

Member
Joined
Nov 24, 2018
Messages
155
Hi, is there a possibility to edit the config.gateway.json file within the jail?
Background, I want to disable NAT on the Unifi USG, therefore I have to modify this file.
 

UnifiUpdate

Newbie
Joined
Sep 27, 2019
Messages
2
Noob question here, since I don't fully understand ports vs pkg.

I've installed the Unifi via `pkg install unifi5`.
I've also been following https://www.freshports.org/net-mgmt/unifi5 for new updates and there are two newer versions.

I've tried `pkg update` but I don't get an update.
`pkg info unifi5` reports the latest version as `5.10.25` while it should be `5.11.46`.

What am I missing?
Is there a way to get the latest version (`5.11.46`) without building from source?
 
Top