Turning a Raspberry Pi into a UniFi controller appliance (UniFi 4, Raspbian Jessie, Oracle Java 8) en

By ERIKvanPAASSEN on Tuesday 29 December 2015 22:09 - Comments (49)
Category: UniFi, Views: 47.666

In March 2014, I wrote a blog post about running the controller software for Ubiquiti UniFi access points on a Raspberry Pi. This was just after the first hard-float version of the Oracle Java 7 JDK for Raspbian was released and running the UniFi controller on Linux was not officially supported yet. The blog posts was one of the very first available on this topic. I was surprised by the amount of reactions I got, as I considered the setup to be just a proof of concept.

However, after months of service, my Raspberry Pi still runs stable. But over the time, a lot of things have changed. The original tutorial used version 2 of the controller software, while the most recent version available today is 4. With Raspbian Jessie, MongoDB became available from the repositories. The Oracle Java 8 JDK has been released. And so on. After all, I decided it was time to rewrite my tutorial and here it is.

http://static.tweakers.net/ext/f/KON6T2YwLiY7CSKN4sJmjkN4/full.png
Screenshot of the UniFi controller web interface.


I'm not providing ready-to-go images as I think it's good to know how everything is set up when problems might arise. I'll try to explain every step carefully, but just copy-pasting all commands should already be enough to yield a working controller though.


Prerequisites

  • Raspberry Pi with at least 512 MB RAM. For example: RPi 1 model B rev. 2, RPi 1 model B+ or RPi 2 model B.
  • A compatible SD card. I'd recommend using a large card (16 GB) to avoid excessive write wear on it.

Necessary steps

We'll need to take the following steps in order to get your UniFi controller up and running.
  1. Setup and configure the Raspbian OS
  2. Install the dependencies
  3. Install the UniFi controller
  4. Modify the start script in order to use Oracle Java 8 instead of OpenJDK 7
  5. Configure the controller to run as its own user instead of as root
  6. Running the controller


Raspbian setup

The first step in the process will be getting your Pi up and running with Raspbian Jessie. You can download an image on the Raspbian downloads page. I'll be using the Lite image, a minimal image wihout graphical user interface, as that's just what we need for a headless device. If you don't know how to write the image to your SD card, I'd recommend you to take a look at the wiki page on this topic. After you've flashed Raspbian to the card, it's time to boot up your Pi and log in with username pi and password raspberry. If you like, you can also log in through SSH, which is enabled out of the box.

After the image has been flashed, we still need to expand the filesystem to the full size of the SD card to be able to use all the space provided by the card. To do so, run:
sudo raspi-config

Choose Expand Filesystem to adjust the filesystem size. While we're in this neat little configuration tool, you might also want to adjust the amount of RAM assigned to the graphics adapter. You can do so by choosing Advanced Options > Memory split. As we're running headless, 16MB would be more than enough. Reboot the device for the changes to take effect.

You may also want to configure the timezone you're living in, using:
sudo dpkg-reconfigure tzdata

We'll also want to make sure all packages are up to date.
sudo apt-get update && sudo apt-get upgrade




Installing the dependencies

We will be using the unifi package from the official Debian repository of UBNT. It has two main dependencies: MongoDB and a Java Virtual Machine. This time, MongoDB is an easy one: it is available in the Raspbian repositories and will be installed automatically when the unifi package is installed.

The unifi depends on OpenJDK 7 to provide the Java Virtual Machine. That's fine on x86/amd64 platforms, but on a Raspberry Pi this would is not optimal. The performance of OpenJDK JVM is low compared to the Oracle JVM, because it uses soft-floats instead of hard-floats. We'll need to install the Oracle JDK:
sudo apt-get install oracle-java8-jdk

Some additional packages will be installed, but that's fine. Now we're ready to install the UniFi controller itself.



Installing the UniFi controller

To be able to use packages from the UBNT repository for Debian, we need to tell our package manager where the repository is located. We'll need to create the file /etc/apt/sources.list.d/unifi.list with the following content: deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti. You can do so manually, or let me do it for you by running the following command.
echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/unifi.list

Next, we'll need to pass it the UBNT public key (you can verify it here) for this repo:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50

Then we'll tell apt to update its index and install the unifi package.
sudo apt-get update
sudo apt-get install unifi

Let's have a look at the output of the last command.
pi@raspberrypi:~ $ sudo apt-get install unifi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  ca-certificates-java icedtea-7-jre-jamvm java-common jsvc libasyncns0 libboost-atomic1.55.0 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-system1.55.0 libboost-thread1.55.0
  libcommons-daemon-java libflac8 libice6 liblcms2-2 libnspr4 libnss3 libogg0 libpcap0.8 libpcrecpp0 libpulse0 libsctp1 libsm6 libsnappy1 libsndfile1 libv8-3.14.5 libvorbis0a libvorbisenc2 libx11-xcb1
  lksctp-tools mongodb-clients mongodb-server openjdk-7-jre-headless tzdata-java
Suggested packages:
  default-jre equivs liblcms2-utils pulseaudio sun-java6-fonts fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho ttf-wqy-microhei ttf-wqy-zenhei fonts-indic
The following NEW packages will be installed:
  ca-certificates-java icedtea-7-jre-jamvm java-common jsvc libasyncns0 libboost-atomic1.55.0 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-system1.55.0 libboost-thread1.55.0
  libcommons-daemon-java libflac8 libice6 liblcms2-2 libnspr4 libnss3 libogg0 libpcap0.8 libpcrecpp0 libpulse0 libsctp1 libsm6 libsnappy1 libsndfile1 libv8-3.14.5 libvorbis0a libvorbisenc2 libx11-xcb1
  lksctp-tools mongodb-clients mongodb-server openjdk-7-jre-headless tzdata-java unifi
