Monday, December 8, 2014

How to set up a Linux (Ubuntu) Ubiquiti Unifi (Unifi 3.x, Ubuntu 12.04)

This is a summary of how to set up a Ubiquiti Unifi controller on a Ubuntu Linux box.

1) Install Ubuntu Server 12.04, during the install select "OpenSSH Server" so you can remote into the server with Putty.

2) Once the operating system is up and running, set up a static IP on the box.

          sudo nano /etc/network/interfaces

          Change this-
                    auto eth0
                    iface eth0 inet dhcp

          To your static ip-
                    auto eth01
                    iface eth0 inet static

          (You can omit the dns-search if you don't need a domain suffix,)

          Simply restart your server or you can restart the networking with this command-
                    sudo ifdown eth0 && sudo ifup eth0

3) Update the OS.
          sudo apt-get update

4) Update the sources.list to include the Unifi repository.
          Open the file-
                    sudo nano /etc/apt/sources.list

          Add the following line at the bottom of the file.
deb stable ubiquiti
 #OLD-             deb ubuntu ubiquiti

          Hit <Control> <X> to exit and <Y> to save.

          Add the GPG Key
                     sudo apt-key adv --keyserver --recv C0A52C50

          Update the OS again.
                    sudo apt-get update

5) Install Unifi using apt-get.
                    sudo apt-get install unifi

          If you want the latest version do-
                    sudo apt-get install unifi-rapid

6) If Unifi doesn't start and says "Cannot locate Java Home", do the following-
          Open the init script.
                    sudo nano /etc/init.d/unifi
          Look for the variable "JAVA_HOME" and change the path to include the -amd64.
                    Change- JAVA_HOME=/usr/lib/jvm/java-6-openjdk
                    To- JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
          Hit <Control> <X> to exit and <Y> to save.

          Attempt to start Unifi again.
                    sudo service unifi restart

7) Open the unifi controller by going to the IP of the box on port 8443 (with https:).


To upgrade to 5.0-
# out the old entry in /etc/apt/sources.list
deb unifi5 ubiquiti
apt-key adv --keyserver --recv C0A52C50
apt-get update
sudo apt-get install --only-upgrade unifi


  1. nice blog, Ubiquiti gives wi-fi products and Wi-Fi is a medium for electricity in today’s time. With the help of Wi-Fi, one can use the internet in every corner of their home with amazing speed and less expense compare to LANs. Routing is used to selecting a path for traffic in a network