How-to Migrate Unifi Controller

Sometimes you need to migrate your Unifi Controller to a new server, because your current one is getting too slow or when it’s time for simply something new. No matter which platform you are coming from, you can migrate your Unifi Network to any other suitable server for the Unifi Controller. That can be the Cloud Key Gen2 or maybe the UDM-Pro, but also a docker image or a new Raspberry Pi.

We are going to use the export site function for the migration. This is the easiest method to migrate your Unifi network to a new controller. It comes with one downside, you will have 2 sites in the new controller, the default site (which will be empty) and your migrated site.

If you don’t want this, then your only option is to use the backup and restore method. But I am not really a fan of this, because the new controller will have (probably) another IP Address. This will require changing all the inform addresses on each device manually.

Requirements to Migrate Unifi Controller

Before we can migrate our Unifi Network to a new controller we need to make sure that the firmware of the new controller is the same version or higher than the old controller. You can check the controller version under Setting > Controller or under Settings > System Settings > Maintenance if you are running version 6 or higher.

You can migrate your Unifi controller in the old settings screen. If you are using the new settings screen, then make sure you disable it first:

  1. Go to settings
  2. Select System Settings
  3. Disable the New Settings option

Install the new controller

Prepare the new controller by walking through the initial setup wizard. You don’t need to add any devices and you also don’t need to create a wireless network. You only need to create the admin credentials or connect them with your Ubiquiti account.

Make sure the controller is updated to the latest firmware, or at least the same or higher version as your old Unifi controller.

Migrate Unifi Controller to New Server

Time needed: 10 minutes

Migrating the Unifi Controller will only take a couple of minutes. Your network will probably offline for a minute or so.

  1. Export the current site


    First, we are going to export the site in the old controller.

    1. Make sure you have selected the correct site in the top bar
    2. Open settings
    3. Click on Site
    4. Scroll all the way down and click on Export Site.


    migrate unifi controller

  2. Download the backup file


    Download the backup file in the migration wizard. Note the .unf file that will be downloaded.

    Unifi controller migration

  3. Import the site in your new controller


    Open your new controller and click on Import Site in the top bar.

    If you don’t see the Import Site option, then turn of the new User Interface first under Settings -> System Settings -> New UI -> Deactivate.

    See the import method below for versions 6.4 and higher

    Give your site a name and select the backup file that we have just downloaded with the export site wizard.

    Import site in unifi controller

  4. Confirm the migration in the OLD controller


    Go back to the OLD controller, and confirm the migration in the Export site wizard

    Move unifi controller to new server

  5. Migrate the devices


    In this step, your network will go briefly offline.

    Select the devices we want to migrate and set the correct inform URL. Make sure you enter the IP Address or URL of your new controller.

    Select all the devices you want to migrate and click Migrate devices.

    set inform url during migration

  6. Check the devices in the new Controller


    Go back to your new controller and open the devices page. All the devices should be listed there with the status provisioning. It can take a couple of seconds for them to show up.

    You will need to wait until all the devices are connected before we can continue.

    Provisioning Unifi devices

  7. Forget the devices in the old controller


    The last step for the migration is to forget the devices in the old controller. Go back to the old controller, and click on forget devices in the migration wizard.


    Forget devices in old unifi controller

Migrating sites on new Unifi Controllers (version 6.4 and higher)

Importing sites on new controllers that are running version 6.4 on higher is a little bit different. If you only need to migrate a single site, then you can use the backup restore method. All the steps are the same, only instead of import site you go to:

  1. Settings > System > Maintenance
  2. Click on Backup / Restore
  3. Upload the backup file that we created in step 2

If you have multiple sites, then you will need to enable Multi-site support first in the new controller. You can then use the method above to restore each site. To enable multi-site support go to:

  1. Settings > System > Application Configuration
  2. Expand Site Configuration
  3. Enable Multi-Site Management

Wrapping up

You should now have successfully migrated your Unifi Network to a new controller. With your new controller up and running it’s also a good idea to set up a proper backup solution for your Unifi Controller.

The controller will make backups by default, but they are stored on the controller self. A better idea is to copy the backups to cloud storage of your choice, like dropbox for example. I have written a guide on how you can copy the backups, it only takes another 5 minutes to set up.

