Restoring UniFi CK

Restoring UniFi CK

I run a couple of Ubiquiti's devices in my home network. I host my controller on CloudKey (1st gen), that's this device.

Equipment is pretty much rock solid, but I had two failing controller upgrades on CK in the last 6 months. That's a situation when blinking white light turns constant white and never gets to the constant blue.

I read a few articles on this topic and ended up following two scenarios from the official documentation.

First of all I wasn't able to access cloudkey's web UI. Page where you can go to the controller of CK's configuration. So I used mostly SSH which should be straightforward.

I'd strongly suggest downloading backup .unf file before upgrading. If you have auto backup enabled you can get it from the filesystem, but it's simply easier to have backup before you end up in this situation.

Reinstalling controller

I'd try this as a first step as it should be quicker and easier to do.
Here's a link to official documentation.

Steps are:

  • Go to UniFI DL page

  • Find desired controller software for Debian/Ubuntu and UniFi CloudKey and copy DL link. I'll use this one in the example below:
  • SSH to your controller (keep in mind to use your CK configured username/password and IP)

    ssh djordje@
  • From the controller execute this:

    cd /tmp
    dpkg -i unifi_sysvinit_all.deb
  • When controller is installed you can remove installer:

    rm /tmp/unifi_sysvinit_all.deb
  • Exit using exit command or Ctrl + D

  • Wait for blue light to access your controller

Resetting to factory defaults and restoring backup

Unless the previous step helped you, you should try this one. It's based on official documentation available at this link.

Before starting you should have a .unf backup file on your computer. Unless you have it you can extract it from CK using scp.

Obtaining backups:

  • SSH to CK and check do you have backups:

    ssh djordje@
    ls -la /data/autobackup
  • If you have at least one backup copy it to your computer:

    cd Desktop/ && mkdir unf_bkp && cd unf_bkp
    scp djordje@*.* .

Now you're ready to reset to factory defaults:

  • Reset to default over SSH:

    ssh djordje@
    ubnt-systool reset2defaults
  • When everything is done you should be able to access the controller and go to configuration to setup your username/password again. Previous step restored default username/password ubnt.

  • From the config check again for firmware/controller updates and apply if needed.

  • When the controller is up go to web UI (same IP as CK, but port 8443) and you should see configuration wizard.

  • Select to restore from backup and wait.

  • When previous step is done you should be able to login with your username/password combo and see whole site as nothing has happened 😊

Additional resources

  • I didn't have issues with mongoDB on my CK, but you may have it. Here's a link to official documentation.
Show Comments