Reconfiguring UniFi controller after a move to new host or a server can be a pain. Wouldn't it be awesome if you were able to migrate UniFi controller to a new server without having to configure everything from scratch? Here is how to do it.
Ubiquiti UniFI controller is a web-based management interface for managing several of Ubiquiti's devices. UniFi line of devices are widely gaining popularity as reliable networking gear at both prosumer and enterprise levels. Consumer-grade routers are great for small environments, once I moved to a bigger 3-level house, my reliable ASUS AC68U was not enough to cover the entire house. Actually, routers are powerful enough but most devices do not have powerful enough radios to send data back to the router through all the walls, which is why access points or mesh networks are gaining popularity.
I previously ran UniFi controller on my Docker-based Home Server with Traefik Reverse Proxy. I constantly tinker with my Intel NUC Home Server. This made UniFi controller unavailable at times. So I decided to move UniFi controller to cloud. Currently my controller is hosted on Vultr VPS and it has been working great!
I have migrated Ubiquiti UniFi controller several times: Windows to native Linux app to Docker to native Linux app on DigitalOcean VPS to finally now on Docker on Vultr VPS. I made these moves without losing the settings for my home network site. Otherwise, it would have been a lot of work to configure each and every device again. In this UniFi controller migration guide, I am sharing the process I used.
If you do not have UniFi controller installed already, I strongly recommend going the Docker way. You may follow my guide to install UniFi controller on Docker with Traefik Reverse Proxy. I followed this procedure to get UniFi controller running on the new VPS.
There are at least 3 ways you can migrate UniFi controller settings to a new controller software. The easiest way to restore UniFi configuration is during initial setup using the wizard, as shown below. Click on restore from previous backup and load the .unf backup file downloaded in step 1.
The next option is to go through the initial setup wizard first. You do not need to add any devices (press Next) or create a WiFi network (press Skip). The only two things you will have to do is provide admin user details for the controller and device authentication details as shown below.
You will need the device authentication details to re-adopt your UniFi network devices into the new controller. Confirm and finish the setup wizard. Since we are restoring from previous backup, you may hit Skip for Cloud Login Credentials. Once done, you should be on UniFi controller interface. From here, go to Settings->Maintenance and restore the .unf backup file, as shown below.
Hit Confirm and give it a few minutes. Your site and its settings should be restored and the controller will be restarted (it can take a while ~5 to 10 min). Login using your old controller credentials and continue to move UniFi controller.
Enter your new controller host IP address (local home network or IP of your cloud instance). Alternatively, you may use a FQDN, which is what I do. Then check Override inform host with controller hostname/IP and save the settings. If your UniFi controller is hosted on the cloud (away from your home network) or on a different subnet, you may disable the Make controller discoverable on L2 network option.
This is because your UniFi devices have not yet been adopted/recognized by the UniFi controller software. Your UniFi devices need to start sending data to your new controller. This involves modifying the inform IP on all your devices.
If your UniFi controller move was to a new server within same broadcast space (subnet) then the re-adoption of devices is quite easy. All you have to do is shutdown your old UniFi controller and have the new controller running. UniFi devices should automatically re-associate with the new controller. UniFi devices, by default inform to hostname unifi on port 8080. If there are two controllers with the same hostname, it will cause conflicts and hence shutting down your old controller is important.
However, if you had manually modified the inform IP previously (described below) to point to a specific IP address on your network (or hostname) and the IP address/hostname of your new UniFi controller server is different, then you will have to follow the method below (L3 adoption) to update the inform URL for the devices to be recognized again.
When UniFi controller is located on a different subnet or externally/remotely (eg. cloud VPS) then there are multiple ways to update inform IPs on your UniFi gear. Ubiquiti has an article on the various adoption methods. I am going to show you the two ways I followed and think are the easiest.
The keyword above is unadopted, which means if a device is already informing a controller it will not show up and you cannot modify the inform IP using this tool. You will have to shut down the controller that the device is informing to and then rescan on the discovery tool. Alternatively, you may use the SSH method described below.
As you update the above information and click Execute for each device, it should disappear from the list, indicating that it has been adopted (remember: only unadopted devices show up on the list). Within a few minutes after updating the inform URL, your UniFi controller migration will be complete and the devices should be re-adopted on your new controller.
The last step in moving UniFi controller to a new host is verifying that all the network devices have been adopted successfully and reporting data to your new UniFi controller. If everything went well then your devices on your new controller should all say Connected as shown above.
Like I said before, I have migrated UniFi controllers several times and I learned quite a bit during the process. In this Ubiquiti UniFi migration guide, I tried to share what I learned so a beginner can follow along. If you have any trouble, just shoot me a comment below and I will try to help you out. Otherwise, enjoy moving your UniFi controller to a new server. 2b1af7f3a8