0 upgraded, 34 newly installed, 0 to remove and 0 not upgraded.
Need to get 189 MB of archives.
After this operation, 314 MB of additional disk space will be used.
Do you want to continue? [Y/n]

You can see OpenJDK 7 (openjdk-7-jre-headless) is being installed. We won't need it, but it's not easy to exclude and it won't really harm us if there's plenty of disk space around.

After the installation is complete, stop the unifi service, so we can start configuring it.
sudo systemctl stop unifi




The important part: modifying the start script

By default, the UniFi controller will run in the OpenJDK 7 JVM and that's not what we want. To tell it to use the Oracle 8 JVM, we'll need to modify the start script located at /usr/li/unifi/bin/unifi.init. It contains a function called set_java_home detecting all sorts of OpenJDK 6 and 7 JVMs, but it can't detect Oracle JVMs. The solution is to replace this detection mechanism:
sudo sed -i 's@^set_java_home$@#set_java_home\n\n# Use Oracle Java 8 JVM instead.\nJAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt@' /usr/lib/unifi/bin/unifi.init

It replaces the line set_java_home by JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt to skip JVM detection entirely and use the Oracle 8 JVM right away.

Note that with UniFi version 4.8.9 (which is currently in beta) or higher, the command above doesn't work due to differences in the start script. This new start script allows to set the JAVA_HOME environment variable instead. This can be done in the systemd unit file.

Copy the default systemd unit file to /etc/systemd/system/unifi.service so we can override some settings.
sudo cp /lib/systemd/system/unifi.service /etc/systemd/system/
sudo sed -i '/^\[Service\]$/a Environment=JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt' /etc/systemd/system/unifi.service

It adds the line Environment=JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt under the [Service] section in the newly created unit file.

Make systemd aware of the change in its unit files.
sudo systemctl daemon-reload

When we're at it, we might also want to adjust the memory limit available to the UniFi controller which is 1 GB by default. Using a Raspberry Pi with 512 MB of RAM, in many cases, 384 MB would do. You can configure this using:
sudo sed -i 's@-Xmx1024M@-Xmx384M@' /usr/lib/unifi/bin/unifi.init

It replaces the -Xmx1024M JVM option with -Xmx384M.

If you're using a Raspberry Pi 2 model B with 1 GB of RAM, you might want to give it 768M instead:
sudo sed -i 's@-Xmx1024M@-Xmx768M@' /usr/lib/unifi/bin/unifi.init

At this point, you should be able to run the controller already, but I advise you also to work through the next section to let the controller run as its own user. This would prevent immediate root access when the controller would be exploited. If you however decide you want the controller to run as root, you can skip this part.



Configuring the controller to run as its own user

UPDATE December 31, 2015: there seems to be some issues when configuring the service to run as a different user. Please skip this section for now while I'm working on a solution.

We'll create the new user first. The -r flag means it will be a system user, which has no password and cannot log in.
sudo useradd -r unifi

Make the new user owner of the various directories the UniFi controller needs to be able to write to.
sudo chown -R unifi:unifi /var/lib/unifi /var/log/unifi /var/run/unifi /usr/lib/unifi/work

This tells which user to run the service as:
sudo sed -i '/^\[Service\]$/a User=unifi' /etc/systemd/system/unifi.service

It adds the line User=unifi under the [Service] section in the systemd unit file which was created earlier on.

Make systemd aware of the change in its unit files.
sudo systemctl daemon-reload




Running the controller

You can now start the UniFi controller with the following command. It should also run automatically after the Raspberry Pi is rebooted.
sudo systemctl start unifi

It will take some time (about 2 minutes on my old RPi model B rev 2) for the controller to start, but eventually you should be able to connect to https://<ip.of.your.rpi>:8443.

http://static.tweakers.net/ext/f/4eMK01YGNpI9gE4neECh6PXO/full.png
???? PROFIT!!!!


If things are not working for you, you should view the server's log file.
sudo tail /var/log/unifi/server.log

You can (and should) also verify the controller is running as the unifi user. The first column shows the name of the user.
pi@raspberrypi:~ $ ps aux | grep unifi
unifi     9851  0.0  0.2   2072  1060 ?        Ss   17:30   0:00 unifi -home /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx384M com.ubnt.ace.Launcher start
unifi     9853  0.0  0.2   2072  1264 ?        S    17:30   0:00 unifi -home /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx384M com.ubnt.ace.Launcher start
unifi     9854  0.3  5.2 461592 25896 ?        Sl   17:30   0:46 unifi -home /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx384M com.ubnt.ace.Launcher start
unifi     9872  1.3 15.6 1151876 77180 ?       Sl   17:30   3:27 /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/bin/java -Xmx1024M -Dapple.awt.UIElement=true -jar /usr/lib/unifi/lib/ace.jar start
unifi     9888  0.8 18.2 220780 89892 ?        Sl   17:31   2:08 bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --logappend --logpath logs/mongod.log --nohttpinterface --bind_ip 127.0.0.1
pi       10027  0.0  0.3   4252  1844 pts/0    S+   21:38   0:00 grep --color=auto unifi

Note that it also shows you it is using the Oracle 8 JVM and the lowered memory setting.



A note on log rotation

The UniFi controller comes with built-in log rotation which is fine in most situations. Especially when you're using a large SD card (16 GB or more), which should leave you with enough disk space to avoid excessive wear on it. It would be wise to create a backup image now, however. If your SD card would eventually fail due to write wear, you could just get another one and flash your image on it, upload your backup config (don't forget) in the UniFi interface and you're all set again.

