Skip to content

Instantly share code, notes, and snippets.

@troyfontaine
Created April 3, 2022 05:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troyfontaine/f319b2507925e3465c296e70a479e379 to your computer and use it in GitHub Desktop.
Save troyfontaine/f319b2507925e3465c296e70a479e379 to your computer and use it in GitHub Desktop.
Migrating Unifi Controller from Cloudkey Gen 1 to Docker Container

How to Migrate a Unifi Controller from Cloudkey Gen 1 to Docker Container

Background: In an effort to streamline my local network and reduce the number of dedicated devices, I began an effort to move off of my Unifi Cloudkey Gen 1 to a Docker Container. While the migration should be straight forward-it is definitely not!

Before we begin, ensure that your existing Cloudkey is still connected to the network and operational. This is crucial to migrate the existing settings and to leverage the Unifi migration tooling for a site to save on having to wipe your configuration and rebuild everything from scratch.

  1. Launch your container (it is up to you to follow the documentation for the specific maintainer's flavour to ensure you avoid data loss!) Once you can access the set up screen (on TCP:8443) for the containerized controller, you can proceed to Step 2
  2. On your existing controller, Navigate to Settings -> Backup and download a settings only backup. This is CRITICAL because trying to import any history will result in the inability to log into the containerized controller. Once the backup file has been downloaded to your local workstation, continue to Step 3
  3. Return to the set up screen for the containerized controller. Choose to restore from Backup and select your backup that you just downloaded. Give it 5-10 minutes and try to connect to the login screen again. Confirm you can login with your credentials used on the original Controller
  4. Go back to the original controller, and navigate to Settings -> Site and click on the Export button. You will now be presented with a migration wizard. Download the configuration-but DO NOT USE IT IN ANY WAY!!! Once the configuration is downloaded, click the "Confirm" button.
  5. Next, you will be presented with a page to provide a new inform URL (this can be a DNS hostname for your new controller OR an IP address-choose wisely) - once you have provided the location of your new controller, click the "Migrate Devices" button.
  6. If you hop back over to the containerized controller, and navigate to the devices page, you will see your devices light up as they complete their migration from the Cloudkey to the container. Note: switches are relatively quick to migrate while the USG 3P can take a few minutes
  7. Once your devices are all migrated over and provisioned, you can go back to your Cloudkey's controller and complete the migration by clicking the "Forget devices" button.

That's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment