Use your Raspberry Pi as UniFi Controller

This guide will walk you through the steps to setup your Raspberry Pi into a UniFi Controller. This is a good alternative to using the UniFi cloud key, especially if you have a spare Raspberry Pi laying around.

What you need

Here are the tools you will need to create a UniFi Controller with a Raspberry Pi:

First, download the Rasbian Image – I’m choosing the “LITE” version since I won’t need to login to a UI as it is solely going to be a UniFi controller.

After you download the image, put the image on your MicroSD card with Rufus or WinDisk32Imager:

windisk32 raspbian

After that, create a file on the root of your MicroSD card called “ssh” without any extensions. This will allow you to SSH into your device and do a headless setup. No need to break out the HDMI cable, keyboard, and mouse.

After you connect your Raspberry Pi to your network, find the IP address of your Raspberry Pi with an IP Scanner, like Advanced IP scanner.

Then, using Putty, enter the IP address of the Raspberry and login.


The default username is “pi” and the password is “raspberry”

Now, I recommend setting your IP of your Raspberry Pi static. To do it, edit the file /etc/dhcpcd.conf as follows:

Type this at the command prompt:

sudo nano /etc/dhcpcd.conf

and then scroll to the bottom of the script and add the following lines:

interface eth0

static ip_address=
static routers=
static domain_name_servers=

This is my configuration, set yours. Choose the interface: eth0 for ethernet, wlan0 for Wi-Fi and change the values with those right for your network.

Install the software controller

Now let’s update and upgrade! This will refresh the repositories and upgrade your install:

sudo apt-get update && sudo apt-get upgrade
echo "deb trusty main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src trusty main" | sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver hkp:// --recv-keys EEA14886 
sudo apt-get update
sudo apt-get install oracle-java8-installer

Press OK followed by YES when prompted.

Next we finally get to install UniFi.

echo 'deb stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo apt-key adv --keyserver --recv 06E85760C0A52C50

You can copy and paste that link to avoid typos.  Finally, install UniFi by running the following commands:

sudo apt-get update
sudo apt-get install unifi

This will take a couple of minutes to complete, but once it has finished, UniFi is installed! 

Finally, to speed up UniFi a bit, it is recommended to install a package called haveged.  Install it with this command:

sudo apt-get install haveged

That’s it! You can now log in to your controller using that IP address for your Raspberry Pi.

Now all you need to do is to connect to the Controller via browser:


For instance, if your IP address is 111.222.333.444, you’ll type:


You need to sign up and set up the controller, then this will be the login page.

unifi controller login

After logging in it will be like this:

Unifi Controller Dashboard

This is the 5.9.29 version of the UniFi Controller.

You can also connect up your smart phone and use the UniFi SDN app – it works great!

Congratulations! You now have a hosted UniFi Controller.

Check out how to enable UniFi cloud access!

You can now manage your entire UniFi network with the controller. Pretty awesome, right?

Previous Entries How to Install and Use Netdata on Ubuntu Next Entries How to install MINIDLNA on Ubuntu