I am running Domoticz latest version on a raspberry
The first time i instal certbot and created key's acording on this site:
Afther created the key's i use the folowing site for copy this keys to Domoticz.
https://www.domoticz.com/wiki/Native_secure_access_with_Lets_Encrypt
On this site the key is placed in the domoticz directory but afther every update of domoticz i must replace the key. So i replaced the key to another directory Domotic-cert.
I was verry glad that all this was working ..
But then i get a mail that i must renew my key's the key i used was valid to 8-febr-2023
So afther the command for renwewing the key's and look if the key was renewed and it was.
Expiry Date: 2023-04-20 16:30:27+00:00 (VALID: 88 days)
Afther this i used the same commands to place use it for domoticz but if i check my certificate on the website it keeps the ld date of 2023-02-08.
So why does it not update it on domticz???
Certbot 1.12.0
used sudo apt install certbot to install
To move it to Domoticz i used this from the site
Add the certificate to Domoticz
Then you add the created certificate to Domoticz with :
sudo mv ~/domoticz/server_cert.pem ~/domoticz/server_cert.pem.org # see below about DH params why not just delete it sudo cat /etc/letsencrypt/live//privkey.pem > ~/domoticz/server_cert.pem sudo cat /etc/letsencrypt/live//fullchain.pem >> ~/domoticz/server_cert.pem sudo cp ~/domoticz/server_cert.pem ~/domoticz/letsencrypt_server_cert.pem sudo /etc/init.d/domoticz.sh restart
As every update of domoticz overwrites your certificate, the last command backups your new certificate so that you may may restore it if needed.
When there's a domoticz error after rebooting the service like : Error: [web:443] missing SSL DH parameters from file
Add the DHparam :
sudo cat /etc/ssl/certs/dhparam.pem >> ~/domoticz/server_cert.pem
and if you get also an error like : /etc/ssl/certs/dhparam.pem: No such file or directory
cd /etc/ssl/certs sudo openssl dhparam -out dhparam.pem 2048 sudo cat /etc/ssl/certs/dhparam.pem >> ~/domoticz/server_cert.pem sudo /etc/init.d/domoticz.sh restart