With this tutorial, we will be showing you the process of installing the UniFi Controller on a Raspberry Pi

UniFi is a range of network devices created by Ubiquiti. These devices range from Wi-Fi access points to security gateways and switches.
Setting up the UniFi software on a Raspberry Pi is a fairly straightforward process as it just relies on the multi-platform Java runtime to run.
Using the UniFi network controller, you can manage all the UniFi devices that are a part of your network. You will also be able to use this dashboard to see the statistics of your UniFi network.
Please note that before proceeding you will need to be running a 32-bit version of Raspberry Pi OS for this tutorial to work. At this time, 64-bit is not supported.
Equipment List
Below is a list of the equipment that you will need to set up the Unifi Network Controller software on your Raspberry Pi
Recommended
- Raspberry Pi
- Micro SD Card
- Power Supply
- Ethernet Cable orWi-Fi
Optional
- Raspberry Pi Case
- USB Keyboard
- USB Mouse
- HDMI Cable
This tutorial on setting up the UniFi Network Controller was tested on a Raspberry Pi 4 running the latest version of Raspberry Pi OS Bullseye.
Preparing your Raspberry Pi for the UniFi Controller
In this section, we will be preparing the operating system so it can run the UniFi software.
1. The first thing you should do is ensure that your Raspberry Pi is running up to date packages.
To update all packages, you will be required to run the following command.
sudo apt updatesudo apt upgrade
2. To improve the startup speed of the UniFi controller software on our Raspberry Pi, we need to install rng-tools
.
We will utilize this package to ensure the Raspberry Pi has enough entropy for the random number generation that the UniFi software uses.
sudo apt install rng-tools
3. We now need to make a slight change to the rng-tools configuration.
Begin editing the config file by running the following command.
sudo nano /etc/default/rng-tools-debian
4. Within this file, find and uncomment the following line.
Find
#HRNGDEVICE=/dev/hwrng
Replace With
HRNGDEVICE=/dev/hwrng
By uncommenting this line, we are adding to the amount of entropy (The amount of randomness) that the system has available.
The Raspberry Pi features an integrated random number generator that we can utilize to increase the entropy pool.
5. Once you have made the change, save the file by pressing CTRL + X, then Y, followed by ENTER.
6. Finally, restart the rng-tools
service by running the command below.
sudo systemctl restart rng-tools
Once the service has finished restarting, it should now be safe to proceed to the next section of this guide.
Extra Steps for Raspberry Pi OS Bullseye
When trying to install the UniFi controller on Raspberry Pi OS Bullseye, you will run into issues with the mongodb
package not being available.
To work around this issue we can add the old stretch repository as a source and pin it so that none of its packages will take preference.
Ideally, mongodb
will be made available from the official repository, but for now, we will have to work around it
1. Let us start by creating a preferences file for the apt package manager. This file will allow us to modify the priority of the repository that we are about to add.
You can start writing this preferences file by using the following command.
sudo nano /etc/apt/preferences.d/99stretch-mongodb.pref
2. Within this file, you will need to type in the following lines.
#Never Prefer packages from StretchPackage: *Pin: release n=stretchPin-Priority: 1
These lines tell the apt package manager a few different things. First, we use the wildcard for our package name. The wildcard means our following rules will apply to all packages available.
The following two lines are what we use to set a priority for packages from our new repository. By setting the “pin-priority
” to 1
, we ensure that apt will prefer other packages over ones from the Stretch repository.
3. Once you have made these changes to the file, you can save and quit by pressing CTRL + X, then Y, followed by the ENTER key.
4. Now that we have created our new preferences file, we can now add our repository that contains mongodb
.
Before we can add this repository, we will first need to download the GPG key for the Raspbian repository. This key helps authenticate the packages belong to that specific repository.
Download this key to your Raspberry Pi by using the following command in the terminal.
curl -L https://archive.raspbian.org/raspbian.public.key | gpg --dearmor | sudo tee /usr/share/keyrings/raspbian-archive-keyring.gpg >/dev/null
5. With the GPG we can finally add the older Raspbian repository to our sources list.
To add this repository we will be creating a new file called “stretch_mongodb.list
” in the “/etc/apt/sources.list.d/
” directory.
Using this simple one liner, we can echo the repository string and add it straight into this new file without having to use a text editor like nano.
echo "deb [signed-by=/usr/share/keyrings/raspbian-archive-keyring.gpg] http://archive.raspbian.org/raspbian stretch main" | sudo tee /etc/apt/sources.list.d/stretch_mongodb.list
6. As we have made changes to the package sources, we need to update the package list.
You can update the package list by using the following command on your Raspberry Pi.
sudo apt update
Installing the UniFi Controller to the Raspberry Pi
1. Our first task is to add the UniFi repository to our sources list.
We can achieve this by running the command below.
echo 'deb [signed-by=/usr/share/keyrings/ubiquiti-archive-keyring.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
2. We now need to add the repositories GPG key by using the following command.
curl https://dl.ui.com/unifi/unifi-repo.gpg | sudo tee /usr/share/keyrings/ubiquiti-archive-keyring.gpg >/dev/null
The GPG key is what helps tell the package manager it is downloading the correct package.
3. As we made changes to the repositories, we need to now update the package list by running the command below.
sudo apt update
4. Now finally, we can install version 8 of the OpenJDK runtime as well as the Unifi Controller software itself to our Raspberry Pi by running the following command.
sudo apt install openjdk-8-jre-headless unifi
Installing UniFi through this method will automatically set up a service. This service will automatically start the UniFi software at boot.
Additionally, we are installing version 8 of the Java runtime environment as it is currently the only version supported by the UniFi controller.
First Boot of the UniFi Controller on your Raspberry Pi
In this section, we are going to walk you through the initial configuration steps of the UniFi software.
1. First, retrieve the local IP address for your Raspberry Pi.
If you have terminal access to your Pi, you can use the following command.
hostname -I
2. With your Raspberry Pi’s IP address handy, go to the following web address in your favorite web browser.
https://[IPADDRESS]:8443
If you run into a certificate error, it is safe to ignore it as we know what device we are connecting to.
3. The first step requires you to give a name for your Raspberry Pi powered UniFi controller (1.).
You are also required to agree to the end-user license agreement and terms of service from UniFi, once you have read through them, click the checkbox (2.).
Once all done, click the “Next” button (3.) to proceed.

