Unifi controller installer

Suggestions for features and software you would like to see in DietPi, goes here.
sfishe
Posts: 8
Joined: Wed Jul 25, 2018 9:02 am

Re: Unifi controller installer

Post by sfishe »

I can get it running now on latest DietPi with XU4, by using the mongodb binaries here: https://andyfelong.com/2017/03/mongodb- ... erry-pi-3/

The problem is that the unifi controller packages have mongodb as a dependency, so installing them fails when using the binaries (as it can't find a proper package installation I guess).

I first tried using

Code: Select all

dpkg --ignore-depends=bar -i foo_1.2.3_amd64.deb
...to ignore the mongodb-server dependency, which works fine, but breaks the package system, and so every time you do apt-upgrade it fails trying to find the dependency.

I then manually removed the dependency from the latest unifi package, instructions here: https://serverfault.com/questions/25022 ... pendencies

This fixes package dependency issues but I guess I'm going to have to manually edit the new package every time a new version is released.

I'm a linux newbie so I could be missing something obvious here. It does seem though that the cleanest solution would be if there was a compatable mongodb server package, but I read that it isn't available for armf archtecture anymore...
User avatar
sessho
Posts: 6
Joined: Fri Aug 31, 2018 10:09 pm

Re: Unifi controller installer

Post by sessho »

Thanx a lot ! I managed also to install the controller after messing a little with the dependencies and using the binaries ! An optimized packet would be fantastic if ever would be implemented ! 8)
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unifi controller installer

Post by MichaIng »

It is possible to manually adjust the dependencies of a deb package. Did never tried this, but some web search should lead to results, which lines to edit, so APT runs will not complain any more.

I want to add MongoDB to DietPi optimized software offer soon, as this is needed for several other software installs. Sad that there are still no official ARM(v6/7) packages. Of course we could try to build own deb packages (based on the linked binaries or own builds), but would need muuch testing to assure it works well on all ARM(v6/7) devices :?.

Perhaps it's also possible to create an empty fake mongodb-server package?
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Unifi controller installer

Post by baz123 »

For anyone else looking at this, I tried and failed to install diret to DietPi.

I did manage to install Unifi using a docker I found https://github.com/ryansch/docker-unifi-rpi (haing installed docker from dietpi-software first).

I did need to install docker-composer (simply via apt) to build it.

As an aside, I did also manage to install Unifi on a raspbian image using these instructions so not really sure what the issue is with DietPi https://www.technologist.site/2016/06/0 ... pberry-pi/.
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Unifi controller installer

Post by baz123 »

As an update to this, and it may be interesting wrt including Mogodb, the scripts here for Debian 9 worked out of the box on an up to date DietPi install (VM on amd64 host).

https://community.ubnt.com/t5/UniFi-Wir ... -p/2375150

HTH
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Unifi controller installer

Post by baz123 »

A year later and I have just rebuilt my Unifi controller on a DietPi Buster based VM using this script and also created a LE SSL certificate and used his LE script to install it (you need to do some weird keys thing).

Really easy :D :D

[edit]

I have noticed in the past that the memory ran away - it looked like a memory leak. Actually it turns out that, by default, the java app is allocated 1GB of memory. Not so good on most SBCs. This is easily solved by allocating less memory...

Code: Select all

nano /var/lib/unifi/system.properties
And add these 2 lines (adjust sizes to suit).

Code: Select all

unifi.xms=256
unifi.xmx=512
This is now super stable!
Post Reply