Enable Teleport VPN on Self-Hosted UOS After Migration
If you've migrated from a self-hosted UniFi Network Server to UOS Server, you may discover that Teleport VPN is unavailable after the migration. This happens because Teleport only works with the server's default site, and imported sites do not automatically become the default.
Teleport associates itself with the site marked as the default in MongoDB. During migration, imported sites retain their original identifiers while the automatically created default site remains the designated primary site. Updating these attributes changes which site UOS treats as the default.
This guide explains how to manually update the MongoDB database so your imported site becomes the default. Make a backup before proceeding, as this involves directly modifying the database.
!!!!!Warning!!!!
- Editing the UniFi MongoDB database can permanently damage your configuration if done incorrectly.
- Back up your UOS Server before making changes.
- This procedure is unsupported by Ubiquiti.
- Verify your Object IDs carefully before running any update commands.
Prerequisites
- Self-hosted UOS Server
- SSH access
- Root or sudo privileges
- Basic Linux command-line knowledge
- Existing imported UniFi site
- MongoDB CLI available
ssh user@your-serveruosserver shellmongo --port 27117use acedb.site.find(){ "_id" : ObjectId("[hex number 1]"), "name" : "default", "attr_no_delete" : true, "attr_hidden_id" : "default", "desc" : "Default" }
{ "_id" : ObjectId("[hex number 2]"), "desc" : "[imported site description]", "name" : "[imported site name]" }Step 5 - Use these commands to swap the site details
db.site.update({ _id: ObjectId("[hex number 2]") }, { $set: { desc: "default", attr_hidden_id: "default", attr_no_delete: true, name: "default" }})db.site.update({ _id: ObjectId("[hex number 1]") }, { $unset: { attr_hidden_id: "",attr_no_delete: ""}})db.site.update({ _id: ObjectId("[hex number 1]") }, { $set: { name: "old_default", desc: "old_default"}})Verify The Changes
db.site.find()Confirm that:
- Teleport appears under Settings → VPN after restarting UOS
- The imported site is now named "default"
attr_hidden_idis set to"default"attr_no_deleteis present
Once we have confirmed the data looks correct, we can back out.
exitexituosserver stopuosserver start- Teleport appears under Settings → VPN after restarting UOS

- With UID configured, One-Click options appear under Settings -> Identity

- With my UTR, now I see a valid Teleport end point to connect to.

After restarting UOS Server, your imported site should become the active default site, enabling Teleport VPN and related Identity features. If the changes do not appear immediately, verify the database entries before making additional modifications.
Thank you for taking the time to read this article. If you found it useful, please share it with others.
Troubleshooting:
Teleport still doesn't appear
- Clear browser cache
- Wait several minutes after restarting
- Verify the MongoDB changes
- Confirm the imported site is now named "default"
MongoDB connection failed
Possible causes:
- Wrong port
- UOS shell not active
- MongoDB service not running
Tested with:
- UOS Server version: 5.1.19
- UniFi Network version: 10.4.57
- Last verified: July 2026