UniFi controller v.5.4.16 and Oracle 8

Hi @sniferx1 – happy new you to you (and sorry for the late reply)!

I migrated my UniFi controller to my OMV NAS, so I have not been faced with any further issues. It runs quite well in a docker container, and the maintainer of the image is very timely with updates in sync with Ubiquiti’s releases.

For reference, you may find info here:

Regards,

1 Like

I personally added the Raspbian Stretch repos:

add-apt-repository "deb http://archive.raspbian.org/raspbian stretch main contrib non-free"

Following which, rerun the install of unifi - Mongo should install automatically.

Posted the same reply on the Unifi forums :slight_smile:

I have the UniFi controller working just fine on my Raspberry Pi 3 running the Dec (and now Jan) updates of OSMC :slight_smile:

1 Like

Although it might work, creating a hybrid installation is risky:

  • It might also install dependencies from Raspbian;
  • You’ll need to comment out the line in /etc/apt/sources.list, otherwise regular (OSMC) updates will potentially break OSMC, which uses Debian;
  • It will be difficult trying to keep Raspbian software separate from Debian but properly up to date.
  • It will be an unsupported configuration.
1 Like

@dillthedog & @denogun I am over the moon for your help with this matter. Just to be sure I will follow the steps and once all running what do I need to uncomment from /etc/apt/sources.list?

This will be big help…

I am not liking the MAC solution as my MAC is getting slow due to Unifi APP memory consumption,.,.

The line deb http://archive.raspbian.org/raspbian stretch main contrib non-free needs to be commented out.

1 Like

@dillthedog / @denogun love both you man… got it working…

Hopefully proper support will come soon… Asking about proper support is it our OSMC repo’s need to support or MongoDB guys need to support?

@sniferx1 I am a noob when it comes to UniFi Controller but did you do another attempt at installing this lately? I would be interested in understanding the necessary steps.

Just use docker to solve all dependency problems. This runs fine.

Untill de SD card crashes because that media isn’t capabale of writing data over and over that the controller software does. To solve this, you need other media (like a real hdd, or a nas nfs share) to save your docker images onto.

I already have my HDD attached via USB to my RPi3. I can install it there.

Just worried, the Unifi Controller anything but lightweight. Running it via Docker might be too much for the RPi3 or for my Vero4K.

I got it installed on my Vero4K, but can’t load the web interface.

I followed these instructions to install Docker.
But the instructions have an outdated source. This is the right one:
deb [arch=armhf] https://download.docker.com/linux/debian stretch stable
That worked. Docker installed successfully.

Before downloading the Unifi Controller image I followed these instructions to change Docker data location path to my USB connected HDD /mnt/USBDRIVE/Docker. I also created a seperate folder for Unifi config files: /mnt/USBDRIVE/Apps/Unifi.

Next, I run the docker image with this command:
sudo docker run -d --name=unifi-controller --net=host --volume=/mnt/USBDRIVE/Apps/unifi:/mnt/USBDRIVE/Docker/unifi -p 8080:8080/tcp -p 8081:8081/tcp -p 8443:8443/tcp -p 8843:8843/tcp -p 8880:8880/tcp -p 3478:3478/udp jacobalberty/unifi:latest

Next, I open a browser on my laptop and go to my Vero4K IP address to get to the webui:
https://192.168.88.10:8443/

But can’t connect. What am I doing wrong?

Hi,

Please provide the out of the following:

systemctl status docker

sudo docker ps

Thanks Tom.

