How to install Ubiquiti mFi and/or UniFi software in a FreeNAS jail

Status
Not open for further replies.

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
Boooo to Ubiquiti on this one. Now it is on a Winblows VM in VirtualBox. Nothing like tying up extra resources.
 

snaptec

Guru
Joined
Nov 30, 2015
Messages
502
Why the hell a win vm for that?
I have the Controller running on ubuntu and macos without Problems.


Gesendet von iPhone mit Tapatalk
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
Tried a Debian VM, it crashed on me. So, I used a Windows VM that already is running. Regardless, VBox running a VM seems like more overhead than is really necessary compared to a simple BSD jail.

Ubiquiti is a bad, bad company for being like this...
 

Borja Marcos

Contributor
Joined
Nov 24, 2014
Messages
125
The ports for Unifi4 and 5 (4.8.20_1 and 5.2.9) have just been updated. It's a simple matter to install them in a jail, a friend tried the other day. And meanwhile I am tracking the betas and stable versions for my home networks, and manual installs work perfectly.

mFi is tricky: it relies on an old version of Mongodb due to API incompatibilities between branches. I have it running on FreeBSD 11 but using Mongodb version 2.4.10. Other than that no major issues.

The advantage of a jail is much less bloat. You don't have to keep two kernels competing for resources.
 

Borja Marcos

Contributor
Joined
Nov 24, 2014
Messages
125
For example, I wasn't successful getting the recent 5.2.7 running in my current jail but it did work in the Debian VM. Just a thought for anyone having difficulty with a traditional Jail.
What did you try? It should work with minimal tinkering.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Yeah, I can confirm, I just installed Unifi 5 straight money from the ports tree. Of course, there were like 2 hours of dependencies to be compiled, and ten million warning messages. But, it sure as hell worked, out of the box, with no special voodoo needed.
 

Borja Marcos

Contributor
Joined
Nov 24, 2014
Messages
125
Ubiquiti is a bad, bad company for being like this...

I'm going to play the devil's advocate here, but there are much worse!

So far they are providing what they call a "homebrew" version for unsupported Unix systems, which is great. I hope they will keep doing it!
 

travanx

Explorer
Joined
Jul 1, 2014
Messages
62
Does post #49 work to upgrade to 5.2.9?
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
I'm going to play the devil's advocate here, but there are much worse!

So far they are providing what they call a "homebrew" version for unsupported Unix systems, which is great. I hope they will keep doing it!
Yeah, I know :)

They make great schtuff. Now I just fire UniFi on a Winblows VM that runs a few other silly things and call it a day.

Viva Ubiquiti!!

Now if I can just figure out how to get my PowerBeam radios to connect with a 30MHz channel!!
 

HardDrv00

Dabbler
Joined
Dec 2, 2016
Messages
13
Here are my notes for UniFi 5.3.8 in a FreeNAS-9.10.1-U4 standard jail (FreeBSD 10.3). Previously I ran UniFi 4.8.15 and 5.2.9 in the same manner. I can't recall if I tried an upgrade in place for 5.2.9, for 5.3.8 I created a new jail and restored the UniFi backup.

Some of the steps are from the OP #1 and www.digitalocean.com...How To Install MongoDB on FreeBSD 10.1.

- Create standard jail, autostart=chk vimage=chk, NAT=unchk
- ssh into jail

Code:
pkg lock pkg-1.4.12
pkg install py27-setuptools27 devel/libexecinfo devel/pcre archivers/snappy devel/boost-libs scons v8 R-cran-DBI nano sudo wget tmux openjdk-jre

sudo pkg update -f
sudo pkg install mongodb

nano /etc/rc.conf
		mongod_enable="YES"

pkg lock mongodb-2.6.12
pkg unlock pkg-1.4.12
pkg update && pkg upgrade
sysrc mongod_enable="YES"


** restart jail, ssh back **

Code:
service mongod status
cd /
wget http://dl.ubnt.com/unifi/5.3.8/UniFi.unix.zip

unzip UniFi.unix.zip
ln -s /usr/local/bin/mongod /UniFi/bin/mongod

sysrc local_enable="YES"
echo /usr/local/bin/tmux new-session -d "/usr/local/bin/java -jar /UniFi/lib/ace.jar start" > /etc/rc.local
chmod +x /etc/rc.local

wget http://pkg.freebsd.org/freebsd:10:x86:64/release_1/All/snappyjava-1.0.4.1_1.txz
tar vfx snappyjava-1.0.4.1_1.txz
cp ./usr/local/share/java/classes/snappy-java.jar /UniFi/lib/snappy-java-1.0.5.jar


- the end
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
So is this reliable enough to run in a Jail, wondering if anyone has experienced any issues with functionality or problems in general. Just got a Unifi AP and debating whether to install in a jail or just use an Odroid C2 that I already have.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
So is this reliable enough to run in a Jail, wondering if anyone has experienced any issues with functionality or problems in general. Just got a Unifi AP and debating whether to install in a jail or just use an Odroid C2 that I already have.
Works fine for me. I made a fresh jail, and simply installed unifi from ports. Didn't have to do anything special, and it works awesome now for several months.
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
I just tried to install 5.4.9 from ports earlier today and it wasn't found. All the links seemed dead.
 

HardDrv00

Dabbler
Joined
Dec 2, 2016
Messages
13
So is this reliable enough to run in a Jail, wondering if anyone has experienced any issues with functionality or problems in general. Just got a Unifi AP and debating whether to install in a jail or just use an Odroid C2 that I already have.

After the initial setup, no issues with the UniFi (software) controller. I have one UAP-AC-PRO, no domain defined, two wlans. I had the guest portal enabled for awhile which requires a running controller but disabled it since it didn't add anything for my needs.

I just tried to install 5.4.9 from ports earlier today and it wasn't found. All the links seemed dead.
I haven't been successful with the ports install as discussed in this other thread,
Little over my head. Hoping to get Unifi Controller installed in FreeNAS. I installed mine with the steps in #77
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
After the initial setup, no issues with the UniFi (software) controller. I have one UAP-AC-PRO, no domain defined, two wlans. I had the guest portal enabled for awhile which requires a running controller but disabled it since it didn't add anything for my needs.


I haven't been successful with the ports install as discussed in this other thread,
Little over my head. Hoping to get Unifi Controller installed in FreeNAS. I installed mine with the steps in #77
Wierd I just went on Ubiquiti website and I can't even find 5.4.9 for any platform, all I see is 5.3.11. Anyone else notice this or is it just me.
 

HardDrv00

Dabbler
Joined
Dec 2, 2016
Messages
13

HardDrv00

Dabbler
Joined
Dec 2, 2016
Messages
13
It was there yesterday because I downloaded it for a Windows system to test out the AP.
Not to keep adding posts about Ubiquiti software... at the bottom of UniFi 5.4.9 Stable has been released announcement:
Download:
  • Download links pulled
  • RADIUS profiles may not properly migrate at the time of upgrade to 5.4.x. This will cause your previously encrypted SSID(s) to come up as open. We've pulled releases until both controller and firmware are fixed.
Earlier versions in the 5.x.x train are not available in the ports tree so portdowngrade is not an option. Otherwise I've read you can edit the Makefile and distinfo in the port for an older version. Unless you need the latest version just install an earlier revision with packages.
 
Status
Not open for further replies.
Top