Volgende: Turning a Raspberry Pi into a UniFi controller appliance 03-'14 Turning a Raspberry Pi into a UniFi controller appliance

Comments


By Tweakers user xleeuwx, Wednesday 30 December 2015 09:36

Merk je ook nog verbetering ten opzichte van een andere router ? Kan me voorstellend at de RPI met zijn Hardware (100Mbit NIC) en geen standaard wifi hier niet erg geschikt voor is.

By Tweakers user Qwerty-273, Wednesday 30 December 2015 10:10

@xleeuwx, geen wifi in the pi is natuurlijk niet echt een probleem voor de controller zelf. Dat zal je eerder doen via verschillende access points die je installeert op benodigde plekken. Dat zelfde geldt ook voor de nic, het is een controller en dat zou als het goed is betekenen dat niet al het verkeer door dit doosje heen moet. Dus van je wifi-device naar de ap en vervolgens naar waar het heen moet. Een controller is geen router (al kan je natuurlijk wel alles op 1 doosje doen ;) )

By Tweakers user ERIKvanPAASSEN, Wednesday 30 December 2015 10:53

xleeuwx wrote on Wednesday 30 December 2015 @ 09:36:
Merk je ook nog verbetering ten opzichte van een andere router ? Kan me voorstellend at de RPI met zijn Hardware (100Mbit NIC) en geen standaard wifi hier niet erg geschikt voor is.
Zoals Qwerty-273 al zegt, is dit 'slechts' een controller voor UniFi access points. Hiermee kun je zulke access points centraal beheren. Tussen de controller en de access points vindt zeer weinig verkeer plaats, dus de netwerkinterface is dan absoluut geen probleem.


By Tweakers user xleeuwx, Wednesday 30 December 2015 11:44

Qwerty-273 wrote on Wednesday 30 December 2015 @ 10:10:
@xleeuwx, geen wifi in the pi is natuurlijk niet echt een probleem voor de controller zelf. Dat zal [...]
My bad :)

Evengoed wel vet gedaan :)

By Tweakers user yamahabest, Wednesday 30 December 2015 13:03

Prima tutorial, misschien nog leuk om het volgende toe te voegen?

http://www.lowefamily.com...ller-4-on-raspberry-pi/3/: "Disable the default MongoDB database instance, using the following commands: sudo echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null

Without making this small configuration change, you will have two separate instances of MongoDB running; an unused default database instance, and the UniFi database instance. This is obviously not desirable on a device with limited resources, such as the Raspberry Pi."

By Si, Wednesday 30 December 2015 19:10

Great stuff. Thanks. This worked great. However, I've now upped to 4.8.9 beta and it doesn't start. Seems I need to redo the Java parts but the sed command no longer works on the set_java_home part. The memory part appears ok. Any ideas? Thanks.

By Tweakers user ERIKvanPAASSEN, Thursday 31 December 2015 01:13

yamahabest wrote on Wednesday 30 December 2015 @ 13:03:
Prima tutorial, misschien nog leuk om het volgende toe te voegen?

http://www.lowefamily.com...ller-4-on-raspberry-pi/3/: "Disable the default MongoDB database instance, using the following commands: sudo echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null

Without making this small configuration change, you will have two separate instances of MongoDB running; an unused default database instance, and the UniFi database instance. This is obviously not desirable on a device with limited resources, such as the Raspberry Pi."
Thanks for the info. I'll try to update my blog post soon. :)
Si wrote on Wednesday 30 December 2015 @ 19:10:
Great stuff. Thanks. This worked great. However, I've now upped to 4.8.9 beta and it doesn't start. Seems I need to redo the Java parts but the sed command no longer works on the set_java_home part. The memory part appears ok. Any ideas? Thanks.
I've investigated the start script of the 4.8.9 package and it seems to be changed. You can use the JAVA_HOME environment variable with this version. I've updated the blog post to cover it.

By Tweakers user yamahabest, Thursday 31 December 2015 09:09

Aanpassen van de tijdszone kan natuurlijk ook rechtstreeks vanuit raspi-config.

By Tweakers user HellStorm666, Monday 4 January 2016 13:24

Even een vraag.
Ik heb al een Pi 2b met daar op Domoticz.
Kan ik de Unifi Controller hier naast installeren. Of kan ik beter een Pi Zero/Pi 2b er bij kopen?

By Michel, Monday 11 January 2016 11:21

Beste Erik,

Heb hier ook een Pi met Unifi draaien. Op zich gaat alles goed maar ik ervaar het probleem dat het portal (:8880/guest/s/default/) NA de expiration time (ingesteld in de guest control zodat gebruikers na X tijd opnieuw moeten inloggen) niet meer bereikbaar is. Ik zou ervan uit gaan dat de landingspagina altijd bereikbaar moet zijn. Als ik wifi apparaten aanmeld op mijn netwerk word er automatisch doorverwezen naar deze URL maar bij niet beschikbaar blijft het daarop hangen. De controller sw (:8443) blijft wel gewoon bereikbaar vanaf een vaste PC. Een reset zorgt ervoor dat het portal weer online komt.

Enig idee waar mijn probleem in kan zitten? Bij voorbaat dank voor een reactie.

By Tweakers user ERIKvanPAASSEN, Tuesday 12 January 2016 17:59

Michel wrote on Monday 11 January 2016 @ 11:21:
Op zich gaat alles goed maar ik ervaar het probleem dat het portal (:8880/guest/s/default/) NA de expiration time (ingesteld in de guest control zodat gebruikers na X tijd opnieuw moeten inloggen) niet meer bereikbaar is.
Zelf heb ik geen ervaring met de guest portal-functionaliteit, maar heb je gekeken of er iets in de logs staat? En hoe staat de heap size van de controller (-Xmx*M in het init script) ingesteld?

