Turning a Raspberry Pi into a UniFi controller appliance (UniFi 4, Raspbian Jessie, Oracle Java 8) 
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.
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.
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:
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:
We'll also want to make sure all packages are up to date.
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:
Some additional packages will be installed, but that's fine. Now we're ready to install the UniFi controller itself.
Next, we'll need to pass it the UBNT public key (you can verify it here) for this repo:
Then we'll tell apt to update its index and install the unifi package.
Let's have a look at the output of the last command.
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.
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.
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.
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:
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:
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.
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.
Make the new user owner of the various directories the UniFi controller needs to be able to write to.
This tells which user to run the service as:
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.
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.
???? PROFIT!!!!
If things are not working for you, you should view the server's log file.
You can (and should) also verify the controller is running as the unifi user. The first column shows the name of the user.
Note that it also shows you it is using the Oracle 8 JVM and the lowered memory setting.
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.
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.- Setup and configure the Raspbian OS
- Install the dependencies
- Install the UniFi controller
- Modify the start script in order to use Oracle Java 8 instead of OpenJDK 7
- Configure the controller to run as its own user instead of as root
- 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.
???? 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.Turning a Raspberry Pi into a UniFi controller appliance 
Last updated: 25 september 2014
A few months ago, a hard-float version of the Oracle Java 7 JDK for Raspbian has been released, opening up lots of new opportunities for the Raspberry Pi platform. This blog post will show you how to turn the Pi into a wifi controller appliance for the - almost equally affordable - UniFi access points from Ubquiti, which are becoming increasingly popular.
I'll be using a Raspberry Pi, model B, revision 2.0 which has 512 megabytes of RAM available. Keep in mind that this is just a proof of concept. I have not tested the setup very thoroughly and running the UniFi controller software on Linux is not officially supported, as far as I know. That being said, I haven't ran into any problems yet.
Update 25 september 2014: I'm using the Raspberry Pi to control three UniFi access points for over half a year now and it seems to be rock-solid.

