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.

Get more stuff like this

IT, Office365, Smart Home, PowerShell and Blogging Tips

I hate spam to, so you can unsubscribe at any time.

52 thoughts on “How-to Migrate Unifi Controller”

  1. 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!

  2. 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?

  3. 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…

  4. Ola Rudd,

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

    Abraços,

  5. 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?

  6. 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.

  7. 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

  8. 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?

  9. 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.

  10. 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)

  11. 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.

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

  13. 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!

  14. 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.

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

  16. 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!

  17. 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.

  18. 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

  19. 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

  20. 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.

  21. 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