By Tweakers user iCrOn, Saturday 16 January 2016 19:24

Hoi Erik,

Bedankt voor je uitgebreide uitleg. Heb eerst de gewone controller een paar dagen gedraaid en daarna de laatste beta geinstalleerd. Alles werkte aan het einde van jou uitleg. Alleen na een reboot start de controller niet meer vanzelf. Krijg hem alleen gestart als ik "sudo /etc/init.d/unifi start" doe. Jij enige idee wat er niet klopt?

By Michel, Sunday 17 January 2016 11:22

ERIKvanPAASSEN wrote on Tuesday 12 January 2016 @ 17:59:
[...]


Zelf heb ik geen ervaring met de guest portal-functionaliteit, maar heb je gekeken of er iets in de logs staat? En hoe staat de heap size van de controller (-Xmx*M in het init script) ingesteld?
Bedankt voor je reactie! Helaas heb ik geen kennis van "heap size" dus begrijp ik helaas niet wat je bedoeld. Ik ga je blog van a tot z volgen en wederom testen (voorheen gebruikte ik de uitleg van Chris via lowefamily.com) Tips zijn meer dan welkom en ik heb m.b.t. mijn probleem ook een topic aangemaakt op UBNT: https://community.ubnt.co...time/m-p/1449397#U1449397

By Tweakers user ERIKvanPAASSEN, Sunday 17 January 2016 14:00

Michel wrote on Sunday 17 January 2016 @ 11:22:
Helaas heb ik geen kennis van "heap size" dus begrijp ik helaas niet wat je bedoeld.
In het init script (/usr/lib/unifi/bin/unifi.init) vind je ergens een regel met -Xmx1024M daarin. Dit stelt de maximale heap size van de JVM in op 1024M. Een RPi heeft echter niet zoveel geheugen beschikbaar, dus het is raadzaam om dit iets omlaag te brengen. Voor een RPi met 512MB RAM zou ik hem op -Xmx384M zetten, en voor een RPi2 met 1GB RAM is -Xmx768M wel aardig om mee te beginnen. Er staat ook wat over in dit blog.

By MIchel, Friday 22 January 2016 19:54

ERIKvanPAASSEN wrote on Sunday 17 January 2016 @ 14:00:
[...]


In het init script (/usr/lib/unifi/bin/unifi.init) vind je ergens een regel met -Xmx1024M daarin. Dit stelt de maximale heap size van de JVM in op 1024M. Een RPi heeft echter niet zoveel geheugen beschikbaar, dus het is raadzaam om dit iets omlaag te brengen. Voor een RPi met 512MB RAM zou ik hem op -Xmx384M zetten, en voor een RPi2 met 1GB RAM is -Xmx768M wel aardig om mee te beginnen. Er staat ook wat over in dit blog.
Je oplossing heeft gewerkt, het is nu stabiel met de opmerking dat ik tevens Oracle JDK 8 gebruik en de portal map niet geheel leeg maak maar de custom files erbij zet (vervolgens hernoem ik de niet langer gebruikte files en mappen naar name_old) Bedankt.

By Govert, Monday 15 February 2016 23:23

Vandaag mijn RaspBerry geinstalleerd en een tijdje aan het worstelen geweest, totdat ik zag dat de jdk-8-oracle-arm-vfp-hflt in de directory /usr/lib/jvm/ arm32 in de naam had staan.

Dit aangepast in de .service file, daarna draaide het als een zonnetje.

Verder TOP handleiding

By Dion, Tuesday 16 February 2016 18:38

Na een tijdje kwam ik, net zoals govert erachter dat ik arm32 moest gebruiken. Nadat ik dat heb aangepast starte de unifi processen (ps aug) netjes op. Ook het Java proces startte op, maar deze maakt om de x mini's een hcs-error.log aan, met daarin crashende van het Java proces. Hierdoor kan ik de unifi controller natuurlijk nog steeds niet bereiken. Iemand enig idee?

Ik gebruik een pi1 modelbouw 512mb.

Ik zie trouwens dat mijn Java proces net zoals in het screenshot hierboven, -1024mb gebruikt, dit i.t.t. het feit dat ik alles naar 384mb heb gezet in de verschillende files...

By Dion, Tuesday 16 February 2016 20:17

Ik kwam ergens een release notes tegen over 4.8.12 en daar stond, mocht je problemen hebben bij het starten van de controller op een P1 (arm processor) schakel dan de cloud functionaliteit uit:

/usr/lib/unifi/lib/native/Linux/armhf# mv libubnt_webrtc_jni.so libubnt_webrtc_jni.so.old

dit heeft mijn probleem opgelost!

By Tweakers user wouter1981, Wednesday 17 February 2016 14:36

HellStorm666 wrote on Monday 04 January 2016 @ 13:24:
Even een vraag.
Ik heb al een Pi 2b met daar op Domoticz.
Kan ik de Unifi Controller hier naast installeren. Of kan ik beter een Pi Zero/Pi 2b er bij kopen?
Ik kan zelf geen uitspraak doen over die combinatie. Maar een RPI2b met OpenVPN en de Unifi controller naast elkaar gaat goed. Wel even het maximale geheugen voor Unifi aanpassen.

[Comment edited on Wednesday 17 February 2016 14:36]


By Jules, Thursday 18 February 2016 15:46

The latest update to Raspian Jessie (the February 2016 release) appears to change the location of the Oracle Java 8 JVM, which is now located at /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt. Note the new arm32 rather than arm in the original command. The changes to unifi.init or unifi.service (depending on the controller version) need to be changed to reflect this change, otherwise the controller will not start because it cannot find Java_Home.