Screenshot of the UniFi controller web interface.
Raspbian setup
The first step in the process will be getting your Pi up and running with Raspbian. You can download an image on the Raspberry Pi downloads page. 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.Raspbian configuration
Now we still need to expand the filesystem to the size of the SD card, so we'll 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, 4MB would be more than enough. Reboot the device for the changes to take effect.
sudo reboot
Installing the UniFi software and its dependencies
The UniFi software package has two dependencies: Oracle Java, as stated earlier, and MongoDB. The Oracle Java 7 JDK is provided by the 'oracle-java7-jdk' package, which is installed by default on new versions of Raspbian. If you are not sure Java is installed on your device, just tell your package manager to deal with it.sudo apt-get update && sudo apt-get install oracle-java7-jdk
Now it's time to fulfill the second requirement, MongoDB. Normally, this would be quite a pain since the ARM platform is not supported by it. Fortunately, Per Ola Ingvarsson created a non-x86 version and put it online. Using this guide, you could compile it and move on. But it will take hours and hours on your Raspberry, so I'll be using the lazy approach and just fetch some precompiled binaries from GitHub, thanks to Brice Morin. If you're not experienced with compiling software, I'd recommend you to the same. Create the directory '/opt/mongodb', download the binaries (found in 'mongo/bin' in the GitHub repository) to it and make them executable.
sudo mkdir /opt/mongodb cd /opt/mongodb sudo wget https://github.com/brice-morin/ArduPi/blob/master/mongodb-rpi/mongo/bin/bsondump?raw=true -O bsondump sudo wget https://github.com/brice-morin/ArduPi/blob/master/mongodb-rpi/mongo/bin/mongo?raw=true -O mongo sudo wget https://github.com/brice-morin/ArduPi/blob/master/mongodb-rpi/mongo/bin/mongod?raw=true -O mongod sudo wget https://github.com/brice-morin/ArduPi/blob/master/mongodb-rpi/mongo/bin/mongodump?raw=true -O mongodump sudo chmod +x *
Finally, it's time to download the UniFi software. I'll be using version 2.4.6, which is available from this UniFi update announcement. You'll need to accept a license agreement, so I can't provide you with a direct download link. I downloaded the package on my desktop machine and transferred it to the home directory of the pi user using SFTP. Unzip the package and move the extracted directory into /opt.
unzip UniFi.unix.zip sudo mv UniFi /opt/UniFi
Next, we'll need to tell the controller software where it can find MongoDB. This is an easy one, as we'll only need to replace a symlink.
cd /opt/UniFi/bin sudo ln -fs /opt/mongodb/mongod mongod
At last, we're ready to fire up the controller!
sudo java -jar /opt/UniFi/lib/ace.jar start
Or start it in the background by running:
sudo java -jar /opt/UniFi/lib/ace.jar start &
If all went well, you should now be able admire the web interface of your super-awesome UniFi controller appliance through HTTPS on port 8443. To observe the log while the controller is running in the background, use:
sudo tail -f /opt/UniFi/logs/server.log
To stop the controller again:
sudo java -jar /opt/UniFi/lib/ace.jar stop
P.S. You're running server as 'root'. This won't be a good idea for production use, but using a Raspberry Pi for production will probably never be a good idea anyway. However, if you'd set permissions on the 'data' and 'log' subdirs of the UniFi directory, nothing would stop you from running the server as a different user.
Update March 15th, 2014: Running the controller on startup
To run the UniFi controller when the Raspberry boots, we'll need a startup script. Fortunately, there's a Debian package mentioned in the release announcement and this package contains such a script.By default, the script would assign a memory limit of 1024M to the controller, which I adjusted to 384M. I don't know yet if this would suffice, but it'll be easy to change anyway. I also changed the base dir path and the Java home.
So, create the file /etc/init.d/unifi with the following contents:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
| #!/bin/bash # # /etc/init.d/UniFi -- startup script for Ubiquiti UniFi # # ### BEGIN INIT INFO # Provides: unifi # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Ubiquiti UniFi # Description: Ubiquiti UniFi Controller ### END INIT INFO NAME="unifi" DESC="Ubiquiti UniFi Controller" BASEDIR="/opt/UniFi" MAINCLASS="com.ubnt.ace.Launcher" PIDFILE="/var/run/${NAME}/${NAME}.pid" PATH=/bin:/usr/bin:/sbin:/usr/sbin JAVA_HOME=/usr/lib/jvm/jdk-7-oracle-armhf # JSVC - for running java apps as services JSVC=`which jsvc` #JSVC_OPTS="-debug" JSVC_OPTS="${JSVC_OPTS}\ -home ${JAVA_HOME} \ -cp /usr/share/java/commons-daemon.jar:${BASEDIR}/lib/ace.jar \ -pidfile ${PIDFILE} \ -procname ${NAME} \ -outfile SYSLOG \ -errfile SYSLOG \ -Djava.awt.headless=true -Xmx384M" [ -f /etc/default/rcS ] && . /etc/default/rcS . /lib/lsb/init-functions [ -d /var/run/${NAME} ] || mkdir -p /var/run/${NAME} cd ${BASEDIR} is_not_running() { start-stop-daemon --test --start --pidfile "${PIDFILE}" \ --startas "${JAVA_HOME}/bin/java" >/dev/null RC=$? return ${RC} } case "$1" in start) log_daemon_msg "Starting ${DESC}" "${NAME}" if is_not_running; then ${JSVC} ${JSVC_OPTS} ${MAINCLASS} start sleep 1 if is_not_running; then log_end_msg 1 else log_end_msg 0 fi else log_progress_msg "(already running)" log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping ${DESC}" "${NAME}" if is_not_running; then log_progress_msg "(not running)" else ${JSVC} ${JSVC_OPTS} -stop ${MAINCLASS} stop fi log_end_msg 0 ;; status) status_of_proc -p ${PIDFILE} unifi unifi && exit 0 || exit $? ;; restart|reload|force-reload) if ! is_not_running ; then if which invoke-rc.d >/dev/null 2>&1; then invoke-rc.d ${NAME} stop else /etc/init.d/${NAME} stop fi fi if which invoke-rc.d >/dev/null 2>&1; then invoke-rc.d ${NAME} start else /etc/init.d/${NAME} start fi ;; *) log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}" exit 1 ;; esac exit 0 |
This script uses jsvc, which we'll need to install. Run:
sudo apt-get update && sudo apt-get install jsvc
Enable execution of the script and make it run at boot time:
sudo chmod +x /etc/init.d/unifi sudo update-rc.d unifi defaults
You can now start your controller using your new script, or just reboot your Pi.
sudo /etc/init.d/unifi start
Follow-up
Jimmy Selgen Nielsen wrote an excellent follow-up tutorial about running the controller under it's own user. It's really worth reading. You can find it here. (Update 28 april 2015: Link has been restored.)Setting up log rotation should not be necessary, as the UniFi controller has log rotation built in.
You might also want to hang onto this topic in the Ubiquiti forums.
T7 Tweaks Chrome-extensie v1.1
Zojuist heb ik een update van mijn Chrome-extensie uitgebracht. Deze extensie heeft als doel om de nieuwe versie van Tweakers.net iets gebruiksvriendelijker of bruikbaarder te maken voor de doorgewinterde Tweaker. Omdat iedereen zijn eigen voorkeuren heeft, zijn alle aanpassingen instelbaar. Je moet er natuurlijk wel aan kunnen blijven tweaken!
De belangrijkste verbetering is dat de extensie nu te installeren is vanuit de Chrome Web Store. Hierdoor is de omslachtige installatieprocedure overbodig geworden. Een ander voordeel is dat hiermee ook direct het automatisch updaten van de extensie geregeld is, zonder dat iemand daar last van heeft.
Overige verbeteringen
Klik hier om de extensie te installeren vanuit de Chrome Web Store.

