Users reported a bug during Discourse installation where Let’s Encrypt failed to generate valid SSL certificates, resulting in zero-byte key files and ‘connection refused’ errors when accessing the site. darbcal first documented the issue after following the Digital Ocean installation guide, noting empty .key files and acme.sh errors. Others, including dmitchell and jomaxro, confirmed identical behavior. A workaround was found by dmitchell — setting Let’s Encrypt as the default CA via ./acme.sh --set-default-ca --server letsencrypt and updating account.conf with DEFAULT_CA="https://acme-v02.api.letsencrypt.org/directory" — which worked for some, including sethm. However, darbcal reported it didn’t work for them. The issue was acknowledged as a bug by pfaffman, and Falco confirmed a fix was being implemented. The fix was later merged in commit 2909a16Falco, resolving the problem for users who rebuilt their app after updating. itsbhanusharma questioned whether the CA should be set before install, and codinghorror apologized for the issue and thanked users for reporting it. pfaffman reminded users to git pull and rebuild to apply the fix.
After installation, I tried to visit the site in a browser and I get ‘connection refused’.
Some items of interests:
ls -l /var/discourse/shared/standalone/ssl/
-rw-r--r-- 1 root root 0 Jun 15 11:26 forums.MYDOMAIN.com.key
-rw-r--r-- 1 root root 0 Jun 15 11:26 forums.MYDOMAIN.com_ecc.key
./launcher logs app | grep letsencrypt
run-parts: executing /etc/runit/1.d/ **letsencrypt**
[Tue 15 Jun 2021 11:26:09 AM UTC] **Please check log file for more details: /shared/letsencrypt** /acme.sh.log
[Tue 15 Jun 2021 11:26:09 AM UTC] **Please check log file for more details: /shared/letsencrypt** /acme.sh.log
cat: /shared/ **letsencrypt** /forums.MYDOMAIN.com/forums.MYDOMAIN.com.key: No such file or directory
[Tue 15 Jun 2021 11:26:10 AM UTC] **Please check log file for more details: /shared/letsencrypt** /acme.sh.log
[Tue 15 Jun 2021 11:26:10 AM UTC] **Please check log file for more details: /shared/letsencrypt** /acme.sh.log
cat: /shared/ **letsencrypt** /forums.MYDOMAIN.com_ecc/forums.MYDOMAIN.com.key: No such file or directory
I’ve ran the installation multiple times with the same result. Any suggestions for my next step?
Rebuilding the app with SSL commented out works. Thus the error is in the letsencrypt portion. I don’t believe I am hitting a limit because when I look up certs, none are listed for this site.
Running on command line does not give me any more information
Exactly the same problem here! Tried registering beforehand by running the command acme.sh --register-account -m my@example.com with my email, seems to have registered but reinstalling discourse gives exactly the same error.