{"id":122,"date":"2016-04-20T11:31:51","date_gmt":"2016-04-20T16:31:51","guid":{"rendered":"http:\/\/www.scheh.com\/?p=122"},"modified":"2016-04-20T11:31:51","modified_gmt":"2016-04-20T16:31:51","slug":"adding-a-certificate-to-unifi-wifi-controller","status":"publish","type":"post","link":"https:\/\/www.scheh.com\/index.php\/2016\/04\/20\/adding-a-certificate-to-unifi-wifi-controller\/","title":{"rendered":"Adding a certificate to UniFi Wifi Controller"},"content":{"rendered":"<p>If anyone is still having trouble with this, I just figured out how to do it using an existing Windows certificate. In my case, we have our own internal Certification Authority, but it will work just the same with a certificate issued by GoDaddy or anyone else.<\/p>\n<p>I&#8217;m assuming you already know how to export the certificate using the Certificates MMC snap-in, and that the keytool executable from your installed java package is in the path.<\/p>\n<p>1)\u00a0\u00a0\u00a0\u00a0\u00a0 Export PFX certificate with private key and the option \u201cInclude all certificates in the certification path if possible\u201d, using password &#8220;aircontrolenterprise&#8221; (this is important!)<\/p>\n<p>2) \u00a0 \u00a0 \u00a0Open a Command Prompt and go to the directory Unifi was installed to then the data directory (example: C:\\Users\\administrator\\Ubiquiti Unifi\\data)<\/p>\n<p>3)\u00a0\u00a0\u00a0\u00a0\u00a0 Find the alias of your exported certificate by using (use the password from step 1):<\/p>\n<p class=\"Code\">keytool -list -keystore c:\\path\\to\\pfx.pfx -storetype pkcs12<\/p>\n<p>It will list the certificate starting with its alias, for example:<\/p>\n<p class=\"Code\">Keystore type: PKCS12<\/p>\n<p class=\"Code\">Keystore provider: SunJSSE<\/p>\n<p class=\"Code\">Your keystore contains 1 entry<\/p>\n<p class=\"Code\">le-webserver2003-8f6daf5b-8c89-405f-b3bb-045c58656<wbr \/>883, Mar 20, 2013, PrivateKeyEntry,<\/p>\n<p class=\"Code\">Certificate fingerprint (MD5): AB:3F:79:FD:F5:1E:B3:69:78:8C:1C:AC:41:B3:29:6B<\/p>\n<p class=\"Code\">\u00a0The certificate alias in this case is le-webserver2003-8f6daf5b-8c89-405f-b3bb-045c58656<wbr \/>883. Use it in place of \u201csrc-alias\u201d in the command below (yours will be different).<\/p>\n<p>4)\u00a0\u00a0\u00a0\u00a0\u00a0 Rename the existing file called \u201ckeystore\u201d to keystore.orig.<\/p>\n<p>5)\u00a0\u00a0\u00a0\u00a0\u00a0 Run the following command:<\/p>\n<p class=\"Code\">keytool -importkeystore -srcstoretype pkcs12 -srcalias\u00a0<strong>src-alias<\/strong>\u00a0-srckeystore\u00a0<strong>c:\\path\\to\\pfx.pfx<\/strong>\u00a0-keystore keystore -destalias unifi<\/p>\n<p>Use the same password from step 1.<\/p>\n<p>6) \u00a0 \u00a0 Start the UniFi server.<\/p>\n<div class=\"view-original-post-link\">\n<p><a id=\"link_17\" class=\"lia-link-navigation original-post-link\" href=\"https:\/\/community.ubnt.com\/t5\/UniFi-Wireless\/UniFi-Server-HTTPS-Certificate\/m-p\/422907#M34957\">View solution in original post<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If anyone is still having trouble with this, I just figured out how to do it using an existing Windows certificate. In my case, we have our own internal Certification Authority, but it will work just the same with a certificate issued by GoDaddy or anyone else. I&#8217;m assuming you already know how to export [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3eyIP-1Y","_links":{"self":[{"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":0,"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scheh.com\/index.php\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}