Disable HTTPS or configure get Let's Encrypt DNS challenge

AI-generated summary

Marek_Wojtaszek is struggling with Let’s Encrypt HTTP challenges because their Discourse server is behind a Cloudflare tunnel and not publicly accessible via HTTP. Since Cloudflare already handles SSL, they want to either disable HTTPS (port 443) entirely or configure Let’s Encrypt to use the DNS challenge with Cloudflare’s API key. itsbhanusharma advises disabling SSL by commenting out the relevant templates in the standalone.yml file, which will stop Discourse from attempting to issue certificates or expose port 443. Regarding DNS challenge setup, they note it’s possible via a reverse proxy but likely unnecessary since Cloudflare tunnel already manages SSL. They also link to Cloudflare tunnel documentation for Discourse for further guidance.

This is my third post on that, I am so sorry to flood you with that, but I here wanted make the thread as simple as possible.

I have horrible issues with getting the HTTP based Let’s Encrypt certificates since my server is not accessible to the external world over HTTP port, and I am really tired of that. Especially that my Discourse server is hidden behind the Cloudflare tunnel, so I do not need SSL at all as the certs are being served by Cloudflare tunnel for me.

So my question is simple:

  • how can I disable port 443 (HTTPS) at all for Discourse to get rid of the LE cert creation nightmare
    or
  • how can I configure the SSL cert creation with the DNS challenge, where I could provide my email address and the Cloudflare global API key

Thanks in advance for you help!

You can disable SSL by commenting the two templates in your YML file.

There should be a section like this in your YML File

Make sure it looks exactly as shown above and then it won’t try to issue an SSL certificate or expose Port 443.

You can do this by setting a reverse proxy and configuring that to use DNS challenge. However, Since you already have exposed discourse via cloudflare tunnel, You probably don’t need this.

Be sure to check the cloudflare tunnel documentation for discourse here for additional hints: