The controller will run fine using the built-in java.exe included with the UniFi software, so no additional installation is required for basic functionality. However, Ubiquiti recommends using Adoptium due to Oracle Java licensing concerns and to stay current with supported versions.
If you choose to follow that recommendation instead of using the bundled Java, refer to the official guide to determine the correct Java version for your UniFi release. If using Adoptium, update the path to java.exe to match your installed version (the jdk-17.x.x folder name will differ on your system).
The examples below show both approaches. The only difference is which java.exe you call.
-
Open PowerShell as Administrator.
-
Navigate to the UniFi installation folder:
Set-Location "$ENV:USERPROFILE\Ubiquiti UniFi"
-
Install the UniFi Network Controller as a service:
Built-in Java:
.\jre\bin\java.exe -jar lib\ace.jar installsvc
Adoptium Java:
& "C:\Program Files\Eclipse Adoptium\jdk-17*\bin\java.exe" -jar "$ENV:USERPROFILE\Ubiquiti UniFi\lib\ace.jar" installsvc
-
Start the service:
Built-in Java:
.\jre\bin\java.exe -jar lib\ace.jar startsvc
Adoptium Java:
& "C:\Program Files\Eclipse Adoptium\jdk-17*\bin\java.exe" -jar "$ENV:USERPROFILE\Ubiquiti UniFi\lib\ace.jar" startsvc
-
Removing the service (if needed):
Built-in Java:
.\jre\bin\java.exe -jar lib\ace.jar uninstallsvc
Adoptium Java:
& "C:\Program Files\Eclipse Adoptium\jdk-17*\bin\java.exe" -jar "$ENV:USERPROFILE\Ubiquiti UniFi\lib\ace.jar" uninstallsvc
-
Test:
https://127.0.0.1:8443
-
Open Task Scheduler (
taskschd.msc). -
Go to Task Scheduler Library.
-
Click Create Task.
-
Configure:
General Tab
- Name: UniFi Network Controller
- Run whether user is logged on or not
Triggers Tab
- At startup
- Enabled
Actions Tab
Built-in Java:
"%UserProfile%\Ubiquiti UniFi\jre\bin\java.exe"-jar "%UserProfile%\Ubiquiti UniFi\lib\ace.jar" ui
Adoptium Java:
"C:\Program Files\Eclipse Adoptium\jdk-17*\bin\java.exe"-jar "%UserProfile%\Ubiquiti UniFi\lib\ace.jar" ui
-
Test
https://127.0.0.1:8443
Both methods work with either the bundled Java or Adoptium. The only difference is the path to java.exe. Tested on Windows 11 and Server 2025.
They recommend using Adoptium because Oracle's licensing for Oracle Java is so insanely hostile at this point. I don't know what version of Java that ships with the network controller by default, but its either horrifically out of date - like over 7 years old at this point - or use of it is against Oracle's terms of use.