Unifi controller certificates (for UniFi Network, not UniFi Protect)
The portal uses nginx so check out how to use certificates with nginx, the same certificates can be used, for nginx without the modifications described below.
# cd # on Windows, "%USERPROFILE%/Ubiquiti Unifi" cd /usr/lib/unifi # create new certificate (with csr) java -jar lib/ace.jar new_cert # Enter your password if prompted and then it will create your CSR in /var/lib/unifi # - unifi_certificate.csr.der # - unifi_certificate.csr.pem # have this CSR signed by a CA, you'll get a few certificates back... # copy the signed certificate(s) to # import the signed certificate and other intermediate certificates java -jar lib/ace.jar import_cert [...]
I’ve used my own openssl certificates (trusted by my browsers and computers) to generate the crt/pem files.
It is important that the files are one single line, like this;
—–BEGIN CERTIFICATE—–XXXXXXXXXXXX=—–END CERTIFICATE—–
There must be no white space characters at all, if there are, the import won’t work!