Restoring Cloud Access when it's attached to an account that no longer exists on a UniFi controller

If a UniFi controller is stuck in a perpetual state of Connecting under Cloud Access Status, and it's not related to firewall or DNS issues preventing connection back to the Ubiquiti cloud, and no options to turn off Cloud Access are visible on the Cloud Access settings page, there may be leftover cloud access configuration on a previously existing user account that is no longer associated with any current site.

This solution requires manipulation of the UniFi controller's database. If you're not comfortable working with the mongo CLI, do not attempt the following steps. Take a full backup of your UniFi controller before proceeding!

Connect to mongodb on the UniFi controller host:

mongo –port 27117

Switch to the UniFi Database:

use ace

Show all admins:


Note the "ubic_uuid" associated with each account.

Show all settings:


Look for the line that begins:

{ "_id" : ObjectId("[objectid]"), "key" : "super_cloudaccess", "enabled" : true, "ubic_uuid" : "[uuid]"

and note the "ubic_uuid" listed in this line.

If the ubic_uuid matches an account that no longer exists, the cloud connectivity issue may be resolved by changing it to the uuid for a current Ubiquiti community account. If the current UniFi controller account doesn't have a ubic_uuid shown with its object in the db.admin.find() output, log into that account on the UniFi controller and attempt to enable cloud access for that user. Note that the UniFi controller may not show anything different, but go back to mongo and run db.admin.find() again and a ubic_uuid should now be associated with the admin account.

Use the command:

db.setting.update({ _id: ObjectId("[objectid]") }, { $set: { ubic_uuid: "[uuid of desired user]"}}) to update the cloud access to a current account

Use exit to leave the mongo CLI

Refresh the Cloud Access settings page, and the option to toggle Cloud Access should now be visible, along with a button to Disable and Remove cloud access. It may be necessary to disable cloud access and then turn it on again to restore full connectivity with the new credentials, but these options should now be visible where they were not previously. After updated credentials are entered, Cloud Access should function as expected.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/nevyxvrt/ on line 446

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /home/nevyxvrt/ on line 1