Monday, March 24, 2014

Run UniFi Controller as a Windows Service

We just installed Unifi 2.4.6 on 64-bit Windows Server 2012 R2.  Here are the steps to run UniFi Controller as a Windows Service:

  1. Make sure UniFi is not running.  
  2. UniFi 2.4.6 appears to install 64-bit Java 7r21.  Uninstall it.
  3. Download and install jre-7u51-windows-i586.exe
  4. Locate your java installation directory - C:\Program Files (x86)\Java\jre7\bin
  5. Add the dir above to the PATH (from Computer->Properties->Advanced system settings)
  6. Run a command prompt (as an Administrator, right click on Command Prompt and choose Run as administrator.
  7. cd <unifi_base> (cd %userprofile%/Ubiquiti Unifi will usually do the trick, including the quote marks)
  8. java -jar lib\ace.jar installsvc
  9. Start the service: net start Unifi Controller
  10. Don't forget to make exceptions in the Windows Firewall for C:\Program Files (x86)\Java\jre7\bin\java.exe - that's the process listening on :8443 for the Web site.