It is not possible to change which site is considered the default within the UniFi UI.
SSH into the UniFi controller.
mongo --port 27117
use ace
db.site.find()
returns:
{ "_id" : ObjectId("[hex number 1]"), "name" : "default", "desc" : "Default", "attr_hidden_id" : "default", "attr_no_delete" : true } { "_id" : ObjectId("[hex number 2]"), "desc" : "Site 2", "name" : "utn68o25", "location_lat" : 10.3245, "location_lng" : -24.5703, "location_accuracy" : 0 }
NOTE: This should list several sites.
Remove the default properties from the current default site and assign them to the site which is to become the new default site
db.site.update({ _id: ObjectId("[hex number 1]") },{ $unset: { attr_hidden_id: "",attr_no_delete: ""}}) db.site.update({ _id: ObjectId("[hex number 2]") }, { $set: { attr_hidden_id: "default", attr_no_delete: TRUE}})
db.site.find()
exit
NOTE: Restart the UniFi service for the changes to take effect.
After the UniFi controller has restarted, the original default site can be deleted on the Site page of the UniFi Settings.
NOTE: Once the old default site is deleted from within the controller UI:
db.site.update({ _id: ObjectId("[hex number 2]") }, { $set: { name: "default"}})
The old default site does not have to be deleted.
db.site.update({ _id: ObjectId("[hex number 1]") }, { $set: { name: "[any unique 8-char alphanumeric string]"}})