If you have any questions, just drop a comment below.

71 thoughts on “How-to Migrate Unifi Controller”

  1. Hi Rudd

    Your site is great, lots of usefull information nicelly presented, I can not thank you enough.

    This guide is pretty much what I would need to do but I have some questions…

    Mi infrastructure of Ubiquiti devices is on the VLAN 1 in a 192.168.x.x/x network, we are using a UCK Gen2 but due to the number of the devices it is getting slower and unrresponsive more often, so, I downloaded the Unifi Controller and created a Ubuntu Server VM and installed the controller there, now I need to move my devices to our new controller, this new controller is in a completelly different network (10.x.x.x/x) in a different VLAN.

    So, the export mecanism is more coherenent for me since the backup will drag the IP addressing of the UCK Gen 2 and that’s not what i want.

    But I have several questions:

    1) Can I carry on with the exportation in a partial fashion?, Exporting only the APs now and later the switchs (I have a third party gateway). Leaving the switchs in the UCK Gen 2 for a while.

    2) In the exportation process, is the existence or absentia of the Management VLAN or Network an issue?, as I commented you, all my Ubiquiti devices managed with the UCK are in the VLAN 1, I don’t have the Management Network set in the devices.

  2. Hi, Great site many thanks.

    My old controller was on a Raspberry Pi with an Ip of 192.168.1.238:8443

    When I migrate, do I stick with port 8080 or enter 8443?

    Thank you.

  3. Thank you, very useful. Kinda annoying that they hide this behind the ‘legacy’ interface. There isn’t any options to do this in the ‘supported’ one. You helped me get off an old cloud key to a docker container by pointing out where to go to go back to the old interface

  4. hi there, we are in the process of migrating our site into a newer pc. i read the article on how to do it.

    what i have done up to now:
    1) export the latest backup file from old pc
    2) created a VM just for testing it and after installing the latest unifi network application [ver. 7.4.156] i had the option to import the backup file
    3) after importing, i logged in with existing credentials and everything seems to be in order as it should, all 80+ SSID’s and their passwords, bandwidth profiles, custom security rules.

    question is:
    1) do i have to do the “migrate devices” and “forget devices” steps on old pc?
    2) once the import is done on new pc, do i get a pop up for adopting them from scratch?

    • If you used the backup file then you don’t need to adopt them. They should all be listed as adopted. Just turn of the old controller should be enough.

  5. Thanks worked well. Only minor annoyance: the dashboard after migration shows Mac OS and an iMac as icon. This was the previous setup, it’s now running in a Linux container.

    I can’t find an option to manually update what Unifi thinks the server OS is.

    Thanks

  6. I’ll post this in Dutch as it is a terribly local question 🙂 Apologies to the rest of the world.

    Hallo Ruud, ben je wellicht ook in te huren om mij te helpen mijn Unifi situatie thuis (USG, wat switches en 7 AP’s) te optimaliseren (ik heb vaak last van korte dropouts van het systeem) en de controller te migreren van oude laptop naar nieuwe? Of weet je wie dat zou kunnen doen in Amsterdam?
    Veel dank bij voorbaat voor je aandacht hiervoor.

  7. I have a controller installed in FL and I live in NY. I have a second gen 1 cloud key controller I’d like to configure the one located here in NY and mail it down and have it plug and be plug and play. Is there an easy way to migrate to this new controller without being on site and be able to ship it down and plug it in?

    • You can configure the cloudkey and then just send it to FL if that is what you mean. Another option would be to configure it, export the conf and then import it in FL, but that would require remote access to the cloudkey.

  8. So, I missed the part where I was supposed to set up the new configuration first. In the initial set up of the new controller I used the restore from backup. It looked like everything worked, but now at the log in screen on the new controller it won’t let me log in. I would assume it’s trying to use my username and password from the original configuration, but that’s not working. I tried ubnt/ubnt. I was using a none email username in the original configuration, so forgot password doesn’t help.

    Any ideas of what the username and password would be? Strange that it didn’t come over with my backup.

  9. I’m currently running standalone Network 7.1.66 on a Raspberry Pi, and am planning to migrate to a UCK GEN2 Plus or UDM Pro. Some differences from your guide that I’ve noted:

    * To check version, under your Requirements to Migrate Unifi Controller section. There is no Settings > System Settings > Maintenance in 7.1.66. The version is now displayed directly on the Settings menu at the bottom.

    * Configuring to use the old settings screen, under your Requirements to Migrate Unifi Controller section. In 7.1.66, there doesn’t seem to be the option to disable New Settings.

    * Export the current site, under your Migrate Unifi Controller to New Server section. There doesn’t seem to be export functionality in 7.1.66. Instead, you can generate and download a backup (.UNF) by going to Settings > System > Backup, and choose click Download next to Download Backup.

    Are there any other differences I should look for when restoring the backup on the cloud key / UDM Pro? Thank you!

  10. The instructions for migrating version 6.4 and higher doesn’t say anything about how you set the inform URL on the APs.

    I think, but I’m not sure, that this will happen as part of the “Export site” command (I’m using a 7.2 series controller), which is mentioned here:

    https://help.ui.com/hc/en-us/articles/360008976393-UniFi-Backups-and-Migration#h_01GFK9982KHJD490P822NT2ASW

    Seems weird that an operation that could bring down your entire network is treated so lightly in the docs, but hey.

  11. Thanks for this guide. I managed to migrate from a Pi to a UCK using the backup/restore method with the UCK on a dynamic address. I then powered off the Pi, changed the UCK IP to match the static IP of the Pi and was amazed when all the devices just reconnected. No re-adoption required!

  12. I am on Controller 5.11.46.0 and unable to SSH in to the ap’s to do a set-inform. If I “enable advanced features” I understand that would give me access to the SSH credentials.
    I also have another controller spun up with Controller 7.1.68.
    Can I simply shut the old one down and set the IP the same on the new one?
    Would that cause the ap’s to automatically move to the new controller?

  13. hey
    very good guidance but I failed. I did export both backup and site into new laptop but while migrating via wizzard scenario I “sent” decivice into wrong IP address. So now devices are disconnected on old, and still offline on new.
    What options do I have now?

    • Well, this site is called LAZY admin.
      So if at all possible I would create a docker container or something on the IP address you pointed your devices to. Then you can re-direct them to the correct IP address using the steps provided above / and by me.

      If you don’t have access to that IP address (e.g. you provided a public IP address or something) you would have to stick with the comments above…

  14. Ola Rudd,

    Obrigado por explicar o processo de migração.
    Acabei de faze-lô, e tudo funcionou perfeitamente.

    Abraços,

  15. So I got my dad’s network migrated/setup and it works great. Had to manually factory reset all of the AP’s which was a hassle for him, but got him up and running pretty quickly. Teamviewed into his PC and then just swapped out the USG for the UDM-Pro and it started up great and could then do remote admin.

    I liked it so well that I went ahead and purchased a new UDM-Pro for myself. I’m on a USG-Pro with CK Gen2 and 4 Protect cams. Based on my research so far, a backup of the old system and restore to the new UDM (after initial setup and update to latest firmware and Network v7.0.23) looks like the way to go. My question is do I need to do anything with backups/restores of the CK-Gen2 and/or Protect? I didn’t think I needed to do anything on the CK-Gen2 (mainly just adjust the UniFi OS settings via Portal on the UDM-Pro), but I’m guessing to pick up the settings for Protect, I will need to restore the backup to the UDM-Pro/Protect to get all of my settings/config/users, etc?

  16. I have been remote admin’ing my Dad’s home network since I set it up about 4 years ago (USG, original CloudKey, 8 port Unifi PoE switch, 3 AP Pro’s). I have a USG-Pro, CloudKey2, switches & a bunch of AP-Pro’s). Recently I went to check on his network and could not connect. Looks like CK has died so we decided to get a UDM-Pro to replace the USG, CK combo. I’m thinking just do a fresh config, but I do have an old backup of 5.12.xx from about 2 years ago…any advice?

    And any pointers for sequence of events to use, my Dad is very technology challanged and inpatient, so I need to take this slow and easy. Thinking 1) disconnect old USG & CK 2) Plug UDM into cable modem and switch into UDM 3) Power up and use mobile app for initial config 4) Use TeamViewer on his PC to expand on initial config and get myself setup for remote access again. 5) remote config via UniFi portal and/or Teamviewer.

    • I don’t know if the old backup is going to work. If you are on-site you can try it of course.

      If you want to do everything remotely, you will first need to factory reset all devices. To do this you would need to SSH into each device and perform the factory reset. Then, as the last step, you can set up the UDM Pro.

  17. Thanks for putting this together. I found this really useful and have successfully Migrated to my new controller. Was a nervous few moments but went without a hitch. Thanks again

  18. New to Unifi.
    Will this work if you are moving from USG Pro4 to UDM with the controller software on a laptop, not on a cloud key?

  19. My issue/reason for migrating is that I upgraded from version 5.x.xx to version 6.5.55 and with it came the CPU and memory hogging from Hell. I have tried everything suggested in the documentation, to no avail. (I run Unifi in a container under Proxmox.)

    I have just created a new container and intend to revert to the version 5 of Unifi Controller to rid myself of the issues that came with the upgrade to V6 but, clearly, this method of migrating will not work for me.

    If anyone has any suggestions for the least painful way to rebuild my configuration on V5 would be most appreciated.

  20. Hello

    thanks for this guide, it was a great help but i had 1 issue when migrating my raspberry pi controller to docker

    i had to change the network setting of the docker to use host and not bridged

    Office-AP-BZ.5.43.52# info

    Model: UAP-AC-Pro-Gen2
    Version: 5.43.52.12774
    MAC Address: 78:8a:20:48:db:44
    IP Address: 192.168.200.8
    Hostname: Office-AP
    Uptime: 182931 seconds

    Status: Timeout (http://172.17.0.2:8080/inform)
    Office-AP-BZ.5.43.52# set-inform https://192.168.200.13:8080/inform

    Adoption request sent to ‘https://192.168.200.13:8080/inform’. Use the controller to complete the adopt process.

    Office-AP-BZ.5.43.52# info

    Model: UAP-AC-Pro-Gen2
    Version: 5.43.52.12774
    MAC Address: 78:8a:20:48:db:44
    IP Address: 192.168.200.8
    Hostname: Office-AP
    Uptime: 182942 seconds

    Status: Unknown[11] (https://192.168.200.13:8080/inform)

  21. I need to do this kind of migration, but I’ve lost the password to the primary administrator account on the existing controller. I have -another- admin account and password, but it’s unable to do everything.

    Is there a way to export the configuration of the old site w/o the users/passwords so I can instantiate a new site with passwords I know?

    I’m not keen to have to reconfigure everything from scratch on a new controller after forgetting all the devices on the one I’m retiring.

  22. Was hoping that somone could clarify how to change the inform url using the backup/restore procedure for 6.4. Thanks, Todd

  23. Thanks for this informative write up. I am a little confused still though. If I am migrating a site from Windows PC controller 6.4.54 to another Windows PC controller 6.4.54 which steps are different? Do I turn off new user interface and Export on PC 1 or just do a regular backup? Do I turn off new user interface and Import on PC 2 or just do a restore? And how will the inform URL be updated? Thanks, Todd

      • What about changing the inform url? How do I specify the new ip. I’ve failed at this before on a PC move and had hours of troubleshooting and reconfiguration to get operational again

        • Hi Rudy – Was hoping that you could clarify how to change the inform url using the backup/restore procedure for 6.4. Thanks, Todd

      • Reply to Todd:
        I switched hosts for my docker containers.

        What I did was pretty simple:
        Backup your config on the OLD controller.
        Start up a new controller (on a different IP!)
        Restore the backup from the OLD controller.
        Change the INFORM address on the NEW controller (Settings ==> Controller hostname/ip) to the NEW controller IP/hostname (set the checkbox “Overwrite INFORM host with …”.
        Change the INFORM address on the OLD controller (Settings ==> Controller hostname/ip) to the NEW controller IP/hostname (set the checkbox “Overwrite INFORM host with …”.
        Wait for all your devices to show up on the NEW controller.
        Shutdown the old one, DONE!

          • Todd — just curious what you ended up doing back in November? Or did you follow the commenter’s idea from March?

          • Thanks for asking Mark. When I asked my question I had just completed a fiasco move from one computer to another which resulted in my having to re-set up my entire configuration. My questions were in preparation for the next time, which hasn’t happened yet!

  24. Didn’t work for the new CloudKey Gen2 Plus.

    The problem is that my software controller (running on MacOS) is 6.4.54 whereas the CloudKey comes with 6.1.71 and does not detect any later firmware updates.

  25. Before migrating devices, you have to change the controller hostname/ip on new controller
    (settings, controller, controller hostname/ip)

  26. So I got to the “Migrating” part but it failed. With now the original Controller is showing Disconnected AND Migrating and the new Controller simply showing as “Disconnected”.
    Two items that were different for me. 1) The original controller was on port 8443 (on Amazon). I put the new controller on a Windows box and used the same port 8443. So that was one change. 2) In the process the initial address shows http:// xxx.xxx.xxx.xxx but the original (and the new one) are set up using httpS:// – it gave me the option to migrate and I THINK I saw it change to https:// but figure it’s worth noting. Thoughts? Any returning/redoing/resolving possible? Love the method and thought we were home free but we still have 15 more sites to migrate and figured we better resolve this first. Thank you!

  27. I just got the new udm pro and retired from my backup on my controller that was on my raspberry pi and it worked.

    The only thing that didn’t transfer was all my history for data usage on my devices. However all my site settings and devices all went over and I’d didn’t have to configure anything.

  28. I just finished a migration from my Windows 10 ‘localhost’ controller to a new CloudKey Gen2+. It has to be performed via restoring a backup, however various issues encountered (for the basic user):

    1. finding my locally hosted controller –> via https://localhost:8080
    2. Trying to restore a backup –> https://help.ui.com/hc/en-us/articles/360008976393-UniFi-How-to-Migrate-from-Cloud-Key-to-Cloud-Key-or-UDM it appears that the CloudKey has an old controller version from the box. The controller can’t be updated via the UI (it says no updates available), so you need to SSH into the CloudKey
    3. Next issue: how to SSH into the cloudkey? –> https://help.ui.com/hc/en-us/articles/218850057
    4. Next issue: what’s the right SSH username / password? –> https://help.ui.com/hc/en-us/articles/204909374. If you already started trying to manage / restore from backup in the cloudkey, you will need to use ‘root’ as the SSH user, and your UI.com SSO user password
    5. After successfully logging in via SSH, the following instruction to update the controller version via SSH was pretty straight forward: https://help.ui.com/hc/en-us/articles/216655518
    6. Finally, with the newer controller version, I could restore from a backup. Obviously forgot to turn off the locally hosted windows controller, so at first all network devices show up as ‘disconnected’. After turning off the windows controller (first disabling the unifi controller process in taskmanager, then deinstall the controller), all was fine in the new CloudKey G2 Plus

  29. I had to do step 3 (switch off ‘new settings’) on the destination site as well, otherwise the site switcher doesn’t work as described.

    After that it worked brilliantly!!

    Thanks

  30. I’m trying to migrate from a controller in version 6.0.41 to a new controller with version 6.1.71.
    In the latest version the “Current Site – Import Site” menu option is not there anymore.
    How can I import the “old” site to 6.1.71 controller?

      • Thanks for the hint!
        It worked and it was much easier than expected.
        I just run these steps:
        – take a backup on the old controller (6.0.41 running on Ubuntu 20.04.2 LTS)
        – run a “Restore From Backup” on the new controller (6.1.71 running on Cloud-Key Gen 2)
        – shutdown the old controller ( sudo systemctl stop unifi)

        After few minutes all the devices have green light on the new controller.
        All is working fine even if the two controllers was on a different sw level.

  31. I tried following your guide with my new UCKG2 (migrating away from a Raspberry Pi) but have been told by UniFi support that site migration isn’t possible due to my new Cloud Key is running UniFiOS 🙁

Leave a Comment

0 Shares
Tweet
Pin
Share
Share