By Tweakers user lostdogs, Thursday 3 March 2016 22:38

Doesn't seem to work anymore. I run in to


<launcher> INFO db - *** Factory Default *** Database exists. Drop it

By Butterfoc, Friday 4 March 2016 10:57

When following these instructions, and amending the JDK ARM to 32, the service initiates - but only listens on IPv6...

By Martijn, Sunday 13 March 2016 19:24

Hi,

Blijkbaar doe ik iets verkeerd! Het lukt me niet om Unifi draaiend te krijgen. Ik heb het hele stappen plan gevolgd en zelfs die arm32 dingen aangepast. en toch krijg ik de volgende errors.

[2016-03-13 19:13:16,999] <launcher> INFO system - UniFi 4.8.14 (build atag_4.8.14_7436 - release) is started
[2016-03-13 19:13:17,000] <launcher> INFO system - ======================================================================
[2016-03-13 19:13:17,101] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-03-13 19:13:17,276] <launcher> INFO system - Current System IP: 192.168.1.129
[2016-03-13 19:13:17,282] <launcher> INFO system - Hostname: raspberrypi
[2016-03-13 19:13:17,386] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-03-13 19:13:17,392] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
[2016-03-13 19:13:36,863] <launcher> INFO system - Certificate[UniFi] generated!
[2016-03-13 19:15:26,226] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:15:29,921] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
[2016-03-13 19:16:05,779] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:16:45,673] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:16:48,686] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
[2016-03-13 19:17:26,367] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:17:33,898] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it

Ik hoop dat jullie mij kunnen helpen!

Groeten Martijn

By Richard, Monday 14 March 2016 16:53

Hallo,

Zelfde probleem hier zoals Martijn omschrijft. De controller is wel gestart maar is niet benaderbaar via een webbrowser.

P.S. De sectie met unifi user heb ik overgeslagen.

Hoor graag van iemand een oplossing.

Groeten, Richard

By Richard, Monday 14 March 2016 18:54

Martijn wrote on Sunday 13 March 2016 @ 19:24:
Hi,

Blijkbaar doe ik iets verkeerd! Het lukt me niet om Unifi draaiend te krijgen. Ik heb het hele stappen plan gevolgd en zelfs die arm32 dingen aangepast. en toch krijg ik de volgende errors.

[2016-03-13 19:13:16,999] <launcher> INFO system - UniFi 4.8.14 (build atag_4.8.14_7436 - release) is started
[2016-03-13 19:13:17,000] <launcher> INFO system - ======================================================================
[2016-03-13 19:13:17,101] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-03-13 19:13:17,276] <launcher> INFO system - Current System IP: 192.168.1.129
[2016-03-13 19:13:17,282] <launcher> INFO system - Hostname: raspberrypi
[2016-03-13 19:13:17,386] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-03-13 19:13:17,392] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
[2016-03-13 19:13:36,863] <launcher> INFO system - Certificate[UniFi] generated!
[2016-03-13 19:15:26,226] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:15:29,921] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
[2016-03-13 19:16:05,779] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:16:45,673] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:16:48,686] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
[2016-03-13 19:17:26,367] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:17:33,898] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it

Ik hoop dat jullie mij kunnen helpen!

Groeten Martijn
Martijn wrote on Sunday 13 March 2016 @ 19:24:
Hi,

Blijkbaar doe ik iets verkeerd! Het lukt me niet om Unifi draaiend te krijgen. Ik heb het hele stappen plan gevolgd en zelfs die arm32 dingen aangepast. en toch krijg ik de volgende errors.

[2016-03-13 19:13:16,999] <launcher> INFO system - UniFi 4.8.14 (build atag_4.8.14_7436 - release) is started
[2016-03-13 19:13:17,000] <launcher> INFO system - ======================================================================
[2016-03-13 19:13:17,101] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-03-13 19:13:17,276] <launcher> INFO system - Current System IP: 192.168.1.129
[2016-03-13 19:13:17,282] <launcher> INFO system - Hostname: raspberrypi
[2016-03-13 19:13:17,386] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-03-13 19:13:17,392] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
[2016-03-13 19:13:36,863] <launcher> INFO system - Certificate[UniFi] generated!
[2016-03-13 19:15:26,226] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:15:29,921] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
[2016-03-13 19:16:05,779] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:16:45,673] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:16:48,686] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
[2016-03-13 19:17:26,367] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-03-13 19:17:33,898] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it

Ik hoop dat jullie mij kunnen helpen!

Groeten Martijn
@Martijn, ik heb libubnt_webrtc_jni.so gerenamed en rasp opnieuw opgestart en nu kom ik wel in de unifi controller ;)

By Martijn, Tuesday 15 March 2016 21:08

Richard wrote on Monday 14 March 2016 @ 18:54:
[...]

[...]


@Martijn, ik heb libubnt_webrtc_jni.so gerenamed en rasp opnieuw opgestart en nu kom ik wel in de unifi controller ;)
@Richard, Hoe doe ik dat? Had het met Nano geprobeerd, maar dan zie ik alleen maar een lege file... En waar in heb je hem gerenamed?

Groeten Martijn

By Tweakers user ERIKvanPAASSEN, Tuesday 15 March 2016 21:18

Martijn wrote on Tuesday 15 March 2016 @ 21:08:
@Richard, Hoe doe ik dat? Had het met Nano geprobeerd, maar dan zie ik alleen maar een lege file... En waar in heb je hem gerenamed?
Zoiets zou moeten werken:
mv libubnt_webrtc_jni.so libubnt_webrtc_jni.so.old

