Migrate UniFi Controller from Windows 10 to Ubuntu Server 18.04

Tomas Savenas
2 min readOct 3, 2019

Installing UniFi Controller on Windows machine probably is the easiest setup. Just couple “next, next” buttons and you have it. By Default on Windows system the installation directory is in user home directory. Later it could be uncomfortable to administrate.

After some time I decided to Migrate UniFi Controller from Windows 10 to Ubuntu Server 18.04.

A backup file is necessary, if you don’t have need to make it. This could be done by using a dashboard and the settings menu.

UniFi Controller Setup

I created a brand new virtual machine [1]. Then I setup a UniFi Controller on it steps are below:

1. Install required packages before you begin with the following command:

sudo apt update && sudo apt upgrade -y
sudo apt install -y ca-certificates apt-transport-https

2. Use the following command to add a new source list:

echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list

3. Add the GPG Keys. To add the GPG Keys use one of the two methods described below.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -
echo "deb https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50sudo apt update

4. Install the UniFi controller.

sudo apt install -y unifi

Migration

Open installed UniFi controller using IP address and port 8443 in my case:

https://192.168.0.100:8443

Wizard will ask for name of the controller. It could be default. In the next step choose restore from backup and select option “Alternativly, you can upload backup file”.

Backup folder path name is below. Paste the path below:

%HOMEPATH%\Ubiquiti UniFi\data\backup\

File name could be like 5.1012412.unf. Depends on which version you are backup.After few seconds setup will be completed and you will see all devices in place.

Reference

#1 https://medium.com/@tomas_savenas/all-great-things-start-from-installing-ubuntu-9500873fec82
#2 https://help.ubnt.com/hc/en-us/articles/220066768-UniFi-How-to-Install-and-Update-via-APT-on-Debian-or-Ubuntu

--

--

Tomas Savenas

Kibernetinio saugumo entuziastas; Aktyviausias Lietuvis TryHackMe platformoje; Inovacijų valdymo ir Antreprenerystės Magistrantas @ KTU