After upgrading to Discourse 3.5.0.beta8-dev, LW2333 began experiencing Cloudflare 521 errors (“Web server is down”) when using Full (Strict) SSL mode, though switching to Flexible mode temporarily resolved the issue. They confirmed using a Cloudflare Origin Certificate (not Let’s Encrypt), stored in /var/discourse/shared/standalone/ssl/, and rebuilt the app after verifying the config. LotusJeff reported no issues on the same version with Full (Strict) and suggested checking Let’s Encrypt setup or firewall rules, noting that 521 often indicates the server isn’t properly configured for HTTPS. LW2333 clarified they’re not using Let’s Encrypt and shared their app.yml config, which includes cloudflare.template.yml and web.ssl.template.yml. LotusJeff reminded them that Cloudflare certs typically expire every 90 days (though LW2333 confirmed theirs are valid for 15 years and tried regenerating them without success). LW2333 then asked if switching to Let’s Encrypt would resolve the issue, to which LotusJeff advised uncommenting both the Let’s Encrypt template and setting LETSENCRYPT_ACCOUNT_EMAIL in app.yml, while cautioning that manual SSL customizations must be reverted. They also recommended monitoring the rebuild process for Let’s Encrypt errors.
After updating my Discourse site to 3.5.0.beta8-dev, I’m suddenly getting a 521 “Web server is down” error when accessing the site through Cloudflare. This is unexpected since I had previously configured it according to this guide, and it had been working perfectly until now.
Then I tried changing the SSL/TLS encryption mode in Cloudflare from Full (Strict) to Flexible, and the site loaded again.
Does anyone know why this might be happening after the update?
Is there something new in 3.5.0.beta8-dev that could affect Cloudflare compatibility or HTTPS handling?
Any help or suggestions would be greatly appreciated!
Werkend vanuit het geheugen, hebben Cloudflare-certificaten een duur van 90 dagen. Dit vereist dat u elke 3 maanden nieuwe certificaten aanmaakt. Weet u nog hoe oud uw certificaten zijn?
De standaardinstelling is om Let’s Encrypt te gebruiken. Het systeem zal uw certificaten automatisch vernieuwen. Eén zorg minder om handmatig te beheren.
Ik heb de overstap van privécertificaten naar Let’s Encrypt met Discourse nog nooit gemaakt, en met dat gezegd hebbende…
Binnen de app.yml moet je op twee locaties de commentaar verwijderen:
Template regel voor - "templates/web.letsencrypt.ssl.template.yml"
Het e-mailadres van het Let’s Encrypt-account:
## Als je de Let's Encrypt-template hebt toegevoegd, verwijder dan de commentaar hieronder om een gratis SSL-certificaat te krijgen
LETSENCRYPT_ACCOUNT_EMAIL: <voeg hier je e-mailadres toe>
Als je andere handmatige wijzigingen hebt aangebracht in templates voor aangepaste SSL-certificaten, moeten deze worden teruggezet naar de standaardinstellingen.
De Let’s Encrypt-component bevindt zich aan het einde wanneer je de app opnieuw opbouwt. Houd deze in de gaten en kijk of je foutcodes ontvangt.