De belangrijkste verbetering is dat de extensie nu te installeren is vanuit de Chrome Web Store. Hierdoor is de omslachtige installatieprocedure overbodig geworden. Een ander voordeel is dat hiermee ook direct het automatisch updaten van de extensie geregeld is, zonder dat iemand daar last van heeft.
Overige verbeteringen
- Submenu's boven de menubalk voor snellere navigatie.
- Mogelijkheid voor het verbergen van het blok 'IT Jobs' en 'Nieuwsbrief'.
- Terugplaatsen Meuktracker in rechterkolom op de frontpage.
- Inklappen Pricewatch-blok op de frontpage.
- Verbergen Facebook- en Twitter-button op de frontpage.
Klik hier om de extensie te installeren vanuit de Chrome Web Store.
T7 Tweaks Chrome-extensie v1.0
UPDATE - Er is nu een nieuwe versie van deze extensie beschikbaar, die te installeren is via de Chrome Web Store.
De nieuwe site van Tweakers.net riep bij velen gemengde gevoelens op. Zo ook bij mij: die nieuwe layout is toch wel erg wennen. Omdat de indeling van de frontpage niet echt naar mijn zin was, ben ik begonnen aan een kleine Chrome-extensie, die een en ander voor mij oplost.
De belangrijkste feature van de extensie is het terugplaatsen van de meuktracker op de frontpage. Het aantal items dat daarin verschijnt, is instelbaar per categorie. Ook kan het ding het Pricewatch-blok wat inkorten, en de links naar de Twitter- en Facebook-pagina verbergen. Zodra je die volgt heb je die buttons immers toch niet meer nodig.
De nieuwe site van Tweakers.net riep bij velen gemengde gevoelens op. Zo ook bij mij: die nieuwe layout is toch wel erg wennen. Omdat de indeling van de frontpage niet echt naar mijn zin was, ben ik begonnen aan een kleine Chrome-extensie, die een en ander voor mij oplost.
De belangrijkste feature van de extensie is het terugplaatsen van de meuktracker op de frontpage. Het aantal items dat daarin verschijnt, is instelbaar per categorie. Ook kan het ding het Pricewatch-blok wat inkorten, en de links naar de Twitter- en Facebook-pagina verbergen. Zodra je die volgt heb je die buttons immers toch niet meer nodig.
Screenshots
Downloaden
Voor de nieuwsgierigen is de extensie hier te downloaden. Om hem te installeren ga je vervolgens naar de url chrome://extensions, zet je daar de ontwikkelaarsmodus aan, en sleep je het gedownloade crx-bestaand in die pagina. Als je de ontwikkelaarsmodus niet aanzet, zal Chrome zeggen dat je alleen extensies uit de web store kan installeren.En kan je dan ook niet gelijk even die advertenties uit de frontpage slopen?
Nee, naast het feit dat dat in de voorwaarden van de site verboden wordt, zijn die advertenties voor Tweakers.net een bron van inkomsten en dat respecteer ik.IE6Bar v1.3
In een eerdere post heb ik IE6Bar geïntroduceerd. Dit is een scriptje dat een waarschuwing geeft, wanneer een bezoeker op de website nog Internet Explorer 6 gebruikt. Met het script kun je aangeven dat je website de sterk verouderde browser niet meer ondersteunt.
Met de vandaag vrijgegeven v1.3-update wordt onder meer een vervelende bug verholpen. Door deze bug werden de browserlogo's niet getoond, wanneer het script vanuit een subdirectory (en niet vanuit de site root) werd aangeroepen. De logo's worden nu geladen vanuit de css-file, met behulp van relatieve paden, waardoor dit probleem niet meer optreedt.
Daarnaast heb ik een nieuw build script geschreven, waarmee de css en javascript samengevoegd. Het script maakt gebruik van de library CssMin om de stylesheet te comprimeren en de JSMin+-library doet hetzelfde met de javascripts.
De build tool is ook opgenomen in de source package en in de Mercurial-repository die eveneens sinds vandaag beschikbaar is op de Google Code-site.
Met dank aan Shadow en afraca voor de suggesties en natuurlijk aan crisp, voor het ontwikkelen van JSMin+.
Met de vandaag vrijgegeven v1.3-update wordt onder meer een vervelende bug verholpen. Door deze bug werden de browserlogo's niet getoond, wanneer het script vanuit een subdirectory (en niet vanuit de site root) werd aangeroepen. De logo's worden nu geladen vanuit de css-file, met behulp van relatieve paden, waardoor dit probleem niet meer optreedt.
Daarnaast heb ik een nieuw build script geschreven, waarmee de css en javascript samengevoegd. Het script maakt gebruik van de library CssMin om de stylesheet te comprimeren en de JSMin+-library doet hetzelfde met de javascripts.
De build tool is ook opgenomen in de source package en in de Mercurial-repository die eveneens sinds vandaag beschikbaar is op de Google Code-site.
Met dank aan Shadow en afraca voor de suggesties en natuurlijk aan crisp, voor het ontwikkelen van JSMin+.
Changelog
Released on September 24, 2010.- Mercurial repository with source is available now.
- New build tool for easier development.
- Fixed a major bug with browser logos not displaying when calling the script from a subdirectory of the webroot.
- Renamed the configuration option textIE to txtIE.