The cert for my discourse instance expired today, and it’s giving an error in the browser. I tried running the renewal manually as per:
It showed that the cert renewed, I can see it in the /shared/letsencrypt folder and it renewed correctly. I restarted nginx within docker. I did a rebuild of the instance, even after that it appears to be sending the old certificate.
I checked the domain with several sites, all say that the cert is expired, so it’s not just local.
After trying for hours, and just after I posted this, I realized that because I’m using a multi-site deployment, with an nginx reverse-proxy, I had to also restart the outer nginx server, and it started working instantly.
I’m going to mark this as the answer, just in case someone lands up in this situation.
Did you find the root cause of why the certificate was not automatically renewing?
On the site I noted it was because it is not in a production mode so all e-mails are suspended, including the e-mails that would renew the the certificate.
The reason the e-mail was suspended is that it is part of the process of restoring the database, in the specific case it was restored from a different instance of Discourse.
The e-mail is disabled so that two sites are not sending out the same e-mails.