HomeSoftware TestingSmart Home
 
  

How to fix an unresponsive Unifi Cloud Key

January 17, 2020

In general, I've been very happy with my Unifi cloud key for managing my Unifi network, but there have been 2 occasions over the past couple years where the cloud key has encountered unrecoverable failures.

In both cases, the cloud key's status LED was showing a white LED light instead of the normal blue.

When this occurs I'm unable to login to the unifi controller software's web interface. It hangs at login indefinetly after submitting my username and password.

The cloud key uses a mongo database that does not handle sudden shutdowns very well.

This means any time there is a power loss you are at risk of corrupting the cloud key's mongo database 😢

The first time my cloud key failed my neighborhood was dealing with semi-frequent blackouts for 4 hours at a time before the power utility could restore power--some sort of underground powerline issue.

As a workaround, I ended up buying an APC UPS 1500VA UPS that let's you connect another battery to it which gave me a ridiculous uptime for my modem + USG + US-8-60W switch + UAP AC Pro + UC-CK cloud key at 8 hours. I might not have power, but I'll have the internet to keep me distracted all day 😂

The workaround worked well until a couple weeks ago when it randomly happened again without a power outage as the cause.

So, for my future self, and the benefit of others, below are the steps to recover your UC-CK cloud key.

Solution 1: Try restarting the Unifi Service

Using ssh, ssh to yourUsername@theIpAddressOfYourCloudKey

sudo service unifi restart

or

/sbin/ubnt-systool reboot

If that doesn't work you'll need to go to solution 2, resetting to defaults and restoring from backup.

Solution 2: Reset the cloud key to defaults and restoring settings from backup

This wipes out all the backups stored on your cloud key so move them off the cloud key before proceeding

  1. Use a tool like WinSCP to connect to your cloud key's filesystem.
  2. Change to /data/autobackup
  3. Verify you have backups there. Download them somewhere safe--not on the cloud key.
  4. Using ssh login to ssh yourUsername@theIpAddressOfYourCloudKey
  5. Run reset2defaults
/sbin/ubnt-systool reset2defaults
  1. After a good amount of time your cloud key will restart and will likely have a different IP address.
  2. Use the ubiquiti device discovery tool - chrome extension to find your cloud key's new ip address on the network.
  3. Navigate to http://theIpAddressOfYourCloudKey and login as root / ubnt
  4. Select the option to restore from your backup and point to the saved backup from earlier.

This should restore everything back like you had it. If you see oddities in the unifi dashboard like missing a USG just give it more time to catch up.

But what if my backups have a an newer, incompatible, firmware version than what the cloud key reset to? 😱

This happened to me. The reset put me on an older ubiquiti firmware version than the cloud key backups somehow. To use the backups you need to upgrade your cloud key firmware to the same version.

  1. Using ssh login to ssh://root@theIpAddressOfYourCloudKey password ubnt
  2. Navigate to the ubiquiti downloads site and locate the firmware version that matches your backup.
  3. Note the url path to the .deb file of the firmware.
  4. In the ssh terminal
cd /tmp
wget *path you copied to the .deb file here*
dpkg -i unifi_sysvinit_all.deb

Once that finishes installing

rm unifi_sysvinit_all.deb
  1. Navigate to http://theIpAddressOfYourCloudKey and login as username: root password: ubnt
  2. Select the option to restore from your backup and point to the saved backup from earlier.
  3. Login to the cloud key's website using your original credentials (now that it restored the backup) and change your ip address for the cloud key back to what it was originally.

Your Unifi cloud key's LED light should now be back to blue from white, responsive, and working with your old configuration again.

Next steps: Best Solution

Since the original release Ubiquiti has put out the Unifi Cloud Key Gen2 which largely solves this problem by including a backup battery that allows it to safely shut down when the power goes out.

I'll be upgrading to that shortly and reporting back. Thanks for reading.

Photo of David Mello

David Mello

Breaker of software, geek, meme enthusiast.

 

DavidMello.com © 2023