{"id":2109,"date":"2018-08-10T18:51:27","date_gmt":"2018-08-10T18:51:27","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=2109"},"modified":"2018-11-12T20:34:53","modified_gmt":"2018-11-12T20:34:53","slug":"add-a-ssl-certificate-to-ubiquiti-unifi-video-server-using-lets-encrypt","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/add-a-ssl-certificate-to-ubiquiti-unifi-video-server-using-lets-encrypt\/","title":{"rendered":"Add a SSL Certificate to Ubiquiti UniFi-Video server using Lets Encrypt"},"content":{"rendered":"<p>Install certbot<\/p>\n<pre>sudo apt-get install python-certbot<\/pre>\n<p>Generate certificate.\u00a0 Change unifi.yourdomain.com to the domain name you have pointing to your UniFi-Video controller.<\/p>\n<pre>sudo certbot certonly -d unifi.yourdomain.com<\/pre>\n<p>Certbot will create the files in &#8220;\/etc\/letsencrypt\/live\/unifi.yourdomain.com\/&#8221;<\/p>\n<p>Now you should stop the unifi service.<\/p>\n<pre>systemctl stop unifi-video<\/pre>\n<p>The following two commands create and install the keystore for the UniFi-Video application.\u00a0 These commands were copied from <a href=\"https:\/\/community.ubnt.com\/t5\/UniFi-Video\/Guide-on-how-to-change-SSL-certificate-for-HTTPS-in-Unifi-NVR-v3\/td-p\/1524554\">here<\/a>.\u00a0 Thanks scobber!<\/p>\n<pre>echo ubiquiti | openssl pkcs12 -export -inkey \/etc\/letsencrypt\/live\/unifi.yourdomain.com\/privkey.pem -in \/etc\/letsencrypt\/live\/unifi.yourdomain.com\/cert.pem -name airvision -out \/usr\/lib\/unifi-video\/data\/keys.p12 -password stdin\r\necho y | keytool -importkeystore -srckeystore \/etc\/letsencrypt\/live\/unifi.yourdomain.com\/keys.p12 -srcstoretype pkcs12 -destkeystore \/usr\/lib\/unifi-video\/data\/keystore -storepass ubiquiti -srcstorepass ubiquiti<\/pre>\n<p>Remove or rename the Trusted Store.\u00a0 If you don&#8217;t, the cameras will connect, but will not record.\u00a0 The controller will rebuild the ufv-truststore when it starts up and the cameras will be able to record.<\/p>\n<pre>mv \/usr\/lib\/unifi-video\/data\/ufv-truststore{,.old}<\/pre>\n<p>Start the UniFi-Video service<\/p>\n<pre>systemctl start unifi-video<\/pre>\n<p>Now you can check it by going to https:\/\/unifi.yourdomain.com:8443<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install certbot sudo apt-get install python-certbot Generate certificate.\u00a0 Change unifi.yourdomain.com to the domain name you have pointing to your UniFi-Video controller. sudo certbot certonly -d unifi.yourdomain.com Certbot will create the files in &#8220;\/etc\/letsencrypt\/live\/unifi.yourdomain.com\/&#8221; Now you should stop the unifi service. &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/add-a-ssl-certificate-to-ubiquiti-unifi-video-server-using-lets-encrypt\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,370],"tags":[358,507,509,508,356,506,131,132,188,265],"class_list":["post-2109","post","type-post","status-publish","format-standard","hentry","category-ubiquiti","category-unifi-video","tag-cert","tag-certbot","tag-lets-encrypt","tag-letsencrypt","tag-ssl","tag-ssl-cert","tag-ubiquiti-2","tag-ubnt","tag-unifi","tag-unifi-video"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=2109"}],"version-history":[{"count":7,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2109\/revisions"}],"predecessor-version":[{"id":2159,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2109\/revisions\/2159"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=2109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=2109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=2109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}