Installing Ubiquiti UniFi Controller 5 on Raspberry Pi

Installing Ubiquiti UniFi Controller 5 on Raspberry Pi
Please share with your friends...

The Ubiquiti Networks UniFi Controller enables administrators to instantly provision and configure thousands of UniFi APs, allowing for quick, simple management of system traffic. A single UniFi Controller can manage multiple sites: multiple, distributed deployments and multi-tenancy for managed service providers.

This post describes how to install the UniFi Controller software Version 5 on Raspberry Pi.

The instructions in this article have been tested with Raspbain Jessie (April 2017), UniFi 5.4.15, and UniFi 5.5.11.

This article supersedes my previous Installing Ubiquiti UniFi Controller 4 on Raspberry Pi guide. For specific instructions on how to upgrade your UniFi Controller software from Version 4 to Version 5, please refer here.

The UniFi Controller and mFi Controller software can co-exist on the same Raspberry Pi, however, you must be using Java 7 (default) and not Java 8.


The Shortlink to this post is

If you found this post helpful or useful in some way, please help me by doing the following:

  • Leave a Comment in the Discussion Forum for this post;
  • Like or link to this post from your favourite social media platforms;
  • Click our advertisers banners;
  • Make a Paypal Donation;
  • Leave a Reply below.
Thank you!


⇓ LastPageNext ⇒

Raspberry Pi is a trademark of the Raspberry Pi Foundation.

Disclaimer: No liability is accepted (whether under the law of contract, the law of torts or otherwise) in relation to the contents of, or use of, or otherwise in connection with, this website to the extent that the website is provided free-of-charge, for any direct loss; for any indirect, special or consequential loss; or for any business losses, loss of revenue, income, profits or anticipated savings, loss of contracts or business relationships, loss of reputation or goodwill, or loss or corruption of information or data. These limitations of liability apply even when expressly advised of the potential loss.

