Skip to main content

unifi-controller-install

I have a Ubiquiti AP at home and configured it a long time ago (years), I wanted to tweak some settings in the config but have long since lost the controller install and config so went to install it again on a VM. I hit a few issues around Java so I'm briefly documenting the steps here for my future self (or anyone else that might find them useful)

VM setup

  • Install a Ubuntu VM using current LTS Server iso (ubuntu-20.04.3-live-server-amd64), initial configuration of 1vCPU, 3GB RAM, 25GB Disk
  • Copy over SSH key and disable both root and password authentication in sshd_config
  • Run updates and reboot

Java setup

Strangle/ worryingly the Unifi Network Application still only supports Java 8 so we need to specifically install that version, the controller service will not start up if you're suing a newer, more current version.

sudo apt install openjdk-8-jdk
wget https://dl.ui.com/unifi/6.5.53/unifi_sysvinit_all.deb
sudo apt install ./unifi_sysvinit_all.deb

Note If you have another version of Java installed on the machine you need to set Java 8 as the default and you might have to edit the unifi config to point to Java 8, this threw me on my first install (hence this doc).

  • You can change the default using this command: sudo update-alternatives --config java
  • You can edit the /etc/init.d/unifi config file by changing the JAVA_HOME path: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

You should find the controller running now e.g. https://192.168.1.190:8443/

  • I had to create a https://account.ui.com account to run through the initial setup, I don't think this was a requirement when I first set this up a few years ago but I guess that's the way it's gone.

Once logged into the controller it sees my AP, but understandably I'm going to have to reset it to get configuring it. Note to self, backup this management VM for future use!