By Tweakers user Yohost!, Wednesday 16 March 2016 11:28

Ondanks de geheugen aanpassing in /usr/lib/unifi/bin/unifi.init zie ik in ps nog staan "/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java -Xmx1024M"

Ik draai met UniFi version: 4.8.14

Waarom wordt dit niet goed doorgevoerd?

By Tweakers user lostdogs, Saturday 19 March 2016 13:46

Oke, ik heb dus libubnt_webrtc_jni.so ombenoemd en nu werkt het wel.

Dit is een Pi 2b dus daar zou de cloud functionaliteit toch op moeten werken? Sterker nog op een andere Pi2b heb ik dat wel draaien. Waarom werkt dat hier niet? Als iemand daar inzicht in heeft hoor ik het graag.

UPDATE:

Als ik nu in de controller kijk, heb ik wel de mogelijkheid om de cloud access aan te zetten en er wordt ook een verbinding gemaakt. Wel staat er CONNECTED(LIMITED). Enig idee wat dat limited betekend?

[Comment edited on Saturday 19 March 2016 14:08]


By Tweakers user Pauluz88, Thursday 24 March 2016 22:42

Als ik alle stappen doe behalve de Own user stappen start de controller niet.
Ik krijg dit in log:

pi@raspberrypi:~ $ sudo tail /var/log/unifi/server.log [2016-03-24 22:18:50,277] <launcher> INFO system - *** Running for the first time, creating identity ***
[2016-03-24 22:18:50,337] <launcher> INFO system - UUID: ccc751f9-037e-494d-b840-ffdd9277f6eb
[2016-03-24 22:18:50,338] <launcher> INFO system - ======================================================================
[2016-03-24 22:18:50,353] <launcher> INFO system - UniFi 4.8.14 (build atag_4.8.14_7436 - release) is started
[2016-03-24 22:18:50,355] <launcher> INFO system - ======================================================================
[2016-03-24 22:18:50,598] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-03-24 22:18:50,742] <launcher> INFO system - Current System IP: 192.168.2.22
[2016-03-24 22:18:50,747] <launcher> INFO system - Hostname: raspberrypi
[2016-03-24 22:18:50,921] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-03-24 22:18:50,925] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
pi@raspberrypi:~ $

By Tweakers user Blankinho, Tuesday 29 March 2016 18:52

Pauluz88 wrote on Thursday 24 March 2016 @ 22:42:
Als ik alle stappen doe behalve de Own user stappen start de controller niet.
Ik krijg dit in log:

pi@raspberrypi:~ $ sudo tail /var/log/unifi/server.log [2016-03-24 22:18:50,277] <launcher> INFO system - *** Running for the first time, creating identity ***
[2016-03-24 22:18:50,337] <launcher> INFO system - UUID: ccc751f9-037e-494d-b840-ffdd9277f6eb
[2016-03-24 22:18:50,338] <launcher> INFO system - ======================================================================
[2016-03-24 22:18:50,353] <launcher> INFO system - UniFi 4.8.14 (build atag_4.8.14_7436 - release) is started
[2016-03-24 22:18:50,355] <launcher> INFO system - ======================================================================
[2016-03-24 22:18:50,598] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-03-24 22:18:50,742] <launcher> INFO system - Current System IP: 192.168.2.22
[2016-03-24 22:18:50,747] <launcher> INFO system - Hostname: raspberrypi
[2016-03-24 22:18:50,921] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-03-24 22:18:50,925] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
pi@raspberrypi:~ $
Ik blijf hier ook op hangen? Ben jij hier al uitgekomen?

By foobar, Wednesday 30 March 2016 17:13

Pauluz88 wrote on Thursday 24 March 2016 @ 22:42:
Als ik alle stappen doe behalve de Own user stappen start de controller niet.
Ik krijg dit in log:

pi@raspberrypi:~ $ sudo tail /var/log/unifi/server.log [2016-03-24 22:18:50,277] <launcher> INFO system - *** Running for the first time, creating identity ***
[2016-03-24 22:18:50,337] <launcher> INFO system - UUID: ccc751f9-037e-494d-b840-ffdd9277f6eb
[2016-03-24 22:18:50,338] <launcher> INFO system - ======================================================================
[2016-03-24 22:18:50,353] <launcher> INFO system - UniFi 4.8.14 (build atag_4.8.14_7436 - release) is started
[2016-03-24 22:18:50,355] <launcher> INFO system - ======================================================================
[2016-03-24 22:18:50,598] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-03-24 22:18:50,742] <launcher> INFO system - Current System IP: 192.168.2.22
[2016-03-24 22:18:50,747] <launcher> INFO system - Hostname: raspberrypi
[2016-03-24 22:18:50,921] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-03-24 22:18:50,925] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
pi@raspberrypi:~ $
same here :-/ raspberry b+, debian jessie

By Tweakers user Blankinho, Thursday 31 March 2016 00:04

foobar wrote on Wednesday 30 March 2016 @ 17:13:
[...]


same here :-/ raspberry b+, debian jessie
Ik heb het gefixt door het volgende te doen:

----------------------------------------------------------------------------------------
Let op dat je voor een model B wel de webrtc file moet verwijderen, anders werkt hij niet

/usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so

