Updating Unifi controller on CentOS?

Red Squirrel

No Lifer
May 24, 2003
62,931
9,871
126
twitter.com
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 don't recall how it was originally installed, pretty sure it was just a tar.gz file that you extract to a folder and just run, but now it changed.

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.
 

Red Squirrel

No Lifer
May 24, 2003
62,931
9,871
126
twitter.com
Hmmm never found that in my search, could have worked. Though I prefer to use the link from the ubnt site so I know it's actually the latest.

Though, I think I may have 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 and the other files almost seemed useless, like some were even blank. 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:

ASK THE COMMUNITY