Please share with your friends...


  1. Hi, I did several attempts to insert unifi controller on raspberry but I did not succeed, you could wrap my img file on your microsd.
    Thank you

  2. The controller works, but it is REALLY slow (the web interface), and also the “java” process takes up ALL cpu. Running on a RPi3

  3. This works great with a new Pi3b and 32 GB MicroSD Card. I have it rebooting at 3 am. I also have it running Steve Jenkins’ with a modification of using bash instead of sh to reboot all the AP’s at 4 am. Thanks for a GREAT howto.

  4. Thanks very much! Just got this setup on my Pi 3 running alongside Pi-Hole without issue. Very simple guide to follow and no problems getting it up and running!

  5. Hi,
    tried your guide on a Pi3. Everything installs fine. But unifi server won’t start. With netstat I can see there’s no open port 8443 and with “ps aux | grep uni” I couldn’t find a process like unifi. Any idea?

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

    sudo service unifi start

    ..would do it.

  7. Really a nice guide, helped me running the UniFi controller in a Pi for about a year now. Since I had the Pi running for my home automation anyways that was my first choice. However due to some performance “problems” I finally bought a UniFi CloudKey last week. Better should have done this from the beginning – works flawlessly, very good performance, no need to worry about updates or Java… could have saved me a lot of time and from my point of view is worth the few extra $ compared to the Pi. Just my 2 cents.

  8. @richyread, the performance on the Zero W was perfectly acceptable. With the Zero W running htop, I could see the CPU ramp up to 100% when I was going through the menus of the controller but once it settled, it worked perfectly.
    I moved it over to a Pi2 though and that’s a lot snappier than the Zero, as to be expected.

    As an aside, I had to remove the UniFi Cloud Library on my Pi2 otherwise it wouldn’t start – The instructions only mention doing this on the Pi1 / Zero but I can confirm it’s needed on the Pi2 as well.

    1. Hmm – I must have a particularly dusty Pi/the extended stay in the drawer hasn’t done it any good 🙂

      I had it running for around 48hrs and it was regularly locking up and loosing the connection to the AP [it would be highlighted red in the display] resulted in SSH for a reset and back to the iOS app for the time being.

      Thanks for the feedback on the Zero – being the squeaky guy that I am, I’d hoped that the Zero W would be good enough, but I think it’s probably better to stretch out for the Pi 3 to be certain it runs well.

      Now all I need is to convince my better half that we ‘need’ (yet) another mini computer in the house..!! 🙂

  9. Firstly thank you very much for this guide; I’m new to the UniFi products and the controller so your guide here was very helpful in getting my setup sorted 🙂 !

    @Keith I have the controller running on an original (very dusty) Pi B board that I had at the back of my drawer. Whilst it is working, it is very slow to respond to commands/refresh etc.

    Would the Zero W board be an inexpensive upgrade for me?


  10. Following on from my previous comment, I’ve set this up on a spanky new Raspberry Pi Zero W now and it’s working perfectly. It takes a while to be able to access it when it first boots but after that, it’s performing well.

    Interestingly, I have a Netgear D7000 router and a Ubiquiti AP-AC-LR. The Pi Zero is sitting quite literally next to the Netgear (and powered from the Netgear USB port) but rather than connect to the Netgear, it’s attached itself to the Ubiquiti which is right over the other side of the house.

  11. I’ve followed this guide many times before, and it always seems to work. However, I always run into an issue whenever I update/upgrade the pi through SSH. Afterward, I’m never able to access the controller at https://:8443 This time, I’ve even tried a complete uninstall and reinstall following the guide to be able to view it, but I’m still unable to view it. Help anyone?

  12. First off, thanks for the tutorial, very clear, very quick to get up and running. I started off with a Pi1 and it was borderline unusable. Very slow, CPU usage breaking 95% trying to do anything. Upgraded to a Pi3 this weekend and it’s a night and day difference. Very responsive and completely usable.

    To answer @Keith’s question above re: why bother with a Pi when you have a PC anyway… one word; Java. Java is a dumpster fire that’s not allowed anywhere near my desktop. It’s great to have it contained to the Pi. Joking aside, to your point, you can indeed use a PC and just fire it up when you need it. Doesn’t need to be running all the time.

  13. Consider changing the max memory allocated to the JVM – by default it’s 1024M, which is more than available on RPI3. The setting is called JVM_MAX_HEAP_SIZE in /usr/lib/unifi/bin/unifi.init

  14. Great tutorial, controller works good, a bit slowly. Controller 5.3 is now running for 1 week on my RPI 1 model B with a fresh installed raspbian jessie. Imported the settings succesfully from controller (version 4.8) which was runnning for 1 year on my windows laptop. Thank for this tutorial!!

    The controller is controlling my 2 UniFi AP-AC-LR access points.

  15. There’s a lot of comments here regarding various versions and different things that need to be done.
    I have a RPi2 which is already running as a Pi-Hole and with Transmission seeding one torrent (homebrew pi image) via public trackers.

    It’s barely ticking over.

    I have one UniFi device on my network, a UniFi AP-AC-LR. I don’t have a controller running all the time at the moment, I only open it if I want to check something. I am finding that wireless through the UniFi AP-AC-LR can be a little flakey, sometimes things are slow through it, sometimes I have to reboot it. It’s connected via an unmanaged HP Procurve 1410-8G switch (with a poe injector) into a Netgear D7000 router.

    What are the benefits of installing the controller on my RPi2 rather than just starting it on my main PC when I want to look at/reset the AP-AC-LR?

    What steps are different from the instructions that I should do if I want to go down this path as I see lets of recommendations for different versions of various packages to install.



  16. Just finished this install on a new RPi 3, tried adding two new UAP`s. Both are stucked in “adopting” state. They are in the same switch as the RPi. Unifi reads the uptime and IPadress of the APs, so communication must be working.

    1. I had the same problem
      You have an other service running on port 8080

      Change the port 8080 to 8083 in \var\lib\unifi\

  17. Redid from disk image and followed guide and did the snappy Java (thought I had before) and not is working so thanks for the information and the fast response. As an aside, any experience with the camera’s? I have clients wanting Meraki features but without Meraki price. Ubnt seems to do a great job with gear and features but the absence of real support (explains cost difference) is always an issue for them.

    Thanks again.

  18. If you are experiencing issues regarding cloud access with an RPi2 or RPi3 (“Cloud access is not compatible with this OS architecture”) just go ahead and use snappy-java- instead of 1.1.3! Of course, you could just leave the original snappy-java but it is better to use a newer version.

    cd /usr/lib/unifi/lib
    sudo mv snappy-java-1.0.5.jar snappy-java-1.0.5.jar_orig
    sudo wget
    sudo ln -s snappy-java- snappy-java-1.0.5.jar

    Another thing is the Java version. You needn´t switch to v8 anymore as it is enabled by default on current UniFi5 versions. Just install UniFi, disable the default mongoDB database and update the snappy-java version and you´re all set up.

    1. Thanks for the info Dominik, I have done a quick update for the Snappy Java instructions, but I plan to do a full refresh of the guide this week.

  19. New install on RPi 3 B and everything works up to the registration with the Ubnt cloud where I get: An error occurred. Cloud access is not compatible with this OS architecture.

  20. @Malaka

    Run df -h and see how much space you have left on your SD Card, you may be running out of space.
    I had a similar issue, moved up to a larger SD card and reinstalled a fresh copy of Jessie with Pixel, and I’ve been grand since.

  21. Hi Mate,

    I’m getting below error for mangoDB

    pi@UniFiCon /opt $ sudo apt-get install unifi -y
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    unifi : Depends: mongodb-server (>= 2.4.10) but it is not installable or
    mongodb-10gen (>= 2.4.14) but it is not installable or
    mongodb-org-server (>= 2.6.0) but it is not installable
    E: Unable to correct problems, you have held broken packages.

    any idea ??


  22. Hi, thanks for the tutorial. I installed it the on a RP1 and it installed version 5.3.8, which I was able to gain cloud access through I then did another fresh install yesterday but since then the controller software has been updated to version 5.4.9 which was installed but it does not allow cloud access from a RP1. The cloud access area in controller was explicit in prohibiting cloud access as it was “not compatible with the OS architecture”. How can I downgrade to 5.3.8 using SSH please? Thanks

  23. Hi Chris

    Very nice guide saved me a lot of time!

    Quick question how often would you recommend updating controller software? and any plans to include library removal step in your guide ?


  24. Thanks, looks like a great guide, and I plan to order a pi to get this up and running. One question – does the cloud access option work on the pi so I can link it to the ubnt site to access remotely? I’ve read some sites that imply it doesn’t, and some that it does!

    1. Hi Chris,

      I haven’t tried using the UniFi Cloud myself, however, I do know that the UniFi Cloud Library is definitely not compatible with the ARMv6-based Raspberry Pis (Raspberry Pi “1” and Raspberry Pi “Zero”) and has to be removed before the UniFi software will actually start on those devices. This is probably what you are referring to. But I’m not aware of any problems with Raspberry Pi 2 or 3 though.

      Thanks for your comments 🙂

      Kind Regards,

  25. on a pi3, I had to set JAVA_HOME=/usr/lib/jvm/java-8-oracle for things to work with the latest beta v5 controller. Seems nice and responsive in minimal testing even also running pihole on the same box. My hardware arrives tomorrow and the next day so I’m anxious to get going ! Thanks for a nice procedure.

  26. Hi,

    Working fine, till….. the AP will not be adopted.. On windows controller it work well.. Do you know what happens? De AP and the raspberri controller are connected to the main switch/router directly without any other switches on the floors in the building. The Ap receives a IP adress, the controler can see it, but the adoption is not working. After a while, 1 minute, the controller said: no connection; after that, adopting…

    firewall issue?

  27. Great guide Chris – thanks.

    I just followed the guide on a brand new SD card & download of Jessie Lite. All the latest patches & firmware installed OK. All good until the command to copy the Unifi service controller template. Command:

    sudo cp /lib/systemd/system/unifi.service /etc/systemd/system/

    …results in the error

    cp: cannot stat ‘/lib/systemd/system/unifi.service’: No such file or directory

    …and a check of the file system confirms that the template is not present in the lib/systemd/system directory

    Any ideas?



  28. Awesome guide. Best on the net as of Dec 2016. Just installed on a “Model B Rev 2”. I did not notice the rpi1 notes until after 4 installs and a few days of fighting with it :-(. At some point with out doing these steps specific to the rpi1, I thought I had it running, but obviously it was a fluke and was short term untsable. Thanks again, one wonders why the company doesnt support this better as rpi is natural controller.

  29. Hi,

    I tried this procedure and it worked initially. I then installed a plex server on my Raspi3. For some reason now, I can’t fire up the web interface and I’m not sure where to check for the reason! Port 8443 is not opened by the app, everything seems properly installed. My plex server works, but the Unifi controller doesn’t. Any ideas??


  30. I’ve been running the UniFi controller on a RPi2+ for about a year following these instructions (currently version 5.2.9) and it’s been very reliable. What are the advantages of switching to Java v8 from v7? v7 works ok, but it’s a bit slow and uses quite a bit of CPU and memory – would moving to v8 improve things?

  31. Hi, the unfi controller was run perfectly, but now i have a problem.

    Sun Nov 20 21:28:32.833 [initandlisten] MongoDB starting : pid=7194 port=27117 dbpath=/usr/lib/unifi/data/db 32-bit host=raspberrypi
    Sun Nov 20 21:28:32.833 [initandlisten]
    Sun Nov 20 21:28:32.833 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
    Sun Nov 20 21:28:32.833 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with –journal).
    Sun Nov 20 21:28:32.833 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off.
    Sun Nov 20 21:28:32.833 [initandlisten] ** See
    Sun Nov 20 21:28:32.833 [initandlisten]
    Sun Nov 20 21:28:32.833 [initandlisten] db version v2.4.10
    Sun Nov 20 21:28:32.833 [initandlisten] git version: nogitversion
    Sun Nov 20 21:28:32.833 [initandlisten] build info: Linux bm-wb-03 3.19.0-trunk-armmp #1 SMP Debian 3.19.1-1~exp1+plugwash1 (2015-03-28) armv7l BOOST_LIB_VERSION=1_55
    Sun Nov 20 21:28:32.833 [initandlisten] allocator: system
    Sun Nov 20 21:28:32.833 [initandlisten] options: { bind_ip: “”, dbpath: “/usr/lib/unifi/data/db”, logappend: true, logpath: “logs/mongod.log”, nohttpinterface: true, port: 27117 }
    Sun Nov 20 21:28:32.857 [initandlisten] ace_stat Assertion failure isOk() src/mongo/db/pdfile.h 392
    Sun Nov 20 21:28:32.863 [initandlisten] exception in initAndListen: 0 assertion src/mongo/db/pdfile.h:392, terminating
    Sun Nov 20 21:28:32.863 dbexit:
    Sun Nov 20 21:28:32.863 [initandlisten] shutdown: going to close listening sockets…
    Sun Nov 20 21:28:32.863 [initandlisten] shutdown: going to flush diaglog…
    Sun Nov 20 21:28:32.863 [initandlisten] shutdown: going to close sockets…
    Sun Nov 20 21:28:32.863 [initandlisten] shutdown: waiting for fs preallocator…
    Sun Nov 20 21:28:32.863 [initandlisten] shutdown: closing all files…
    Sun Nov 20 21:28:32.864 [initandlisten] closeAllFiles() finished
    Sun Nov 20 21:28:32.864 [initandlisten] shutdown: removing fs lock…

    du you know what the problem can be?

  32. andres mora’s link fixed my issue with the SSL error, thank you.

    Now I’m on to another issue. I cannot get the system to enable Cloud Access, keep getting this: There was an error checking credentials. Unable to connect to UniFi cloud. Please check your network connection, and try again.

    I have a believe that it’s related to Java on Ubuntu MATE on the RPI3. Any thoughts? I’ve even chatted with UniFi support, no help.

  33. Thank you so much Chris. Primarily for the hack to use Java 8, I tried to use 7 and it was excessively slow all around and over the weeks I was using it, the memory usage skyrocketed.

    No issues with Java 8 so far.

  34. I’m not very good with Linux but your step by step and explanations made this a HUGE help. UniFi is now running on my Pi that I will have on my network when needed. Thank you so much for the walk through.

  35. Looks like MongoDB is no longer available for 32bit CPUs. Do you have a workaround for the non-installable mongodb when tring to use the automated install?

  36. Took longer to download the packages than do the rest of the setup! Just put it on a Pi3 that I already had running some small things, so it worked out perfect! Thanks!

  37. Hi guys,
    Could anyone help me please? I don’t know what I have done wrong.

    echo ‘deb unifi5 ubiquiti’ | sudo tee -a /etc/apt/sources.list.d/ubnt.list > /dev/null

    sudo apt-key adv –keyserver –recv C0A52C50

    sudo apt-get update

    After I execute sudo apt-get update

    I get this error back

    E: Type ‘sudo’ is not known on line 1 in source list /etc/apt/sources.list.d/ubnt.list
    E: The list of sources could not be read.

    I try so many things. I don’t know what to do now. Really stuck

    Thank you so much for your help

  38. These instructions worked perfectly on an OrangePI PC running Armbian Jessie server 3.4.112-sun8i to run UniFi 5.2.9….

    Nice $17 + spare Microsd card controller.

    Thanks for the instructions.

  39. I may have figured out the problem with my last post.

    In trying to migrate form my current version, 5.3.4 beta, I installed this dep package.
    When I couldn’t get it to work I un installed it and followed your instruction using the apt-get method, however by installing the deb package using dpkg it broke something.

    After a clean install and following your steps it works however I need to somehow get 5.3.4 to work.

    Any ideas?

    1. Hi Aaron,

      I’ve been looking at this just now, and I think I know the problem. Try following the additional steps for the RPi1, specifically the steps for updating the Snappy Java Library. I think this now effects the RPi2 (is that what you are using?)

      Let me know if that fixes your problem,
      Kind Regards,

  40. HI
    I have followed your instructions as far as I can tell ant everything seems to install and run.

    The UniFi service says it is running however when I go to the address in a browser I cant connect “Cant establish connection to server”

    I did a netstat and it shows the only port in use is 22 for SSH

    root@Unifi_Controller:~# netstat –tcp –listening –programs –numeric
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0* LISTEN 728/sshd
    tcp6 0 0 :::22 :::* LISTEN 728/sshd

    Any ideas?

  41. Great article! Thank you for keeping the article updated.

    I had one issue. The UniFi AP did not find the controller before I did factory reset on the UniFi AP. After factory reset and adaptation I restored the settings from a backup.

    Thanks again Chris!

  42. Hi Chris, thanks for the reply, that all worked perfectly. Wireless AP adopted quickly and not more 100% cpu on the zero. Thanks.

  43. Followed the guide and installed on a Pi Zero. All went well but CPU utilization hits 100% and the Unifi Web interface become unresponsive. Any ideas why, is the Pi Zero just not powerful enough?

    1. Hi Mat,

      Try following the extra steps for the RPi1 on Page 3, which removes the UniFi Cloud Library and updates the Snappy Java Library. I suspect this should fix your problem running UniFi on the Pi Zero – let me know how you go.

      Kind Regards,

  44. Chris, I’m having an issue updating my UNIFI from 5.07 to the latest update. In the past I had no issues updating it here is a brief log of the error I’m seeing. Not sure how to fix this..

    (Reading database … 31880 files and directories currently installed.)
    Preparing to unpack …/openjdk-7-jre-headless_7u101-2.6.6-2~deb8u1+rpi1_armhf.deb …
    Unpacking openjdk-7-jre-headless:armhf (7u101-2.6.6-2~deb8u1+rpi1) over (7u95-2.6.4-1~deb8u1+rpi1) …
    Preparing to unpack …/unifi_5.2.7-8740_all.deb …
    Previous setting (UniFi 5.0.7) is found.
    dpkg: error processing archive /var/cache/apt/archives/unifi_5.2.7-8740_all.deb (–unpack):
    subprocess new pre-installation script returned error exit status 2
    abort-upgrade: please reinstall previous version

    sudo apt-get install –reinstall unifi=5.0.7-8593

    dpkg: error while cleaning up:

  45. @Grewterd I upgraded my WORKING Unifi 4.8 install yesterday to v5 on my RPi 3 Ubuntu Mate.

    Same error as you – can’t figure it out!

  46. Has anyone had success with this using Ubuntu MATE 16.04 on RPi 3? UniFi installs fine, but when trying to reach the page I get SEC_ERROR_INVALID_ARGS from Firefox and “This site can’t be reached” from Chrome. What gives?

  47. Just one more thing Chris, I am running the Controller on my Raspi 2. Is it possible to run the iOS App in Controller mode? The Raspi is in the same local network, but when I try logging in with the IP Adress (using the same credentials that I use for the web browser) it says not found and I can’t access to it. Any suggestions?

  48. Hi Chris, you are my hero! Thank you so much for your tutorials and all that work you put into it, I am an absolute newbie on Terminal stuff and following and copy pasting your guides has saved me like a million years time! Please keep up the good work and I’d like to thank you particularly for the Unifi Controller Tutorial

  49. Thank you for this guide, which finally helped me get the controller running on my RPi 1. Just two suggestions for changes (perhaps improvements):

    When using Oracle JDK 8 instead of duplicating the whole systemd service file it suffices to create a file called “/etc/systemd/system/unifi.service.d/jdk-8-oracle.conf” with the following content:

    Moreover instead of changing the /etc/mongodb.conf file, it suffices to do
    echo ENABLE_MONGODB=no > /etc/default/mongodb
    to stop loading the default instance of mongo on startup.

    I believe those changes to be less intrusive and more resistant to overwrites by update.

    Cheers, Fabian

  50. I am doing an exact copy paste and still getting a mongodb error.

    :~ $ sudo apt-get -f install unifi -y
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    unifi is already the newest version.
    You might want to run ‘apt-get -f install’ to correct these:
    The following packages have unmet dependencies:
    unifi : Depends: jsvc but it is not going to be installed
    Depends: mongodb-server (>= 2.4.10) but it is not going to be installed or
    mongodb-10gen (>= 2.4.14) but it is not installable or
    mongodb-org-server (>= 2.6.0) but it is not installable
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

    1. Hi Shadowed,

      What release of Raspbian are you running? I haven’t seen these sorts of errors since Raspbian Wheezy. You should be using the latest Raspbian Jessie release.

      Kind Regards,

  51. First of all, thank you for this fantastic guide. Did it without any problems all tho I am a complete Linus Noob.
    I do have one question anyway:
    Is the Controller automatically started when I start the Pi? If not, how can I put it into the autostart?

    1. Hi Flo,

      Yes, UniFi will automatically start as a service when you start your RPi – so you don’t have to do anything.

      Thanks for using my guide! 🙂

      Kind Regards,

  52. Simple & easy to follow instructions, install on an RPi 3 and everything went swimmingly.

    One minor issue is when I upload the image of my site plan it isn’t being displayed on the map. I suspect it’s a permissions thing, but will need to do some troubleshooting.

  53. This is a great manual! it did work like a charm until i stupidly forgot the password of unifi controller software… I am still able to log on to the raspberry. Is there a way to reset the unifi controller software to default without installing the raspberry all over again?

    Thanks in advance for any help…

  54. Hard work to get it running under pi1: the last thing before reboot is: sudo apt-get update && sudo apt-get install java-package && exit

    after that mine is working at last

  55. I was able to directly make the port change in the habridge config file and now everything works swimmingly. Thanks for the help!

  56. Had this working on my Rpi3. Installed another Java service that required JDK 1.8, so I added the JAVA HOME environment label to utilize the Java 8 I have installed. The server runs, but I can not access the webpage on port 8443. I have Java version indicated below. When I stop the other service, I can access the Unifi Controller. Can you have two java dependent services running and accessible at the same time?

    java version “1.8.0_101”
    Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
    Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode)

    1. Hi Scott,

      There should be no problems running two (or more) separate Java-based services on your RPi3. To me, this seems more like the second service is conflicting somehow with the UniFi webserver – have you made sure the second service isn’t trying to use some of the same ports as UniFi?

      Kind Regards,

    2. The other service is the habridge for connecting my Echo and Vera home automation system and runs on port 8080. I wouldn’t think there to be a conflict as they are accessed on different ports, but could there be some other type of conflict causing only one of these services to be accessed at the same time?

    3. Hi Scott,

      Actually Unifi also uses port 8080 for it’s Inform (device auto-enrolment) service – so I’d say that would be your problem. It is possible to change this in UniFi, but really not recommended as you will have problems with devices not contacting your controller. For a list of ports used by UniFi, see here.

      However, it looks like it’s easy enough to change the default port used by ha-bridge, by just using the -Dserver.port=<port number> parameter.

      Hope that helps,

    4. Thanks for looking into it and for the extra info on the Inform port requirements. I’ll try changing the port on the habridge and see where it gets me. I’m rather new to all of this, so it may take me some time to figure out where to stick the bit of code you supplied. I’ll figure it out though – that is half the fun!

  57. Hi Chris,
    thanks a lot. It worked. I used the commands

    echo ‘deb unifi5 ubiquiti’ | sudo tee -a /etc/apt/sources.list.d/ubnt.list > /dev/null

    sudo apt-key adv –keyserver –recv C0A52C50

    sudo apt-get update

    sudo apt-get install unifi -y

    and after a reboot the Unifi 5 desktop shows up. The AP updated successfully so everything is fine now.
    Thanks again

  58. Hello,
    I have been running unify controller on my pi 2B for a while without touching it. Today I first stopped the unify service, performed the update command “sudo apt-get install unifi -y”, restarted the pi and… the pi updated only to version 4.8.20. Do I have to manually install something to get version 5.x? After the update to 4.8.20 all two AP successfully updated to which was included in the controller update.

    Thanks for your help

    1. Hi Michael,

      Yes, you need to update the UBNT sources list to use the unifi5 repository. Have a look at this page of my UniFi 4 guide.

      Hope that helps,

  59. Hi Chris,

    thank you very much for your step by step guide. Really easy to follow and understand.
    I just followed your guide to install UniFi on a Raspi 1B (Rasbian Jessie lite, including the cloud and java fix).
    Unforunately I have the same issue, Max formerly had: installation went fine, no issues at all. But I don´t get connerction to port 8443 at all.

    Do you have any idea how I can fix this (or find the Problem)?

    Thank you in advance

  60. Thanks for this. Super helpful. I installed it on an original Raspberry Pi, so it’s a bit slow to get started. Readers installing it on similar devices would do well to bear this in mind. It may be helpful to note that the server creates log files in /var/log/unifi. server.log appears first (from which I was able to discern that it was spending considerable time generating a certificate on first startup)and then a mongod.log will appear shortly before the device becomes accessible from the web browser.

  61. Does anyone know the default username/password for ssh’ing into unifi pi loaded
    with the iso form this site from 2 years ago. I think ver 3.10

    1. Hi Richard,

      Unfortunately I have never provided an ISO of the Unifi for Raspberry Pi, just the instructions – so I can’t help you out with the SSH credentials. Try searching the UBNT forums – possibly this thread.

      Kind Regards,

  62. Hi Chris,

    First I want to say thanks for such great detail on installing the Unifi Controller ( version 5) on the Pi 3…worked great.
    I now want to get brave and try the latest beta release , I think it’s version 5.2.2 . Could you walk me through updating my resource list to allow installation of the beta controller(s)
    I am somewhat new to to the Pi3 / linux , so detail is really helpful. I am running Raspian Jessie on my Pi3.

    Thanks again,


  63. Hi Chris,

    I’m really getting a big itch now I see that java is being used… In my believes it’s the worst product ever made, but that’s not something you can solve… 🙂

    Do you have any clue (yes, I have a pi 1) why the cpu of the pi is non-stop being “strangled” by this java crap? The cpu is running at 100% non-stop…

    Thanks for your reply!
    Kind regards,

    1. Hi Erwin,

      Yes, I’m not a big fan of Java either!

      Just to confirm, have you performed the two additional steps required for UniFi on the RPi1?

      Remove the UniFi Cloud Library; and
      Update the Snappy Java Library.

      Kind Regards,

  64. Hey Chris,

    i don’t know why, but it is working now. I tried it a few more times yesterday and now I am able to connect to the UniFi webinterface. Everything works fine for now. Configuration, Responsiveness of the WebUI, etc. Thanks for that.
    Oh.. and by the way: I only managed to get the UniFi App (iOS /Android) working while using the Cloud Service… When I try it via IP locally the app can’t communicate with the controller.


  65. Hello,

    Is it possible to install Pi-Hole alongside the Unifi Controller, will there be any compatibility issues in doing so.

    By the way great guide, works perfectly.

    1. I hadn’t heard of Pi-hole before, but I don’t expect there would be any compatibility issues with UniFi. Although UniFi runs its own web server, it does not operate on the standard http ports. From what I gather Pi-hole uses Nginx, and I know that UniFi and Nginx can co-exist quite happily together.

      Kind Regards,

  66. Hey,

    thank you for these instructions. I tried to install this today on a new installation of Raspbian on the Pi2. Installation went fine, no issues at all, but I am not able to open the WebInterface / UniFi Interface.
    Even on the pi itself (https://localhost:8443) i am not able to connect even after several reboots and 30min after boot.

    I simply have no idea why it is not working. Are there any logfiles I can open to solve the issue?


    1. Hi Max,

      This is very unusual. Which versions of Raspbian, Java and UniFi? It could be a problem with the MongoDB instance.

      Kind Regards,

  67. Hi all,

    I installed it on my Raspi 2, have no chance to configure it. The UI loads 5-6 minutes after restart and loading takes 2-3 minutes. Import a 5.07.unf takes a long time and does nothing.
    Reinstalled 5x, allways the same effect. Whats wrong?
    “Top” displays 100% java load.

    Please help

    1. Hi SAl,

      Yes, the UniFi app works for me on Android to a RPi controller – although the “Search” button doesn’t seem to work.


  68. Great guide and many thanks!

    But i am seeing a very slow UI after this upgrade, anyone solve that yet?

  69. Hi Chris,
    thanks for the great step-by-step. I have one issue that keeps coming up, as soon as I connect my AP’s to the network my Pi shoots to a 1.xx plus load average at the 1min mark

    I can’t seem to find the problem. Has this happened to anyone else, or is there something I can look at?
    Cheers OJ

  70. Thank you for the clean and instructed guide! Having a little problem though, hope someone can help me out.

    Can anyone think of a reason why I can’t get the webgui running? I’m trying to get this going on a domoticz-RPi. I’ve been trying a shamefull amount of guides, and this one seemed easiest and promising so far. Unifi service is running, port is forwarded, but still, no sigar :-(.

    Any help would be greatly appreciated.

    1. Hi Thomas,

      I don’t have any experience myself with Domoticz myself, however, someone else had the same problem in the Installing Ubiquiti UniFi Controller 4 on Raspberry Pi comments and it turned out to be port related. The solution was to change some of the ports that Domoticz was using so they they didn’t conflict with UniFi (possibly port 8080?).

      Hope that is enough to give you a clue!

      Kind Regards,

    2. Thank you Chris! That fixed the issue:-). I just changed the port in, and presto, it works!!! A great start of the weekend.

      Thanks again.

  71. Hi,
    I have a problem with the installation according to this manual.
    After typing the command “sudo apt-get update && sudo apt-get upgrade -y” show up subtitle: “Read-only file system”. With each package
    My configuration is v2 Raspberry Pi Model B with a 1GB memory card and “Kingston 16GB microSD HC Class10”
    Please help .

    1. Hi ZiemaF,

      I’m not really sure how you’ve ended up with read-only access to the file system on your Raspberry Pi, however, it should be easy to re-enable full read-write access using the following command:

      sudo mount -o remount,rw /

      Give that a try! 🙂

      Kind Regards,

  72. Hi Chris,

    I wiped my SD card and did an new install. Now it is working perfect. I do not know what went wrong with the update.
    I also imported the backup from my windows controller. This worked also fine.
    Thanks for the great Guide again.

    Regards Roelof

    1. Hi Roelof,

      I’m glad you got it working with a new install – I had no idea what to recommend!

      Kind Regards,

  73. Chris – as others have said, on a new RPi3 this worked perfectly. Thanks for all your work in documenting this process – I know that takes some time!

    By the way, I previously had the same version of the controller software working on my Windows laptop. At the first access to the controller running on the RPi (step 5 above) I noticed the option to “Restore from a backup”. I started up the software on my Windows computer and saved a backup file (defaults to the name of 5.0.7.unf) then I closed down that software and the Windows controller, opened up the RPi web interface again, and did the restore. I *hoped* that this would work and the Linux Unifi Controller software would accept a backup made from the Windows version — and it did!

    That saved me all the rest of the steps on this page. I’m sharing this here in case others have the same situation where the controller is already working fine on another computer and they just want to move to the RPi. =)

  74. Wonderful guide and easy to follow.
    I installed Unifi on a Raspberry 1b using Raspbian Jessie Lite.
    Using this platform you need to add the following commands prior to step 1:
    >sudo apt-get install apt-transport-https
    >sudo apt full-upgrade

    Good luck.

  75. Trying to install this on one of my pi’s…

    problem is everytime it tries to install java it hangs at the following:

    Setting up ca-certificates-java (20140324) …

    and that’s as far as I can get 🙁 (using debian jessie from berryboot if this helps)

    Any help guys?


  76. I just installed it on a RPI 1.
    It is a little slow to start the services. (appx 3 minuttes) But it works.

    Thanks for the great guide.

  77. Chris, thank you for keeping this updated! Incredibly helpful.

    Followed this guide on a brand new RPi 3, and everything is working great!

Leave a Reply