How to create a PEM file from existing certificate files that form a chain for Domoticz

  • (optional) Remove the password from the Private Key by following the steps listed below: openssl rsa -in server.key -out nopassword.keyNote: Enter the pass phrase of the Private Key.
  • Combine the private key, public certificate and any 3rd party intermediate certificate files:
    cat nopassword.key > server.pem
    cat server.crt >> server.pemNote: Repeat this step as needed for third-party certificate chain files, bundles, etc:
    cat intermediate.crt >> server.pem

SSL certificate installation on the Ubiquiti Unifi controller linux

lets check and see what is stored inside the keystore.
You can do this by using the following command:

sudo keytool -list -keystore /var/lib/unifi/keystore

password is aircontrolenterprise

delete it using the following command:
sudo keytool -delete -alias unifi -keystore /var/lib/unifi/keystore

“openssl pkcs12 -export -in -inkey -out -passout pass:aircontrolenterprise -name unifi” or
“openssl pkcs12 -export -nodes -out -inkey -in -certfile -passout pass:aircontrolenterprise -name unifi”
then
“keytool -importkeystore -srckeystore -srcstorepass aircontrolenterprise -destkeystore /var/lib/unifi/keystore -deststorepass aircontrolenterprise -alias unifi -trustcacerts”

The left to do is to restart the Unifi controller and you are good to go!
“systemctl restart unifi”