October 19, 2017, 07:25:36 AM

Author Topic: How to run Unifi Controller as a Service in Windows  (Read 11250 times)

Offline Adventech

  • Bringing Integrity to Information Technology
  • Administrator
  • Jr. Member
  • *****
  • Posts: 59
  • Karma: +0/-0
    • Adventech Group, Inc.
Re: How to run Unifi Controller as a Service in Windows
« Reply #2 on: June 14, 2017, 03:55:23 AM »
*** UPDATED ***

PROBLEM:

Ubiquiti UniFi Controller as a Service in Windows?
Ubiquiti UniFi Controller as a Service in windows and connect to Cloud Access?

SOLUTION:

1.) Close any instances of the UniFi software on the computer. If you just installed the UniFi controller, make sure to open it once by using the icon on the desktop or within the start menu. Once it says “UniFi Controller (a.b.c) started.” you can close the controller program. This is needed to generate some required files for the service to work.

2.) Uninstall any current versions of Java x86 or Java x64. Install Java 64bit, version 8 here:
https://www.java.com/en/download/manual.jsp

3.) Remove the Java environmental path if you previously had it from an old install of UniFi as a Service.

4.) Open the command prompt as an Administrator. For example, on Windows 10, right click on the Start Menu and choose “Command Prompt (Admin)”.

5.) Change directory to the location of UniFi in your computer using the following command (exactly as it is here, no substituting needed):

Code: [Select]
cd "%UserProfile%\Ubiquiti UniFi\"
6.) Once in the root of the UniFi folder, issue the following (this installs the UniFi Controller service):

Code: [Select]
java -jar lib\ace.jar installsvc
7.) Once you’re at a new command prompt line, after it says “Complete Installation…”, issue the following:

Code: [Select]
net start unifi
8.) Close the command prompt window either by entering the “exit” command, or clicking the X.

9.) There is no longer a controller applet, like that other window that popped up. To access the controller you need to open your browser and go to https://localhost:8443. Alternatively you can use the desired interface IP, or FQDN that is mapped to that host (in place of “localhost”).

Note: You will need to use Oracle Java JRE 8, which you can download HERE. For the UniFi cloud service (unifi.ubnt.com) to work, you need to use x64 Java only (so choose Windows x64 Offline). You can use either x86 or x64 Java for UniFi, but if you use x86 you cannot use the unifi.ubnt.com cloud tie in.

When upgrading the service, first perform step 2 and 3, then run "net stop unifi" (without quotes) to stop the old the service. After the update is complete, run "net start unifi" (without quotes) to start the service for the updated controller instance.
« Last Edit: September 26, 2017, 01:34:20 PM by Adventech »
Adventech Group, Inc.
Bringing Integrity to Information Technology
www.adventech.net

Offline Adventech

  • Bringing Integrity to Information Technology
  • Administrator
  • Jr. Member
  • *****
  • Posts: 59
  • Karma: +0/-0
    • Adventech Group, Inc.
How to run Unifi Controller as a Service in Windows
« Reply #1 on: October 10, 2012, 07:32:40 AM »
PROBLEM:
How to run Unifi Controller as a Service in Windows 2008 R2 x64?

SOLUTION:
1.) Must be running version 2.2.0 or Higher.
2.) Make sure UniFi is not running by shutting down the application.
3.) locate your java installation directory. On 64-bit, at "C:\Program Files (x86)\Java\jre6\bin" or on 32-bit at "C:\Program Files\Java\jre6\bin"
4.) Add the directory above to the PATH varible in (Computer > Properties > Advanced system settings > Environment Variables).
5.) Run a command prompt (as an Administrator)
6.) cd <unifi_base>. Usually "C:\Users\<USERNAME>\Ubiquiti UniFi"
7.) java -jar lib\ace.jar installsvc
8.) net start Unifi
9.) Create Shortcut to the UniFi website (https://ipaddress:8443/)
10.) Change Icon on Shortcut to (%USERPROFILE%\Ubiquiti UniFi\unifi.ico)

NOTE: I attached the ICO for the UniFi Controller just incase.
« Last Edit: September 26, 2017, 01:36:36 PM by Adventech »
Adventech Group, Inc.
Bringing Integrity to Information Technology
www.adventech.net