Ubiquity Unifi controller on FreeBSD

A year or so ago, I got fed up with my TP-LINK router/AP. It had been running for 3+ years, solely as an AP. But it would stop allowing wireless client associations after a while and needed a cold reboot to solve it. So I replaced it with an Ubiquity AP. Or the TP-LINK gave me an excuse to replace it!

It's a great AP, sits in a cupboard and gives good reliable dual-band coverage throughout the house. The controller software for administering it runs on an available machine - Windows, Linux or MAC. For ease of use, I installed the MAC version and got it going. But having it running on my laptop wasn't ideal. And now I want to drag data out of it regularly, which clearly can not happen if the laptop running the controller is off, powersaving or many miles away. I don't have a suitable linux machine of VM available but ... could it be installed on FreeBSD-based FreeNAS? Afterall, it's a Java app....

After some google searching, it seemed it others had tried it. I found page listing how, accidentally closed the page and then found it was now giving 500 errors....
The better still, someone has written a script to just download-and-run - much like Mail-In-a-Box (https://mailinabox.email/). So, created a jail on my FreeNAS machine. Configured ssh and switched to accessing via that (instead of the webconsole) and run the script... amazing!

Instructions are here: https://github.com/TechButton/unifi-controller-freebsd-freenas

and to change the port from 8443 to 443:
/usr/local/UniFi/data/system.properties