How to Install Ubiquiti UniFi Controller 5 on the Raspberry Pi
Please share with your friends...
  • 176
  • 5
  • 2
  • 100
  • 37

⇐ BackPageNext ⇒


The next step is to install the UniFi Controller software.

  1. Add the UniFi repository to the sources list, using the following commands:
    echo 'deb stable ubiquiti' | sudo tee -a /etc/apt/sources.list.d/100-ubnt.list > /dev/null
    sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg
    sudo apt-get update
    In the first command above, the source name stable represents the current supported UniFi release. However, if you wish to use a different release, you may use one of the following source names:
    UniFi 5.6 = oldstable
    UniFi 5.7 = stable
    UniFi 5.8 = testing
  2. Install UniFi, using the following package install command:
    sudo apt-get -y install unifi

    The installation takes a couple of minutes to complete, but is fully automated and includes components such as MongoDB.

  3. Stop and disable the default MongoDB database instance, using the following commands:
    sudo systemctl stop mongodb
    sudo systemctl disable mongodb

    Without making this 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.

  4. On the Raspberry Pi 1 and Raspberry Pi Zero (W), which are both older ARMv6-based devices, UniFi Cloud Library support must be removed using the following command:
    sudo rm /usr/lib/unifi/lib/native/Linux/armhf/

    UniFi Cloud access is not supported on ARMv6-based devices, and the presence of this library will stop the UniFi software from starting on these devices.

  5. Once completed, reboot your Raspberry Pi using the following command:
    sudo reboot

    When the reboot is complete, proceed with the Setup Wizard.

    The UniFi service can take several minutes before it is ready to serve web pages after a reboot.

Setup Wizard

  1. Use a web browser to view HTTPS port 8443 on your Raspberry Pi:

    Replace <raspberrypi> in the above example with the IP address of your Raspberry Pi. The UniFi Setup Wizard page will be displayed.

    UniFi Setup Wizard: Welcome
    Thank you for purchasing UniFi, Ubiquiti’s Enterprise WiFi Solution. You will be able to setup your controller in a few minutes.
    Perform a clean installation

    If you building a brand new controller, you should perform a clean installation.

    1. Select your country and timezone, then click Next. The Configure devices page will be displayed.
      UniFi Setup Wizard: Configure devices
      Please select the devices you would like to configure.
    2. If you have any unmanaged devices on the network, you may select them here, then click Next. The Configure WiFi page will be displayed.
      UniFi Setup Wizard: Configure WiFi
      You may skip this step if you are not setting up any UniFi access points.
    3. Enter your new wireless Secure SSID and Security Key, then click Next, or click Skip to do this later. The Controller Access page will be displayed.
      UniFi Setup Wizard: Controller Access
      Please provide an administrator name and password for UniFi Controller access.
    4. Enter an Admin Name, Admin Email and Password for UniFi Controller access, then click Next. The Confirm page will be displayed.
      UniFi Setup Wizard: Confirm
      Please review the settings below. Once finished you will be redirected to the management interface.
    5. Review the settings shown, then click Finish. The Cloud Login Credentials page will be displayed.
      UniFi Cloud Login Credentials
      Please enter your account credentials.
    6. Enter your UBNT Cloud Username and Password, then click Enable Cloud Access – or alternatively click Skip to bypass cloud functionality.
    Restore from a previous backup

    If you are migrating to a new controller or recovering from a controller failure, you have the option of restoring your UniFi configuration from a previous backup.

    1. Click the restore from a previous backup link. Your web browser’s Open file window will be displayed.
      Open UniFi backup file dialog window
      Open file window
    2. Select your previously created UniFi backup file, and click Open. The UniFi Setup Wizard will begin Verifying the previously created backup file.
      Loading previous backup
      Verifying the previously created backup file
      Once the backup file has been verified successfully, a Restore From Backup? prompt will be displayed.
      Restore from backup confirmation
      Restore From Backup?
    3. Click Confirm. A message indicating that The system is being restored will be displayed.
      Please Wait: The system is being restored
      The system is being restored
    4. Click Close. You will be redirected to the Sign In page after approximately a minute.
    The Sign In page will be displayed.
    UniFi Sign In
    Sign In
  2. Enter your Username and Password, then click Sign In. The Dashboard will be displayed.
    UniFi Dashboard

The Ubiquiti UniFi Controller software is now installed and running on your Raspberry Pi!

⇐ BackPageNext ⇒

Please share with your friends...
  • 176
  • 5
  • 2
  • 100
  • 37
Tagged on:                                                         

8 thoughts on “How to Install Ubiquiti UniFi Controller 5 on the Raspberry Pi

  • 20/01/2018 at 11:23 AM

    Newer advice is that the “apt-key adv” command requires too much infrastructure and since the introduction of /etc/apt/trusted.gpg.d/ then gpg can be used directly; it works fine if instead of installing dirmngr and using apt-key adv, you use: gpg –keyserver –recv-key 06E85760C0A52C50

    • 18/02/2018 at 5:22 PM

      Hi John,
      Sorry for the late reply. Thanks for the information, I’ve tested and updated the guide to reflect this.
      Thanks again,

  • 29/01/2018 at 12:59 PM

    I followed the instructions and it was working great. I was able to get in and manage the controller several times. Suddenly The page will not load when I try to. ERR_CONNECTION_REFUSED

    Any ideas?

  • 08/02/2018 at 5:08 PM

    I learned the hard way you cannot run this on the wheezy build of raspbian.

  • 26/02/2018 at 7:45 AM

    I’ve installed the controller on my Pi 3 running stretch. Everything seems to go ok. I try to access the controller at port 8443 of my Pi and I get a “site cannot be reached”. Any tips on debugging this? Is there a way from the command line to see if the controller is running? Thanks!

    • 26/02/2018 at 2:18 PM

      I figured it out. I had another program that was using port 8080. I changed it to use 8081 and the UniFi Controller fired right up.

  • 28/03/2018 at 4:02 PM

    I’d like to install the unifi 5 controller on a armv5tel (armel) platform. what should I consider then? thanks!

  • 12/04/2018 at 3:49 PM

    instructions work like a charm for upgrading.


Leave a Reply