Main Menu

Recovering from a failed Unifi Cloudkey (CK) update

It’s really not uncommon to ‘do everything right’, yet end up with a unifi CloudKey that is messed up after clicking update in the web ui/app.

Various things can cause this, from out of sequence updates, to the base software getting downgraded when the firmware is updated etc. If you are here, you already know what I mean.

Symptoms can include, but are not limited to:

Connection refused when trying to open the cloudkey on its management port (usually 8443)
Being able to get to the cloudkey options, but trying to manage the network results in a blank page
Being able to get to the cloudkey options, but logging into the cloudkey never gets past the login screen
The CloudKey favicon showing in browser, but just a blank page displayed

The CK light might be flashing or solid on.

This guide is targeted at the CloudKey Gen1, it ‘may’ help with other versions. You will need to be able to connect to the CK and SSH onto it. If you can’t, see the emergency recovery note at the bottom of this post.

So, for these steps you will need the credentials for the key and for it to not be totally corrupted (i.e. you can SSH to it). these are the same you normally login with (admin/[password]). This guide is for windows, but should be translatable if you are on another platform. DISCLAIMER: This guide is for reference. If you connect to any device via SSH, then the responsibility is on you to ensure you don’t make things worse.

Dont ever try to restart these by pulling the power/PoE connection. That will likely make things a lot worse if you can at the moment still SSH into the key. A lot worse means emergency recovery and backup restores.

Step 1: try to get the backups off the Cloudkey using WinSCP. Login to the CK IP, accept any certificates and browse to data/autobackup. Copy everything off the key just in case. If you have no backups here, put that in your notes to turn on when you have a working CK. You’ll need these if you have to do the emergency recovery later.

Step 2: Login to the key via SSH, I like to use SolarPutty, but anything that works will do. Try issuing a reboot command. Wait at least 15 minutes to

Step 3: Get yourself some information about the software on the key (this may or may not match what you see in before if went offline, and may be a lesser number). The command is: dpkg -l | grep unifi

Step 4: Grab the latest firmware and software URLS from You’ll be able to see them once you accept the EULA. These are for using over SSH on the CK.

Step 5: (This may or may not be required). Run the 2 shell commands from
referenced here:
unifi_version=$(grep -io “We do not support upgrading from 5.” /usr/lib/unifi/logs/server.log | grep -io “5.” | cut -d’.’ -f1-3 | sort -V | tail -n 1)
if [[ -n “${unifi_version}” ]]; then rm unifi_sysvinit_all.deb 2> /dev/null; wget${unifi_version}/unifi_sysvinit_all.deb && dpkg -i unifi_sysvinit_all.deb && rm unifi_sysvinit_all.deb; fi

Step 6: Ensure ubnt tools are up to date with: apt-get update && apt-get install –only-upgrade ubnt-tools (This is refernced here )
I saw that the version here was lower than I expected, but ran the command, let it complete and moved onto next steps.

Step 7: Firmware update. Using the URL and latest firmware you found above, issue the firmware update command: ubnt-systool fwupdate…… (an example would be ubnt-systool fwupdate ). Wait for it to complete. Give it plenty of time after completing, i.e. go make a drink.

Step 8: Software update preparation. Using the software URL you found above, issue the commands:
cd /tmp (to move to temp dir.)
ls – l (To check if there are any previous software update files there (none in my case). If you do have them, issue ” rm unifi_sysvinit_all.deb ” to remove them.

Step 9: Software update download. Issue the command wget but substitute the URL you found for the latest software earlier (an example would be wget ). Wait for it to complete.
(referenced here )

Step 10: Install the software with: sudo dpkg -i unifi_sysvinit_all.deb

Hopefully after this completes, you’ll have the latest firmware and software. Your current config will be able to load and you’ll then be able to get back onto the management of the CloudKey/network.

If you cannot SSH, or this doesn’t work, then recovery may be the next steps. See here for that:
You’ll need a backup from somewhere for this.

No comments yet.

Leave a Reply