(zoals beschreven in de release notes: https://community.ubnt.co...-is-released/ba-p/1495935 )

----------------------------------------------------------------------------------------

By Vik, Tuesday 5 April 2016 01:39

Has anybody got it working with Pi 1 mod.B ?

I, like many others, cannot get the service running - no open ports except for SSH (22), and the server.log is pretty empty:
[2016-04-04 22:50:02,102] <launcher> INFO db - *** Factory Default *** Database exists. Drop it
[2016-04-04 22:50:07,408] <launcher> INFO stat - *** Factory Default *** Stat Database exists. Drop it
t

By Vik, Tuesday 5 April 2016 05:30

For some reason, when I start the controller with
systemctrl start unifi
the following line in /usr/lib/unifi/bin/unifi.init gets somehow ignored:
JVM_OPTS="${JVM_EXTRA_OPTS} -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx384M"
and the process still starts with -Xmx1024M parameter

If i start it manually by executing
java -Xmx384M -jar /usr/lib/unifi/lib/ace.jar start
it runs with the -Xmx384M parameter as expected

Any ideas ?

By Paul, Wednesday 13 April 2016 04:41

Hi Vik - I think I'm having the same problem. It looks like JRE is crashing: I'm getting files named "hs_err_pid<num>.log" in /usr/lib/unifi. The message indicates that the crash is happening in libubnt_webrtc_jni.so - one of the native Java libraries shipped with Unifi.

I'm getting the same behavior (crashing) with both Oracle 8 and OpenJDK 7.

That's as far as I've gotten... stumped at this point.

By Tweakers user harrytasker, Thursday 14 April 2016 21:27

[2016-04-14 20:50:23,887] <launcher> INFO system - ======================================================================
[2016-04-14 20:50:23,888] <launcher> INFO system - UniFi 4.8.15 (build atag_4.8.15_7440 - release) is started
[2016-04-14 20:50:23,889] <launcher> INFO system - ======================================================================
[2016-04-14 20:50:23,921] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-04-14 20:50:23,956] <launcher> INFO system - Current System IP: 192.168.1.223
[2016-04-14 20:50:23,957] <launcher> INFO system - Hostname: raspberrypi
[2016-04-14 20:50:23,988] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-04-14 20:50:23,989] <launcher> INFO system - Generating Certificate[UniFi]... please wait...

Heb al het volgende gedaan, maar nog steeds hetzelfde als hierboven, dus still a no go :(
sudo rm /usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so

Update:
Zojuist deze tutorial gebruikt en die werkt meteen, dus volgens mij gaat er ergens iets fout:
http://www.lowefamily.com...ller-4-on-raspberry-pi/3/
Wat me wel opvalt is dat beide tutorials ik JAVA8 niet aan de praat krijg, alleen 7 werkt?

[Comment edited on Thursday 14 April 2016 22:18]


By Martin, Monday 18 April 2016 12:58

have you tried it on the new raspberry V3 with 1200MHz quadcore?

regards

martin

By Tweakers user Clock, Sunday 24 April 2016 13:36

After a few hours of struggling I've managed to get it all working with the newest Unifi version on a RPI 1 rev B (512mb). Steps:

## OS INSTALL
- Clean Raspbian Jessie Lite install from image

## RPI SETTINGS
- sudo apt-get update && sudo apt-get install raspi-config -y
- sudo raspi-config
-> Expand the filesystem
-> Set LOCALE to en_GB.UTF-8 UTF8
-> Set timezone (Europe/Amsterdam)
-> Set avanced options -> memory split to 16 MB (headless)
- sudo reboot

## RPI UPDATE
- sudo apt-get update && sudo apt-get upgrade -y
- sudo apt-get install rpi-update
- sudo rpi-update
- sudo reboot

## ADD UBNT REPOSITORY
- sudo echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee -a /etc/apt/sources.list.d/ubnt.list > /dev/null
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
- sudo apt-get update

## INSTALL UNIFI CONTROLLER
- sudo apt-get install unifi -y

## DISABLE DEFAULT MONGODB INSTANCE (OPTIMIZATION)
- sudo echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null

## INSTALL ORACLE JAVA 8 (OPTIMIZATION)
- sudo apt-get install oracle-java8-jdk -y
- sudo ln -sf jdk-8-oracle-arm-vfp-hflt/jre /usr/lib/jvm/java-6-openjdk-armhf
- sudo update-alternatives --config java
-> Set default JAVA instance to version 8 by entering selection number

## REMOVE UNIFI CLOUD LIBRARY (NOT COMPATIBLE WITH RPI 1)
- sudo rm /usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so
- sudo reboot

## CHECK INSTALL
- Go to https://<RPI-IP>:8443

By Willy, Monday 25 April 2016 20:41

Hi!
Thanks for this great tutorial!
But I have some problems reaching my pi.
I did everything exactly how it was described, except to run it as a new user - as recommended. But my Pi2 isn't running the unifi programm.
I port-scanned the Pi and there is only SSH Port open. No 8443, so I can't reach the config-page for the AP.

Also I wanted to change the IP to a static one (eth0) but this won't work neither?!
I can live with the dynamic IP, but what could be the reason that the unifi-controller is not running correctly?

I checked 'systemctl' and I can see that 'unifi.service' says 'loaded active exited'
Seems to me, that it has quit, isn't it?

How about this command:
sudo echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null
I've read in a lot of other tutorials and in the comments, is this helpful?

I really would appreciate if someone could give me a hint to solve my problem.
Thank you very much!

By Willy, Monday 25 April 2016 20:53

..almost forgot:

My server.log looks like this:

[2016-04-25 19:06:26,208] <launcher> INFO system - *** Running for the first time, creating identity ***
[2016-04-25 19:06:26,222] <launcher> INFO system - UUID: xxx-xxx-xxx
[2016-04-25 19:06:26,223] <launcher> INFO system - ======================================================================
[2016-04-25 19:06:26,224] <launcher> INFO system - UniFi 4.8.15 (build atag_4.8.15_7440 - release) is started
[2016-04-25 19:06:26,224] <launcher> INFO system - ======================================================================
[2016-04-25 19:06:26,254] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2016-04-25 19:06:26,288] <launcher> INFO system - Current System IP: 192.168.99.80
[2016-04-25 19:06:26,290] <launcher> INFO system - Hostname: raspberrypi
[2016-04-25 19:06:26,319] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2016-04-25 19:06:26,320] <launcher> INFO system - Generating Certificate[UniFi]... please wait...

