DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

How does AI transform chaos engineering from an experiment into a critical capability? Learn how to effectively operationalize the chaos.

Data quality isn't just a technical issue: It impacts an organization's compliance, operational efficiency, and customer satisfaction.

Are you a front-end or full-stack developer frustrated by front-end distractions? Learn to move forward with tooling and clear boundaries.

Developer Experience: Demand to support engineering teams has risen, and there is a shift from traditional DevOps to workflow improvements.

Related

  • Cognitive Architecture: How LLMs Are Changing the Way We Build Software
  • Software Delivery at Scale: Centralized Jenkins Pipeline for Optimal Efficiency
  • Optimizing Software Performance for High-Impact Asset Management Systems
  • Beyond Code Coverage: A Risk-Driven Revolution in Software Testing With Machine Learning

Trending

  • Build Your Private Cloud at Home
  • Top Trends for Data Streaming With Apache Kafka and Flink
  • Complete Guide: Managing Multiple GitHub Accounts on One System
  • Why 99% Accuracy Isn't Good Enough: The Reality of ML Malware Detection
  1. DZone
  2. Data Engineering
  3. IoT
  4. Migrating a Ubiquiti Unifi Controller to Run on a Raspberry Pi for Pennies

Migrating a Ubiquiti Unifi Controller to Run on a Raspberry Pi for Pennies

Are you a fan of Ubiquiti gear, but would rather have your controller running on a Raspberry Pi? Here's a simple walkthrough to configure everything.

By 
Douglas Rathbone user avatar
Douglas Rathbone
·
Apr. 06, 18 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
17.9K Views

Join the DZone community and get the full member experience.

Join For Free

ubiquiti wi-fi gear is becoming well-known as the go-to brand for nerds wanting to have home wi-fi that competes with commercial setups. the ubiquiti ac-pro access points, in particular, are in the category of “next level” consumer gear, and after installing them i’ve never looked back. being commercial gear the ubiquiti aps do have one annoying requirement: you need to run controller software on your network to monitor and control the access points through ubiquiti’s cloud-based controller software. luckily you can run this software on a range of hardware – and a $35 raspberry pi is just the ticket.

when i first setup my ubiquiti access points i set up a virtualbox host on my home server to run the ubiquiti controller software on ubuntu. this has been a nice way of running the software without paying $79 for a ubiquiti unifi cloud key, but it does mean you’ve got to run an extra host whenever you’re administering your access points.

a raspberry pi is an awesome replacement for a virtual machine and isn’t as pricey as a cloud key. geeking out aside, another bonus is that you can also run other stuff on your raspberry pi at the same time when you’re done.

prerequisites

the migrate a controller host onto a raspberry pi you’ll need a few things first.

  • raspberry pi – $35
  • samsung 32gb sd card – $12.99
  • sb components case – $4.99

setting up the raspberry pi

the first thing you’ll want to do is download the latest version of raspbian from the raspberry pi site:

  • https://www.raspberrypi.org/downloads/raspbian/

next, you can download software to flash raspbian onto your ssd:

  • https://etcher.io/

run this, and flash it onto your new ssd

image

configuring raspberry pi

plug in your raspberry pi and start it up.

image

connect to your local network or wifi and fire up a terminal session to update the os.

sudo apt-get updatesudo apt-get upgrade

image

now we’re ready to setup the ubiquiti software.

installing the ubiquiti software

first, we need to add the unifi package list to the raspberry pi.

echo 'deb http://www.ubnt.com/downloads/unifi/debian 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 https://dl.ubnt.com/unifi/unifi-repo.gpg
sudo apt-get update

image

now what we need to install is the oracle java8 runtime, along with the ubiquiti software. ubiquiti really only needs the jdk, so if you install just the jdk at the same time as the ubiquiti controller software, apt-get will figure out that you don’t need the full java runtime.

again in the terminal, type the following;

sudo apt-get install unifi oracle-java8-jdk –y

image

finally, when installing the unifi controller software, you might notice in the screenshot above you also end up installing mongodb. we don’t want that running on your nice clean (and resource constrained) raspberry pi. so let’s disable this from starting at boot time. the unifi controller software runs it’s own instance of mongo when it starts up, so you don’t need this running as well.

sudo systemctl disable mongodb
sudo systemctl stop mongodb


now let's login to the controller via the local host on the machine.

setting up the new controller and migrating

the unifi cloud control software works in a pretty cool way. basically, it watches your network for devices, and then reports these back to the cloud-based unifi service. this means you can then control your home network from the cloud without needing to punch holes in your firewall.

first off, visit your raspberry pi’s controller software by visiting the unifi software’s port.

my raspberry pi has taken up the ip address of 192.168.1.198 so i’m going to visit it from another machine on the network on the tcp post 8443

  • https://192.168.1.198:8443

i’m using chrome, which throws a security warning, as the default ubiquiti controller software doesn’t have a commercial ssl certificate attached. select to proceed .

image

you’ll then be asked to set up the controller’s backup and timezone settings.

image

then skip through the device setup screens as they’ll be no devices for adoption (they’re all already managed).

image

next, you can set up an access point for your new unifi access controller site (we’ll overwrite this later).

image

now configure your administrator access credentials.

image

confirm everything on your new controller’s configuration.

image

now the ubiquiti software asks you to login to your ubnt account so it can add the new raspberry pi controller to your account.

image

now that you’ve logged in, your new raspberry pi controller can be accessed at any time from https://unifi.ubnt.com – nice!

now we’ve got to migrate your current access points over the new controller.

migrating unifi access points

the next step is you’ve got to migrate the access points you have today to the new raspberry pi controller.

firstly we want to export the site from the current controller. login to the current (soon to be deprecated) controller and open up the settings screen for the site you want to migrate (the one that has the access points in it).

in the bottom of the site settings screen, you’ll notice an “export site” button. press this and save the file locally.

image

now in a separate tab login to your new controller and visit the “sites” screen. we’re going to import the site into your raspberry pi controller.

image

give the new site you’re importing a name.

image

now shift back to your old controller’s tab and finish migrating the access points to your new controller by entering your new controller’s ip address.

image

in the next screen, you’ll want to forget the devices on your old controller.

image

and that’s it, you’re now done! your raspberry pi is now acting as a controller for your unifi network.

raspberry pi Software

Published at DZone with permission of Douglas Rathbone, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Cognitive Architecture: How LLMs Are Changing the Way We Build Software
  • Software Delivery at Scale: Centralized Jenkins Pipeline for Optimal Efficiency
  • Optimizing Software Performance for High-Impact Asset Management Systems
  • Beyond Code Coverage: A Risk-Driven Revolution in Software Testing With Machine Learning

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: