The discussion revolves around a failed Let’s Encrypt certificate renewal for a Discourse instance, with the certificate expiring despite successful manual renewal. ti0 initially faced issues where the renewed certificate wasn’t being served, even after restarting Nginx and rebuilding the instance. The root cause was identified as a multi-site deployment using an external Nginx reverse proxy, which required restarting the outer proxy server to reflect the new certificate ti0. EricGT shared a similar experience, noting that a sudo reboot resolved the issue, likely due to Nginx restarting. supermathie clarified that Chrome may show incorrect certificate dates but not always indicate invalidity. EricGT speculated that the automatic renewal failed due to disabled emails in a non-production setup, though supermathie pointed out emails are only for warnings, not renewal. The discussion concludes with EricGT seeking further insight into why automatic renewal failed, with supermathie suggesting a new topic for detailed troubleshooting.
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.