Can someone please help me to understand what the problem is?
I would be very happy.
thanks in advance!

Sincerely yours

By Willy, Friday 29 April 2016 14:33

I found the solution!
For anyone who is interested:

Follow this great tutorial on this site! (Thanks Erik!)

I followed the instructions on this site: https://www.raspberrypi.o...iewtopic.php?f=27&t=24101

and create a valid keystore.

Then I run:
sudo echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null

and this one:

sudo chmod +x /etc/init.d/unifi
sudo update-rc.d unifi defaults

and finally I started the service with:

sudo service unifi start

after all I rebooted the Pi and after some seconds of patiently waiting the Pi was reachable under https://ip-of-pi:8443

I can not tell if all of my steps were necessary, but now it works and I'm happy.

I hope someone need this information.

By Tweakers user Pauluz88, Tuesday 10 May 2016 23:45

Clock wrote on Sunday 24 April 2016 @ 13:36:
After a few hours of struggling I've managed to get it all working with the newest Unifi version on a RPI 1 rev B (512mb). Steps:

## OS INSTALL
- Clean Raspbian Jessie Lite install from image

## RPI SETTINGS
- sudo apt-get update && sudo apt-get install raspi-config -y
- sudo raspi-config
-> Expand the filesystem
-> Set LOCALE to en_GB.UTF-8 UTF8
-> Set timezone (Europe/Amsterdam)
-> Set avanced options -> memory split to 16 MB (headless)
- sudo reboot

## RPI UPDATE
- sudo apt-get update && sudo apt-get upgrade -y
- sudo apt-get install rpi-update
- sudo rpi-update
- sudo reboot

## ADD UBNT REPOSITORY
- sudo echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee -a /etc/apt/sources.list.d/ubnt.list > /dev/null
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
- sudo apt-get update

## INSTALL UNIFI CONTROLLER
- sudo apt-get install unifi -y

## DISABLE DEFAULT MONGODB INSTANCE (OPTIMIZATION)
- sudo echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null

## INSTALL ORACLE JAVA 8 (OPTIMIZATION)
- sudo apt-get install oracle-java8-jdk -y
- sudo ln -sf jdk-8-oracle-arm-vfp-hflt/jre /usr/lib/jvm/java-6-openjdk-armhf
- sudo update-alternatives --config java
-> Set default JAVA instance to version 8 by entering selection number

## REMOVE UNIFI CLOUD LIBRARY (NOT COMPATIBLE WITH RPI 1)
- sudo rm /usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so
- sudo reboot

## CHECK INSTALL
- Go to https://<RPI-IP>:8443
I tried the above and I can login now.
I went trough the setup wizard were I put in my login name and password. But when I reach the login screen the controller shows "Invalid username and password" after I put in my name and password.

Any ideas?

By Tweakers user Pauluz88, Wednesday 11 May 2016 14:04

Seems that I got it working!

The RPi 1B got stuck in a loop while booting because of an error with snappy-java.

The way I fixed this is by replacing the old "snappy-java-1.0.5.jar" with newer "snappy-java-1.1.2.jar" and then renaming the new to "snappy-java-1.0.5.jar" again. You can find the file on your pi at: /usr/lib/unifi/lib/

Rename the old file first to "snappy-java-1.0.5.jar.OLD"

Before transfering the file I needed to get root access in SFTP.
Uses this command in Putty: sudo chmod 777 /usr/lib/unifi/lib

I transfered the files with Filezilla SFTP.

Download snappy-java-1.1.2.jar from here:
http://central.maven.org/...snappy/snappy-java/1.1.2/

Hope this helps al the Raspberry Pi 1-B users!

[Comment edited on Wednesday 11 May 2016 16:57]


By Tijmen, Friday 23 September 2016 11:06

hi there, did you try to install 5.2.7 already? I can't get it running, was in Ubuntu Mate, but if it is running on Rasbian I will change to Rasbian ofcourse...
Don't you need to install MongoDB to have it running? I did need to, but although all was installed and running the webpage for the controller doesn't start it is going to it but it gives an error on wrong arguments.. also Ubiquity support did spend time on it via remote access, but they couldn't find the solution advice to move to a cloud solution from amizon or go for the cloudkey...

do you have any clue?

By Tweakers user Elect, Saturday 15 October 2016 07:28

For everyone still struggling with the memory (-xmx1024M) setting. What did work for me on Ubuntu was editing the file /usr/lib/unifi/data/system.properties and adding a line containing: unifi.xmx=512

By Robert, Friday 6 January 2017 11:58

Ik had al een Unifi manager draaien (v5.3.82) op een rpi-1 maar was daar nog niet echt tevreden over (langzaam en weinig geheugen vrij). Met behulp van deze blog heb ik de speciale armf java 8 versie erop gezet en heb ik de tip van Elect gebruikt om het geheugen verder te tweaken. Hij werkt nu supersnel en heeft minstens 100k meer geheugen vrij. Bedankt iedereen !

By Tweakers user praseodymium, Monday 5 June 2017 18:02

For Docker users, I have made an image available so that setup is even more straightforward: https://github.com/praseodym/docker-unifi-armhf :-)

Comment form
(required)
(required, but will not be displayed)
(optional)

Please enter the code from the image below: