Updating your UniFi Controller on a Raspberry Pi
Published onby Iron (edited on )
Updating your UniFi Controller on a Raspberry Pi might sound like a daunting task, but trust me, it’s pretty straightforward. Whether you're a seasoned techie or just getting your feet wet in the world of UniFi, this guide will walk you through the process step-by-step.
Let's dive In!
🚨 Before we dive in, please don't host your UniFi Controller using a Raspberry Pi if you work with client networks. Sooner or later this setup will cause issues! It's perfectly fine for home users, but definitely not recommended for businesses. You can try UniHosted for free.
Table of Contents
- Why update your UniFi controller?
- What you’ll need
- Step 1: Access your Raspberry Pi via SSH
- Step 2: Stop the UniFi controller
- Step 3: Update the software packages
- Step 4: Download the latest UniFi controller version
- Step 5: Install the update
- Step 6: Restart the UniFi controller
- Step 7: Log into the UniFi controller
- Troubleshooting tips
- Keeping your UniFi controller healthy
- Final Thoughts
Why update your UniFi controller?
Before we dive into the nitty-gritty, let’s talk about why updating your UniFi Controller is so important. Your UniFi Controller is the brain of your network. It manages your UniFi devices like access points, switches, and routers, keeping everything running smoothly.
By updating it, you’re ensuring that you get the latest features, security patches, and performance improvements. In other words, you’re keeping your network at the top of its game. And who wouldn’t want that?
What you’ll need
To get started, make sure you have the following:
-
Raspberry Pi: Obviously, you need a Raspberry Pi that's running the UniFi Controller.
-
SSH Access: You’ll need to SSH into your Pi, so have a terminal app ready (like PuTTY for Windows or Terminal for Mac and Linux users).
-
Internet Connection: Your Raspberry Pi needs to be online to download the latest updates.
-
A Cup of Coffee: Depending on your internet speed and the Pi’s performance, you might be waiting for a bit during the update process.
Got all that? Great! Let’s get started.
Step 1: Access your Raspberry Pi via SSH
First things first, let’s log into your Raspberry Pi. If you’re on a Mac or Linux, open up Terminal and type:
ssh pi@your-pi-ip-address
For Windows users, fire up PuTTY, enter your Pi’s IP address, and hit "Open." If you haven’t changed the default login credentials, your username is "pi" and the password is "raspberry". If you’ve customized these, use your own credentials.
Step 2: Stop the UniFi controller
Before we start the update, it’s a good idea to stop the UniFi Controller. You don’t want to interrupt the network’s brain while it’s still thinking, right?
Run the following command to stop the UniFi service:
sudo systemctl stop unifi
This will safely stop the UniFi Controller, allowing us to proceed with the update without causing any disruptions.
Step 3: Update the software packages
Now, let’s make sure all your software packages are up to date. Keeping your Pi updated ensures that everything else runs smoothly and reduces the risk of compatibility issues.
Run these commands:
sudo apt-get update
sudo apt-get upgrade -y
The "-y" flag automatically answers "yes" to any prompts, so you can sit back and relax while your Raspberry Pi does the heavy lifting.
Step 4: Download the latest UniFi controller version
With your system updated, it’s time to grab the latest version of the UniFi Controller software. Head over to Ubiquiti's downloads page and find the latest ".deb" package for the UniFi Controller. Make sure you’re getting the correct version for your Raspberry Pi.
Once you've got the URL for the latest version, use "wget" to download it directly to your Raspberry Pi:
wget https://dl.ui.com/unifi/X.X.X/unifi_sysvinit_all.deb
Replace "X.X.X" with the actual version number you’re downloading. If you’re not sure, just copy the download link from the Ubiquiti website and paste it into your command.
Step 5: Install the update
With the latest ".deb" file downloaded, it’s time to install the update. Run this command:
sudo dpkg -i unifi_sysvinit_all.deb
This command tells your Raspberry Pi to install the package we just downloaded. Depending on your Pi’s performance and the size of the update, this might take a few minutes. This is the perfect time to take a sip of that coffee.
Step 6: Restart the UniFi controller
Once the installation is complete, it’s time to fire up the UniFi Controller again. Run:
sudo systemctl start unifi
This command starts the UniFi service back up. To make sure everything is running smoothly, you can check the status with:
sudo systemctl status unifi
If you see something like "active (running)", you’re good to go. This means the UniFi Controller is up and running on the latest version.
Step 7: Log into the UniFi controller
Now it’s time to log into your UniFi Controller and make sure everything is working as expected. Open your web browser and navigate to the usual address for your UniFi Controller, which is typically something like "https://your-pi-ip-address:8443".
You should be greeted with the familiar UniFi dashboard, but now it’s all shiny and updated.
Take a few minutes to explore the new features and ensure all your devices are connected and functioning properly. If everything looks good, give yourself a pat on the back—you’ve just successfully updated your UniFi Controller!
Troubleshooting tips
Let’s face it, sometimes things don’t go as smoothly as we’d like. Here are a few common issues and how to fix them:
-
Controller Won’t Start: If your controller doesn’t start after the update, try rebooting your Raspberry Pi. You can do this with the "sudo reboot" command. If it still doesn’t start, double-check the status with "sudo systemctl status UniFi" to see if there are any error messages.
-
Can’t SSH into Pi: If you’re having trouble SSHing into your Raspberry Pi, make sure it’s connected to the network and that SSH is enabled. You can enable SSH by connecting a keyboard and monitor to your Pi and running "sudo raspi-config". From there, navigate to "Interfacing Options" and enable SSH.
-
Update Issues: If you run into trouble during the update, like the package failing to install, check the amount of available disk space on your Pi. Running "df -h" will show you how much space is left. If you’re running low, try clearing out some space by removing unnecessary files or programs.
Keeping your UniFi controller healthy
Now that your UniFi Controller is updated, here are a few tips to keep it running smoothly:
-
Regular Backups: Make sure you’re regularly backing up your UniFi configuration. This way, if something goes wrong in the future, you can easily restore your setup. You can set up automatic backups in the UniFi Controller settings.
-
Monitor Resources: Keep an eye on your Raspberry Pi’s resources. The UniFi Controller can be a bit resource-hungry, so it’s a good idea to monitor CPU and memory usage. Tools like
htop
can help you keep an eye on what’s going on under the hood. -
Security Updates: Always apply security updates for both your Raspberry Pi and the UniFi Controller. This ensures that your network remains secure from vulnerabilities.
-
Network Health Checks: Regularly check the health of your network using the UniFi dashboard. Look for any devices that are misbehaving or not performing as expected. This proactive approach can save you from headaches down the line.
Final Thoughts
And there you have it! You’ve successfully updated your UniFi Controller on a Raspberry Pi. By keeping your Controller up to date, you’re ensuring that your network remains secure, fast, and full of the latest features. It’s a small task that can make a big difference in how well your network performs.
Here at UniHosted, we’re all about making your UniFi experience as smooth as possible. Whether you’re managing a home network or something more substantial, keeping your UniFi Controller updated is one of the best ways to maintain a reliable and secure network.
And remember, if you ever need help with hosting or managing your UniFi Controller, we're here to help.If you would like me to personally walk you through UniHosted, you can schedule a call with me here.
We host UniFi Controllers in the Cloud
Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.
Free tier available
Get the best support
Join 1660+ customers
No credit card required