{"id":22,"date":"2018-10-18T23:49:08","date_gmt":"2018-10-18T23:49:08","guid":{"rendered":"http:\/\/remoteapple.com\/?p=22"},"modified":"2018-10-19T15:25:56","modified_gmt":"2018-10-19T15:25:56","slug":"unifi-run-the-controller-as-a-windows-service","status":"publish","type":"post","link":"https:\/\/remoteapple.com\/?p=22","title":{"rendered":"UniFi &#8211; Run the Controller as a Windows service"},"content":{"rendered":"<p><span class=\"wysiwyg-font-size-large\">Overview<\/span><\/p>\n<hr \/>\n<p>Readers will learn how to run the UniFi controller software as a Windows service.<\/p>\n<p>Windows services are often useful since they are \u201cbackground\u201d applications which don\u2019t require any attention from the end-user. In this way, the service will launch upon startup, without any intervention from the user.\u00a0The service is a direct replacement\/substitute for running the controller program manually (via the icon or a scheduled task), so there is no need to run the controller application if you&#8217;re running it as a Windows service.<\/p>\n<p><span class=\"wysiwyg-font-size-large\">Table of Contents<\/span><\/p>\n<hr \/>\n<ol>\n<li><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/205144550-UniFi-Run-the-Controller-as-a-Windows-service#steps\"><span class=\"wysiwyg-font-size-medium\">Steps &#8211; How to Run the Controller as a Windows Service<\/span><\/a><\/li>\n<li><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/205144550-UniFi-Run-the-Controller-as-a-Windows-service#user\">User Notes &amp; Tips<\/a><\/li>\n<li><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/205144550-UniFi-Run-the-Controller-as-a-Windows-service#related%20articles\">Related Articles<\/a><\/li>\n<\/ol>\n<hr \/>\n<p><a name=\"steps\"><\/a><\/p>\n<p class=\"wysiwyg-text-align-left\"><span class=\"wysiwyg-font-size-large\">Steps &#8211; How to Run the Controller as a Windows Service<\/span><\/p>\n<hr \/>\n<p class=\"wysiwyg-text-align-left\"><span class=\"wysiwyg-font-size-small\"><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/205144550-UniFi-Run-the-Controller-as-a-Windows-service#top\">Back to Top<\/a><\/span><\/p>\n<div class=\"lia-message-template-content-zone\">1. Close any instances of the UniFi software on the computer. If you just installed the UniFi controller, make sure to open it\u00a0once by using the icon on the desktop or within the start menu. Once it says \u201cUniFi Controller (a.b.c) started.\u201d you can close the controller program. This is needed to generate some required files for the service to work.<br \/>\n2. Open the command prompt as an Administrator. For example, on Windows 10, right click on the Start Menu and choose \u201cCommand Prompt (Admin)\u201d.<br \/>\n3. Change directory to the location of UniFi in your computer using the following command (exactly as it is here, no substituting needed):<\/div>\n<div class=\"lia-message-template-content-zone\">\n<pre>cd \"%UserProfile%\\Ubiquiti UniFi\\\"<\/pre>\n<\/div>\n<div class=\"lia-message-template-content-zone\">4.\u00a0Once in the root of the UniFi folder, issue the following (this installs the UniFi Controller service):<\/div>\n<div class=\"lia-message-template-content-zone\">\n<pre>java -jar lib\\ace.jar installsvc<\/pre>\n<\/div>\n<div class=\"lia-message-template-content-zone\">5.\u00a0Once you\u2019re at a new command prompt line, after it says \u201cComplete Installation\u2026\u201d, issue the following:<\/p>\n<pre>java -jar lib\\ace.jar startsvc<\/pre>\n<\/div>\n<div class=\"lia-message-template-content-zone\">6. Close the command prompt window either by entering the \u201cexit\u201d command, or clicking the X.<\/div>\n<div class=\"lia-message-template-content-zone\">7.\u00a0There 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\u00a0<a href=\"https:\/\/localhost:8443\/\">https:\/\/localhost:8443<\/a>. Alternatively you can use the desired interface IP, or FQDN that is mapped to that host (in place of \u201clocalhost\u201d).<br \/>\n<em>Note: You will need to use Oracle Java JRE 8, which you can download\u00a0<\/em><a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jre8-downloads-2133155.html\"><em>HERE<\/em><\/a><em>. For the UniFi cloud service (unifi.ubnt.com) to work properly you need to use x64 Java only (so choose Windows x64 Offline).\u00a0<\/em><\/p>\n<p><em>When upgrading the service, first perform step 2 and 3, then run &#8220;java -jar lib\\ace.jar stopsvc&#8221; (without quotes) to stop the old the service. After the update is complete, run &#8220;java -jar lib\\ace.jar startsvc&#8221; (without quotes) to start the service for the updated controller instance.<\/em><\/p>\n<\/div>\n<hr \/>\n<p class=\"wysiwyg-text-align-left\"><span class=\"wysiwyg-font-size-large\"><a name=\"user\"><\/a><\/span><\/p>\n<p class=\"wysiwyg-text-align-left\"><span class=\"wysiwyg-font-size-large\">User Notes &amp; Tips<\/span><\/p>\n<hr \/>\n<p class=\"wysiwyg-text-align-left\"><span class=\"wysiwyg-font-size-small\"><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/205144550-UniFi-Run-the-Controller-as-a-Windows-service#top\">Back to Top<\/a><\/span><\/p>\n<p class=\"wysiwyg-text-align-left\"><em>These notes have been added thanks to user collaboration. Have anything to contribute? Click on the\u00a0<strong>Give Feedback<\/strong>\u00a0button below!<\/em><\/p>\n<ul>\n<li>Switching to a service means you have to open up ports on your windows firewall. The ports the UniFi controller uses are listed in our\u00a0<span class=\"wysiwyg-font-size-medium\"><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;UniFi - system.properties File Explanation&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1055104,&quot;10&quot;:2,&quot;11&quot;:4,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:0},&quot;15&quot;:&quot;Arial&quot;,&quot;23&quot;:1}\" data-sheets-formula=\"=HYPERLINK(&quot;https:\/\/help.ubnt.com\/hc\/en-us\/articles\/205202580-UniFi-system-properties-File-Explanation&quot;,&quot;UniFi - system.properties File Explanation&quot;)\"><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/218506997\" target=\"_blank\" rel=\"noopener noreferrer\">UniFi &#8211; Ports Used<\/a>\u00a0article. If you would like to learn how to change ports, see our\u00a0<\/span><\/span><span class=\"wysiwyg-font-size-medium\"><a href=\"https:\/\/help.ubnt.com\/hc\/en-us\/articles\/204910084-UniFi-Change-Default-Ports-for-Controller-and-UAPs\" target=\"_blank\" rel=\"noopener noreferrer\">UniFi &#8211; Change Default Ports for Controller and UAPs<\/a>\u00a0article.<\/span><\/li>\n<li>There have been users who couldn&#8217;t start the installed UniFi service until both x86 and x64 Java was installed (on an x64 machine). Help us verify this solution by sending us an email with the\u00a0<strong>Give Feedback<\/strong>\u00a0button below if you were experiencing this issue and this tip fixed it.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview Readers will learn how to run the UniFi controller software as a Windows service. Windows services are often useful since they are \u201cbackground\u201d applications which don\u2019t require any attention from the end-user. In this way, the service will launch upon startup, without any intervention from the user.\u00a0The service is a direct replacement\/substitute for running [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[4,6],"tags":[],"class_list":{"0":"post-22","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-knowledge-base","7":"category-networks","8":"entry"},"_links":{"self":[{"href":"https:\/\/remoteapple.com\/index.php?rest_route=\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/remoteapple.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/remoteapple.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/remoteapple.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/remoteapple.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22"}],"version-history":[{"count":0,"href":"https:\/\/remoteapple.com\/index.php?rest_route=\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"https:\/\/remoteapple.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/remoteapple.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/remoteapple.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}