osmc@Vero:~$ systemctl status docker
* docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
   Active: active (running) since Sun 2018-11-18 13:38:54 CET; 45min ago
     Docs: https://docs.docker.com
 Main PID: 4173 (dockerd)
   Memory: 40.9M
      CPU: 6.263s
   CGroup: /system.slice/docker.service
           `-4173 /usr/bin/dockerd -H unix://

Nov 18 13:38:54 Vero dockerd[4173]: time="2018-11-18T13:38:54.042554750+01:00" l
Nov 18 13:38:54 Vero systemd[1]: Started Docker Application Container Engine.
Nov 18 13:49:11 Vero dockerd[4173]: time="2018-11-18T13:49:11.512259465+01:00" l
Nov 18 13:49:11 Vero dockerd[4173]: time="2018-11-18T13:49:11.702961367+01:00" l
Nov 18 13:49:12 Vero dockerd[4173]: time="2018-11-18T13:49:12.193757995+01:00" l
Nov 18 13:49:13 Vero dockerd[4173]: time="2018-11-18T13:49:13.415390349+01:00" l
Nov 18 13:49:13 Vero dockerd[4173]: time="2018-11-18T13:49:13.476578246+01:00" l
Nov 18 14:01:07 Vero dockerd[4173]: time="2018-11-18T14:01:07.416250166+01:00" l
Nov 18 14:01:08 Vero dockerd[4173]: time="2018-11-18T14:01:08.059599074+01:00" l
Nov 18 14:01:08 Vero dockerd[4173]: time="2018-11-18T14:01:08.116748741+01:00" l
lines 1-20/20 (END)...skipping...

I rebooted the Vero and started the unifi controller again, still no luck. ps shows no containers.

osmc@Vero:~$ sudo docker start unifi-controller
unifi-controller
osmc@Vero:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
osmc@Vero:~$

Hi,

This may help:

Tom.

Unfortunately I got nowhere.

osmc@Vero:~$ sudo docker start -a unifi-controller
standard_init_linux.go:190: exec user process caused "exec format error"

and when using events&, something I found online to see the events of docker:

osmc@Vero:~$ sudo docker run -debug -d --name=unifi-controller --net=host -p 8080:8080/tcp -p 8081:8081/tcp -p 8443:8443/tcp -p 8843:8843/tcp -p 8880:8880/tcp -p 3478:3478/udp jacobalberty/unifi:latest -debug
2018-11-19T14:57:25.989011314+01:00 2018-11-19T14:57:25.989011314+01:00 volume create 34e1b2dd200809d1a9f294d8da9fd22de684b82608be5ff84f4d963e76f8a986volume create 34e1b2dd200809d1a9f294d8da9fd22de684b82608be5ff84f4d963e76f8a986 (driver=local) (driver=local)

2018-11-19T14:57:26.007759911+01:00 2018-11-19T14:57:26.007759911+01:00 volume create bb2e54cbed0aa5d7feb9e5da37cdcaa197f164a5c5fe3be0b4b8db708191266e (driver=local)
volume create bb2e54cbed0aa5d7feb9e5da37cdcaa197f164a5c5fe3be0b4b8db708191266e (driver=local)
2018-11-19T14:57:26.068714268+01:00 container create c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030 (image=jacobalberty/unifi:latest, maintainer=Jacob Alberty <jacob.alberty@foundigital.com>, name=unifi-controller)
2018-11-19T14:57:26.068714268+01:00 container create c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030 (image=jacobalberty/unifi:latest, maintainer=Jacob Alberty <jacob.alberty@foundigital.com>, name=unifi-controller)
WARNING: Published ports are discarded when using host network mode
c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030
2018-11-19T14:57:26.119584269+01:00 2018-11-19T14:57:26.119584269+01:00 network connect d7489d4e4a9feebfff3f500e0f38a0c2588460e5de3200830101bb2c71a8271dnetwork connect d7489d4e4a9feebfff3f500e0f38a0c2588460e5de3200830101bb2c71a8271d (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, name=host, type=host) (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, name=host, type=host)

2018-11-19T14:57:26.143718990+01:00 volume mount 34e1b2dd200809d1a9f294d8da9fd22de684b82608be5ff84f4d963e76f8a986 (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, destination=/unifi, driver=local, propagation=, read/write=true)
2018-11-19T14:57:26.144140666+01:00 volume mount bb2e54cbed0aa5d7feb9e5da37cdcaa197f164a5c5fe3be0b4b8db708191266e (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, destination=/var/run/unifi, driver=local, propagation=, read/write=true)
2018-11-19T14:57:26.143718990+01:00 volume mount 34e1b2dd200809d1a9f294d8da9fd22de684b82608be5ff84f4d963e76f8a986 (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, destination=/unifi, driver=local, propagation=, read/write=true)
2018-11-19T14:57:26.144140666+01:00 volume mount bb2e54cbed0aa5d7feb9e5da37cdcaa197f164a5c5fe3be0b4b8db708191266e (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, destination=/var/run/unifi, driver=local, propagation=, read/write=true)
2018-11-19T14:57:26.812249169+01:00 container start c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030 (image=jacobalberty/unifi:latest, maintainer=Jacob Alberty <jacob.alberty@foundigital.com>, name=unifi-controller)
2018-11-19T14:57:26.812249169+01:00 container start c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030 (image=jacobalberty/unifi:latest, maintainer=Jacob Alberty <jacob.alberty@foundigital.com>, name=unifi-controller)
osmc@Vero:~$ 2018-11-19T14:57:26.942099900+01:00 2018-11-19T14:57:26.942099900+01:00 container die c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030container die c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030 (exitCode=1, image=jacobalberty/unifi:latest, maintainer=Jacob Alberty <jacob.alberty@foundigital.com>, name=unifi-controller)
 (exitCode=1, image=jacobalberty/unifi:latest, maintainer=Jacob Alberty <jacob.alberty@foundigital.com>, name=unifi-controller)
2018-11-19T14:57:26.966487793+01:00 2018-11-19T14:57:26.966487793+01:00 network disconnect d7489d4e4a9feebfff3f500e0f38a0c2588460e5de3200830101bb2c71a8271dnetwork disconnect d7489d4e4a9feebfff3f500e0f38a0c2588460e5de3200830101bb2c71a8271d (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, name=host, type=host) (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, name=host, type=host)

2018-11-19T14:57:27.047828202+01:00 volume unmount 34e1b2dd200809d1a9f294d8da9fd22de684b82608be5ff84f4d963e76f8a986 (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, driver=local)
2018-11-19T14:57:27.048170418+01:00 volume unmount bb2e54cbed0aa5d7feb9e5da37cdcaa197f164a5c5fe3be0b4b8db708191266e (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, driver=local)
2018-11-19T14:57:27.047828202+01:00 volume unmount 34e1b2dd200809d1a9f294d8da9fd22de684b82608be5ff84f4d963e76f8a986 (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, driver=local)
2018-11-19T14:57:27.048170418+01:00 volume unmount bb2e54cbed0aa5d7feb9e5da37cdcaa197f164a5c5fe3be0b4b8db708191266e (container=c8820876ece6b25013435c658e16c21698428e40635ef941fb54c5c206171030, driver=local)
^C

all I can find is an ExitCode 1 but apparently Docker does not have documentation for ExitCodes. I am quite disappointed after my first experiences using Docker in general.

I’ll give this more time later. For now, my Wifi APs run fine (setup via Windows), a one-time setup is sufficient, no need to have Unifi-Controller running constantly.

Exec format error == wrong architecture.

my docker / unifi install script notes:

sudo nano /etc/os-release
change id=osmc to id=raspbian

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

sudo nano /etc/os-release
change id=raspbian to id=osmc

sudo usermod -aG docker $USER

sudo apt install docker-compose

reboot

mkdir unifi && cd unifi
curl -O https://raw.githubusercontent.com/ryansch/docker-unifi-rpi/master/docker-compose.yml
sudo docker-compose up -d

1 Like

ps shows no containers.

try: docker ps -a
that also show stopped(crashed) containers…

If you use --net=host you do not need the port forwards with parameter -p, just use --net=host

further tips:

change /var/docks/unifi/data/system.properties
add:

#logging verminderen (save SD card): USE WITH CAUTION, as reducing your logging level will not allow UBNT to troubleshoot network issues effectivly.
log.inform=warn
#logging database is not neccesary
unifi.db.nojournal=true
#Using ‘smallfiles’ will cause MongoDB to use smaller initial data files and limit those to 512MB, and will also use 128MB for journal file size rather than 1GB.
#Since MongoDB pre-allocates files this can lead to a savings in initial disk usage. On new startup, for instance, the journal will only use 384MB instead of 3GB.
unifi.db.extraargs=–smallfiles
#locatie waar autobackup bestanden weggeschreven moeten worden…
#autobackup.dir=/media/raid1/backup/unifi

OK so I should not install via sudo apt-get install docker-ce

@ahendriks THANKS!
I had to change id in /etc/os-release to aarch64-debian-stretch for the script to work.
And also had to do this from post #9 Docker no longer works in OSMC 2018.10-1 - #9 by Tom_Doyle

Now I can see it is running:

CONTAINER ID        IMAGE                       COMMAND                  CREATED              STATUS                    PORTS               NAMES
d7100a5b89a8        ryansch/unifi-rpi:latest    "/usr/bin/java -Xmx1…"   About a minute ago   Up About a minute                             unifi

Which is great!

Now I would like to make sure the image is stored and run from my harddrive (/mnt/USBDRIVE/Apps/Unifi) so that my SD card won’t get corrupted/die due to constant writing of the Unifi Controller.
Previously, the files were in /var/lib/docker. That folder does not exist now. Any idea where it is located? Or is this not necessary with your tip regarding /var/docks/unifi/data/system.properties ?

I can access the webui, it is still starting up which seems to take forever or requires patience the first time.
EDIT: after >1h the webui still says:
“UniFi Controller is starting up…
Please wait a moment”

So still no luck :frowning:

Also, that folder does not exist for me (/var/docks/)