User peyrusse reported that their Let’s Encrypt certificate for a Discourse installation had expired and renewal attempts via manual deletion and rebuild failed to load the new certificate. merefield questioned whether deleting SSL files interfered with the build process. pfaffman asked if a custom certificate or DNS/Cloudflare was involved, and later suggested manually running the ACME script inside the container to debug. peyrusse confirmed using Let’s Encrypt without Cloudflare. After trying the manual ACME command (peyrusse), which reported success, the certificate still didn’t appear. frictionel shared a similar experience resolved by rebooting, but that didn’t help peyrusse. Finally, peyrusse resolved the issue by discovering that port 80 was closed in their Azure environment, preventing the ACME challenge from completing. The fix was to open port 80, allowing Let’s Encrypt to validate and issue the certificate successfully.
Today the certificat of my discourse installation expired.
I have tried to renew it by following those commands :
ssh root@your.discourse.server
cd /var/discourse/shared/standalone
cp -r ssl ssl_backup
rm ssl/*
cd /var/discourse
./launcher rebuild app
After execution, i can see that new files are available in the directory /var/discourse/shared/standalone/ssl however this new certificate is not loaded by the web site.
These steps are usually unnecessary - the build script on its own will update your certificate as required.
I wonder if your deletion of the contents of the directory is affecting the build process?
I had that very same problem a few months ago. I‘ve tried everything I could find on meta but in the end a simple restart of the server solved it for me.
It finally works. It was my port 80 from my Azure environment that was closed so the challenge response when generating the certificate was failing … thanks for you help.