4. Next, you will need to sign in to your Ubiquiti account (1.).
If you don’t already have an account, you can register at the Ubiquiti website.
Once you have entered your login details, proceed by clicking the “Next” button.

5. Tweak the settings on this page that best suits your needs.
Once configured, click the “Next” button.

6. Use this screen to connect your Pi UniFi Network controller to the devices on your network.
To proceed, click the “Next” button.

7. Now give your new Wi-Fi network a name and a password.
Once you have configured your WiFi details (1.), click the “Next” button to proceed (2.).

8. This final screen will get you to review all your settings.
You will also be able to use this screen to set both the country and timezone (1.). Make sure you set these before continuing.
Once you have verified everything is correct, you can now click the “Finish” button (2.) to finish the setup process.

7. At this point, you should now have successfully set up the UniFi network controller on your Raspberry Pi.

If you have run into any issues with setting up the UniFi software, feel free to drop a comment below.
Recommended
How to Install and Configure NGINX on Ubuntu
Setting up PlayStation Controllers on the Raspberry Pi
How to Edit the Hosts File on Ubuntu
Installing the Latest Versions of PHP on Raspberry Pi OS
Installing XBian to your Raspberry Pi
How to Use the explode Function in PHP
FAQs
Can you run UniFi controller on Raspberry Pi? ›
Setting up the UniFi software on a Raspberry Pi is a fairly straightforward process as it just relies on the multi-platform Java runtime to run. Using the UniFi network controller, you can manage all the UniFi devices that are a part of your network.
How to install UniFi controller? ›- Find the UniFi section and scroll down to the 'Software' section. ...
- Next, click 'I Accept' on the EULA.
- Then, click 'Download File'
- In your downloads folder, locate the 'UniFi-installer' file and run it.
- A new pop-up window will appear, click 'Yes' to allow UniFi to run.
Installed UniFi controller on the raspberry pi zero w to use it with the flex mini switch. Most posts on the internet always suggest a raspberry pi 3 or above to use as a controller. This setup works great for now.
How do I update my UniFi controller on my Raspberry Pi? ›- Update: sudo apt update.
- Upgrade: sudo apt dist-upgrade.
- Follow any prompts.
- Clean up: sudo apt clean.
- Reboot: sudo reboot.
If you want to run your own router at home, the Raspberry Pi 4 Model B 1 can be an excelent hardware choice: it's fairly cheap. it's fast enough.
Is a Raspberry Pi powerful enough to be a router? ›Therefore, if you have some spare Raspberry Pi 3, it can still serve you well as a router, just hook up some switch behind it, and make sure your Internet link is slower than 200 Mbit/second. Otherwise, your speed is limited.
Do I need to install UniFi controller? ›Although this is not required, we strongly recommend running the UniFi Network Application at all times. This enables you to configure your system at all times. It is also a requirement for proper statistics and reporting.
Can UniFi work without controller? ›But what if you don't want to keep a pc running 24/7/? Do you really need to controller? Nope, you can just install the Unifi Ap with you mobile phone. This guide will tell you howto install an Unifi AP without a controller.
Is the UniFi controller necessary? ›If you need a managed switch or router, Ubiquiti makes those too. There are benefits to having all the pieces, but it's not necessary.
Which Raspberry Pi for UniFi controller? ›You can also install UniFi Network Application on your Raspberry Pi 4 to turn it into an UniFi Controller and manage all of your UniFi devices. If you just want to run a few UniFi devices, a Raspberry Pi 4 should be enough for you.
Can Raspberry Pi run on 5GHz WiFi? ›
The Raspberry Pi 3 Model B+ is the latest product in the Raspberry Pi 3 range, boasting a 64-bit quad core processor running at 1.4GHz, dual-band 2.4GHz and 5GHz wireless LAN, Bluetooth 4.2/BLE, faster Ethernet, and PoE capability via a separate PoE HAT.
Will any USB controller work on Raspberry Pi? ›Playing games on your Raspberry Pi is far easier with a good game controller. Many different game controllers can be connected to your Raspberry Pi using USB. Furthermore, some well-known console controllers can also be linked up using Bluetooth. In theory, all controllers should work with any Raspberry Pi projects.
Why is my UniFi controller not working? ›After investigating many user reports, we found several possible reasons that can cause UniFi controller won't start. Lack of free space on the host system drive. Incompatible or outdated JAVA installation. There are special characters in the Windows Profile username.
Why is my controller not updating? ›If you still can't update the controller, try a different USB cable, and make sure it's firmly connected to the console's USB port and the controller's micro-USB or USB-C port.
What controllers are compatible with Raspberry Pi? ›Most wired USB game controllers will work well with the Raspberry Pi. The PlayStation to USB converter and the Xbox Wireless Adapter also work well. Up to four USB game controllers (one for each USB port) can be connected to the Raspberry Pi before booting.
How many GB of RAM do I need for Pi? ›Your choice of RAM
We're making different variants of the Raspberry Pi 4 available, depending on how much RAM you need — 1GB, 2GB, 4GB, or 8GB.
As such, you won't notice a difference between the 2GB, 4GB, or 8GB models. Raspberry Pi uses such as retro gaming and media consumption won't see much of a performance gain with the additional RAM. Overall, the Pi 4 8GB can perform the same functions as its 4GB and 2GB siblings, albeit with more overhead.
Is 1GB enough for Raspberry Pi? ›Is 1GB sufficient for the Raspberry Pi? The 4GB version is always the safe option, but if you have a specific use case that won't be processing a lot of data and won't be adding a display, the 1GB version should be enough.
What is more powerful than a Raspberry Pi? ›The first one to make it to the list in Tinker Board S R2. 0 comes with a powerful processor, even more powerful than the Raspberry Pi 4. It is equipped with 16 GB of internal storage and a 1.8 GB quad-core CPU. If you are looking for something with good processing power, then this is the one to go for.
Is 8GB SD card enough for Raspberry Pi? ›The capacity required ranges from 8GB to 32GB, which is Raspberry Pi's largest supported size by default, though higher capacities can be formatted to work with the units. Bear in mind, to install the official Raspbian OS you'll need at least an 8GB microSD card, whereas Raspbian Lite requires a minimum of 4GB.
How fast is a Raspberry Pi 4 compared to a PC? ›
Overall it's over 15 times faster than the original Raspberry Pi and puts in a better performance on the desktop than some traditional budget PCs we've used.
Is ubiquiti overkill for home network? ›Still, Ubiquiti's UniFi products can be overwhelming and overkill in many cases. Generally, home users should go with AmpliFi instead of UniFi.
Is there a monthly fee for UniFi? ›Ubiquiti does not charge software licensing or maintenance fees.
Does UniFi have a monthly fee? ›Requirements: UniFi OS Console running UniFi Network application version 6.5. 55 and later or a UniFi Gateway. Note: Performance is subject to change based on your AT&T LTE coverage in your local area. *Subscription plans are $15/month for 1 GB of data plus $10 for each additional GB.
Does the UniFi controller have to run 24 7? ›As I understand, Unifi APs can run without having Unifi Controller 24/7 running, unless you want certain functions like captive portal.
Does the UniFi controller need to run 24 7? ›The UniFi Controller
There are multiple ways to run the controller, it can be on the Cloud or on a local machine, but be aware that for proper monitoring and management, it needs to run 24/7, so keep that in mind before venturing forward with Ubiquiti hardware.
...
UniFi - Cloud Key's Device Management Limit.
Quantity | Connected |
---|---|
40 | APs |
2000 | Connected Clients |
The difference with Ubiquiti UniFi is that their approach to traditional industry practices are a little different and thus avoid what they deem unneccessary costs. This means that these costs don't get passed down the ladder to the consumer, meaning they can offer a comparably performing product at a much lower price.
Can I host my own UniFi controller? ›Hosting your own UniFi controller is a perfect option when you want to start small and have the time to test new releases and keep the server up to date. But make sure that you probably secure the server and make offsite backups.
Is 2.4 amps enough for Raspberry Pi? ›It should be fine. Anker makes decent supplies, 2.4A is way more the sufficient to power a Pi4.
Is 5V 1A enough for Raspberry Pi? ›
Re: Is 5V 1A enough for Raspberry Pi 3 B+
No, a 1A power supply is not enough for a Pi 3B (much less a 3B+). The Pi 3B+ itself can draw up to 1.3A, and the USB ports have a combined output of up to 1.2A. That's why the recommended PSU is rated for up to 2.5A.
The speed of an SD card will also directly affect how fast your Raspberry Pi runs, in just the same way as the speed of a hard drive affects how fast a conventional desktop computer runs. The faster you can read data from the card, the faster your Raspberry Pi will boot, and the faster programs will load.
How far is too far for 5GHz WiFi? ›Wi-Fi signals will usually reach about 150 feet or over 45 meters for a 2.4Ghz frequency. Using a 5Ghz frequency, you will get about 50 feet or about 15 meters of reach.
How do I connect to 2.4Ghz instead of 5 GHz? ›- Open the Settings app for your Android device.
- Tap Connections.
- Tap Wi-Fi.
- Select a 2.4 GHz Wi-Fi network. This is commonly indicated by a 2, 2.4, or 2G at the end of the network name or SSID.
- If prompted, enter the password for the network.
5 GHz networks do not penetrate solid objects such as walls nearly as well as do 2.4 GHz signals. This can limit an access points reach inside buildings like homes and offices where many walls may come between a wireless antenna and the user.
What are the disadvantages of PI controller? ›However, the P-I controller has some disadvantages such as high starting overshoot, sensitivity to controller gains and sluggish response to sudden disturbances. So, the Integral-Proportional (I-P) controller is proposed as speed controller for induction motor drives to overcome the disadvantages of the P-I controller.
Can I use USB instead of SD card for Raspberry Pi? ›Setting up a USB for your Raspberry Pi is extremely simple to do, and it's just like installing Raspbian to an SD Card, instead of selecting your SD Card reader you will choose the USB storage device that you want to format. Below we will do a quick run through of using Etcher to write to your USB device.
Why won't my controller connect through USB? ›Some USB devices, including incompatible or defective USB cables, can interfere with wireless signals. Unplug all USB devices connected to your Xbox or PC (wireless hardware, external hard drives, other wired controllers, keyboards, and so on). Restart your Xbox or PC and try connecting the controller again.
What version of Java do I need for UniFi controller? ›No you need to maintain the same Java8 on your Debian 9 Controller, though you can update to Java 8 version 251. Also the latest stable Controller version is 5.12.
How do I manually connect to a UniFi controller? ›- Step 1: SSH to your Unifi radio. ssh to ubnt:192.168. 1.20 (or whatever the IP address is.) ...
- Step 2: Reset to defaults. You must reset the AP to defaults before changing the inform ip address. ...
- Step 3: Set new inform IP address. Connect to the mca client.
What is the latest UniFi controller? ›
- UNIFI Pro Version: 3.9.5. June 16, 2022.
- UNIFI Pro Version: 3.9.4. May 24, 2022.
- UNIFI Pro Version: 3.9. March 16, 2022.
To do this, press the Xbox button to open the guide, choose Profile & system > Settings > Devices & connections > Accessories, and then select the controller you want to update. On the Xbox Wireless Controller screen, select “…” to check the firmware version for your controller.
How long does it take for a controller to update? ›The process shouldn't take long to complete – we estimate about 30 seconds.
How do you connect a controller to a Raspberry Pi? ›Just plug a Micro USB cable into the Xbox One controller and the USB-A end into the Raspberry Pi. and you should be ready to go.
Do wireless controllers work with Raspberry Pi? ›Game On! Our 2.4GHz wireless games controllers are perfect for all of your Raspberry Pi gaming or robotics needs. The controllers come with a USB receiver for plugging into your Raspberry Pi (or even your PC) and are powered by three AAA batteries (not included).
How to configure controller for Raspberry Pi? ›- Hold down any button on your keyboard or gamepad and the name will appear at the bottom and then open up into a configuration menu:
- Follow the onscreen instructions to configure your gamepad- if you run out of buttons just hold down a button to skip each unused button.
- Linux: Ubuntu Desktop / Server 22.04; Debian 11 "Bullseye"
- Windows: Windows 10; Windows Server 2016.
- macOS: Mavericks 10.9, 10.10 Yosemite, 10.11 El Capitan, 10.12 Sierra, 10.13 High Sierra, 10.14 Mojave, 10.15 Catalina.
Many different game controllers can be connected to your Raspberry Pi using USB. Furthermore, some well-known console controllers can also be linked up using Bluetooth. In theory, all controllers should work with any Raspberry Pi projects.
Can you use wireless controllers on Raspberry Pi? ›Game On! Our 2.4GHz wireless games controllers are perfect for all of your Raspberry Pi gaming or robotics needs. The controllers come with a USB receiver for plugging into your Raspberry Pi (or even your PC) and are powered by three AAA batteries (not included).
Does UniFi Controller need to run all the time? ›Do UniFi APs require the controller to be running all the time? UniFi APs can run by themselves without the controller unless features like guest portal is enabled (as UniFi controller also functions as a captive portal). Restarting the controller won't restart your APs.
Does UniFi Controller need to be running 24 7? ›
The UniFi Controller
There are multiple ways to run the controller, it can be on the Cloud or on a local machine, but be aware that for proper monitoring and management, it needs to run 24/7, so keep that in mind before venturing forward with Ubiquiti hardware.
Still, Ubiquiti's UniFi products can be overwhelming and overkill in many cases. Generally, home users should go with AmpliFi instead of UniFi.
Why is PI controller better than I controller? ›PI controller can be used to avoid large disturbances and noise presents during operation process. Whereas PID controller can be used when dealing with higher order capacitive processes.
What are the limitations of PI controller? ›The disadvantages of P+I are that it gives rise to a higher maximum deviation, a longer response time and a longer period of oscillation than with proportional action alone. This type of control action is therefore used where the above can be tolerated and offset is undesirable.
How to connect controller to Raspberry Pi? ›Just plug a Micro USB cable into the Xbox One controller and the USB-A end into the Raspberry Pi. and you should be ready to go.
How can I boost my WiFi signal on my Raspberry Pi 4? ›- Use 5 GHz to connect the Pi to the Wi-Fi instead of 2.4 GHz.
- Ensure to use a high quality HDMI adapter and well shielded cables.
- Use lower display resolutions that do not seem to cause too much of an issue. ...
- Use Ethernet to connect the Pi to a pod instead of the Wi-Fi.