This post was inspired by a post in a Ubiquiti forum on FaceBook about whether you should have a single cloud hosted controller or a Cloud Key per site. I use one per site as it gives me a lot of flexibility, allows the client to move on if they no longer use my services and can be upgraded independently of other sites.
However one guy chimed in and said ‘I’ve got a bunch of CK v1 that go down all the time and require an onsite to reload them form scratch. I made a couple of suggestions, hence the reason for this post. Here’ is the full version of how to deal with these things- they can get cranky occasionally!
- When you set one up for the first time, always take a backup and download it before you leave the site
- Always set the logs and backups so that they won’t fill up the SD card
- SD cards use wear levelling to last longer- use a bigger card to have less issues with the card wearing out
- If replacing the SD card don’t use a crappy brand, had loads of issues with the supplied Kingston ones, Samsung no issues ever
- Power issues will corrupt the built in MongoDB database, and sometimes it won’t recover. It’s a 32 bit only install so you can’t use any modern tricks to keep it pristine. I haven’t tried turning on journalling, let me know if this works
- I will often run the Cloud Key v1 from a POE port on a switch, and additionally run a USB cable from the port on a USG-Pro-4 to the power port on the Cloud Key. This means that rebooting the POE switch or the USG won’t affect the cloud Key’s access to power. Worth it for <$5
- If the worst happens and the Cloud key does go down, read on!
Straight after this conversation I started to have troubles with one of Cloud Keys, so I’ve been going through the tips online.
First, check the database using this article –
This didn’t fix mine, so going down the rabbit hole even further I found this-
Then of course if things have really gone Pete Tong, you may need to recover the device using the emergency GUI-
Supplemental- this article shows how to upgrade the Cloud key via SSH
Interestingly my Cloud Key appears to have had an issue with an update. I downloaded a backup before doing the update (lucky!) and had issues since. So the way I had to fix it was this-
- SSH / SFTP in to Cloud Key
- Download all the backups
- Reset the Cloud Key to factory defaults
- This restored controller software 5.11.50 but my backup was from 5.12.35 so it would not restore
- Had to set up the Cloud Key as a new install, then upgrade the controller software
- (You could probably just log into the ‘Admin Cloud Key’ and upgrade it in ‘Maintenance’ tab)
- Then restore the backup in the setup interface-
- manually set the restore file if it doesn’t see the ones on it’s internal card
- All good!
I nearly needed new underpants when the factory reset showed me there were no backups! Hint to UBNT- how about showing the backups (they did exist!) and tell the user that you can’t restore them until you upgrade the Controller software. This could save many people’s sanity…