How do you upgrade unifi controller?

Red Squirrel

[H]F Junkie
Joined
Nov 29, 2009
Messages
9,211
I'm trying to update a Unifi AP due to that wifi vulnerability that was discovered. I did manage to upgrade the AP and it is at version 3.9.3 according to the busybox prompt. (I'm assuming that's same as the AP version?)

Problem is, now it won't adopt it in the controller. It's just stuck at adopting. Seems to be a common issue. I presume I need up upgrade the controller too, it's at version 3.2.10.

I downloaded it but it's a .deb file, the server is CentOS so it's not debian based. I tried to extract the file with dpkg but all I get is a usr, lib, and etc folder. My existing controller is java based and just has a bunch of jar files in a folder. I was hoping I could just replace it and that it would give me the newer version but clearly not the case.

I can't find instructions anywhere on how to do an in place upgrade, anyone know how?

I did find instructions on how to install from scratch and it involves using apt on a debian box so worse case scenario I'll create a new VM with Debian and do another controller from scratch given I only have one AP, but wondering if there is a way to upgrade my current one.
 
Lol wow, I think I succeeded by pure luck. I investigated the folder structure of the .deb file and found that the files in usr/lib/unifi looked similar to the ones of my install. So I literally just did a cp -rv to my installation, and it actually worked! Is this actually the right way of doing it though? Like I wonder if I'm going to run into issues. I'm still having trouble adopting the AP but I'll keep playing with that further. It might just start to work. I see this web interface is completely different too so I must have been pretty far behind I guess.

Edit: After some fiddling around I got it to adopt successfully! Just some brute force, doing set-inform, forgetting the AP, doing syswrapper.sh restore-default etc... and eventually it finally worked. (they should probably streamline this process so it's not as awkward)

Now to play around in this new interface it looks quite nice.
 
Last edited:
Yeah that didn't apply, since the package it comes in is a .deb and it's structured completely differently. But managed to get it going anyway when digging through it and found the files I need. Good to know that a .deb is basically like a compressed file so I could access the files without having to run an install. (which didn't work on CentOS, just got a weird error)

When I upgraded the AP it went into adopting mode, it did not stay as active so that's why I had to readopt. In trying to troubleshoot why it was not getting picked up I ended up doing a wipe several times and overall fiddling around hoping it would pickup. That's when I realized I probably had to upgrade controller too.

It looks like the new controller has a way to push updates directly to APs now, so updating should be easier next time.
 
I assume this was a little difficult, because your existing install was so old. Updates from a "recent" (don't ask me to define that) controller should not require adopting APs again.

Also, I've never run Unifi on CentOS, but the Debian guide adds the UBNT repository. Updates don't get much easier than "apt-get upgrade"!
 
I've never had an issue upgrading one. I tend to keep fairly current. I also decided to get a key since I have 3 APs to cover my house. Had to add one in the middle as the two on the ends did not cover everything through the walls.
 
I found a lot of people who had issues, it seems when you upgrade it sometimes gets stuck in some kind of loop where it won't re-adopt properly. Seems you have to upgrade the controller itself before you upgrade, which is kinda a pain. But that's what fixed it for me. I always forget the steps to upgrade too, I should probably save that somewhere. Like having to run the syswrapper.sh command and stuff.

Given they have a repo for debian I might just end up setting up a separate Debian VM as it will at very least make it easier to update the controller next time. But for now I'm good to go, I just wanted to be patched for that WPA2 exploit.
 
You're supposed to upgrade the controller first. Once upgraded, within the webinterface it allows you to update to the latest AP firmware too.

If you do it the other way around... I could imagine problems like you experienced...
 
Correct....always upgrade the controller first. Guess with my background I knew that and forgot that others may not.
 
Yeah the update instructions don't seem to specify that. They just tell you to scp the file to the AP and then run the command. I'll know for next time, if I remember. :p
 
Back
Top