Thursday, August 23, 2012

Install Ubiquiti UniFi Controller on Ubuntu 12.04

Install MongoDB for Debian

Import 10gen public GPG key:

sudo apt-key adv --keyserver --recv 7F0CEB10

Add the 10gen repository to /etc/apt/sources.list:

sudo nano /etc/apt/sources.list.d/10gen.list

deb dist 10gen

sudo apt-get update

sudo apt-get install mongodb-10gen

Install UniFi Controller

Add the following line to the bottom of /etc/apt/sources.list:

sudo nano /etc/apt/sources.list

deb precise ubiquiti

If using a different version of Ubuntu replace "precise" with your Ubuntu distro (i.e. "oneiric" for Ubuntu 11.10).

Add GPG key:

sudo apt-key adv --keyserver --recv C0A52C50

Retrieve the latest package information:

sudo apt-get update

Install/Upgrade UniFi package:
unifi (the most stable), unifi-rapid (beta version intended for stable release), and unifi-beta (the cutting edge)
You can install / switch between releases.

sudo apt-get install unifi

The UniFi Controller should now be accessible from https://<server_ip>:8443/


  1. # Rewritten Howto to allow for... hopefully if everything goes well...
    # ... copying this into a shell script and executing with bash.
    # Here we do assume your using ubuntu precise,
    # if not, replace "precise" in the line for the ubnt apt source with your version name/
    # Rob McDonald - Level 2 Systems Limited - 021 902 929
    # Tested on ubuntu 12.04 precise
    # More comments than lines of code...
    # - - - - - - - - - - - - - - - - - - -- - - - - - - -

    # Add all the GPG keys at once...
    #Import 10gen public GPG key (for mongodb):
    sudo apt-key adv --keyserver --recv 7F0CEB10
    #Import Ubnt GPG key (... for unifi...)
    sudo apt-key adv --keyserver --recv C0A52C50

    # -----------------------------------------------------------------------
    # Add all the apt sources at once
    #Add the 10gen repository for mongodb
    sudo echo "deb dist 10gen" >> /etc/apt/sources.list
    #add the ubnt repository
    sudo echo "deb precise ubiquiti" >> /etc/apt/sources.list

    # update apt sources
    sudo apt-get update

    #install things...
    sudo apt-get install mongodb-10gen
    sudo apt-get install unifi

    #One could also install unifi-rapid for the beta intended for stable release
    # or one could install unifi-beta for a bit of cutting edge testing
    # -----------------------------------------------------
    # You'll find every tutorial tells you to manage unifi at this url https://:8443/
    # Note!! that its important to put in https:// otherwise your browser will most likely
    # try to connect without https as the non-standard port tricks it a bit...
    # enjoy copying and pasting blindly

  2. Worked perfectly first time. Thanks guys!

    On Linux Mint 14 ("Nadia"), use quantal instead of precise.