Unifi controller installer

Suggestions for features and software you would like to see in DietPi, goes here.
sfishe
Posts: 9
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: 3275
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: 172
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: 172
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: 172
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!
seabird
Posts: 3
Joined: Fri Feb 19, 2021 6:27 pm

Re: Unifi controller installer

Post by seabird »

Hi everyone,

I am also moving my unifi controller to my dietpi. Installing it via glenn r. Scripts was easy as pi (pun intended).

But i am trying to set up a high availability and noticed mongodb version 2.4 is installed.

Is there a better way to update mongodb? Without breaking unifi? That way I can follow this tutorial

https://wireless.fr/en/part-1-setting-u ... bility.php
User avatar
MichaIng
Site Admin
Posts: 3275
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unifi controller installer

Post by MichaIng »

They have a Debian repository:

Code: Select all

curl -sSfL https://www.mongodb.org/static/pgp/server-4.4.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb.gpg
echo "deb http://repo.mongodb.org/apt/debian $G_DISTRO_NAME/mongodb-org/4.4 main" > /etc/apt/sources.list.d/mongodb.list
apt update
apt install mongodb-org-server
EDIT: Ahh, dammit, it's x86_64 only.

Debian does not maintain any MongoDB packages anymore, whatever the reason for this is. So there is no common way to install it on ARM, quite strange nowadays where SBCs are quite a driver for software development :?.
seabird
Posts: 3
Joined: Fri Feb 19, 2021 6:27 pm

Re: Unifi controller installer

Post by seabird »

MichaIng wrote: Fri Feb 19, 2021 6:43 pm EDIT: Ahh, dammit, it's x86_64 only.
So also not a option untill we have a stable deutpi 64 release ;)
User avatar
MichaIng
Site Admin
Posts: 3275
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unifi controller installer

Post by MichaIng »

It's not about 32-bit vs 64-bit but about x86 vs ARM. Or in other words: This repo is for PCs, not for SBCs ;).
Post Reply