Cloudflare with Discourse

AI-generated summary

Eduardo_Braga seeks help configuring Discourse with Cloudflare, initially encountering DNS and connection issues. Falco identifies missing A records for forum.meuxbox.com.br, advising DNS setup correction. Despite multiple installations on DigitalOcean and Vultr—including one-click and manual methods—Eduardo consistently faces “connection refused” errors. jomaxro guides him to install Discourse on a fresh Vultr VPS with DNS-only (grey cloud) records, cautioning against modifying app.yml prematurely. itsbhanusharma suspects firewall or network issues after observing 100% packet loss, later confirming the server IP changed. Stephen and danb35 pinpoint the root cause: Eduardo exhausted Let’s Encrypt’s 5-certificate/week limit by repeatedly reinstalling, causing the web server to fail startup. danb35 confirms via certificate logs that 5 identical certs were issued on Dec 27 within 45 minutes, blocking further issuance until 0230Z the next day. Eduardo notes the same error occurred on first install, but danb35 clarifies that repeated attempts triggered the quota. After waiting, Eduardo reports success with Google Domains, implying Cloudflare-specific misconfiguration. jomaxro suggests if DNS-only mode fails, it may be a Cloudflare bug, though danb35 notes others successfully use Cloudflare DNS with Discourse. Eduardo concludes Cloudflare’s settings may be the culprit, highlighting configuration sensitivity.

I use Cloudflare with my Wordpress.

I will use subdomain for Discourse

I have questions about what is the best way to set up “Discourse” with cloudflare.

You can put your website behind cloudflare but will work only if you disable the performance through the rules.
I did it and works fine.

So make sure you create a rule to disable the performance other than this making the cloud orange will break your site.

What rules do you recommend?

I already tested in digitalocean, but it gave error, I’m looking for how to configure in cloudflare.

This isn’t Cloudflare specific. Your DNS is completely busted.

There is no A DNS entry for forum.meuxbox.com.br.

I installed with a click on digitalocean, but it gave error

I’m looking for a solution here to get started

The installation method isn’t the problem here. The address forum.meuxbox.com.br simply doesn’t exist.

Access your domain meuxbox.com.br on Cloudflare and make it look like this:

image

Cloudflare

Installation

DigitalOcean

Error http://forum.meuxbox.com.br

How was Discourse installed on this droplet?

I did a one-click installation, I also did the normal installation.

I always get the same error.

app yml

I can’t speak to the one-click install, as we don’t manage that. As for the normal installation, what error did you receive? The screenshot shows your hostname listed, that’s not an error.

‘Discourse’ is working, but not with cloudflare.
I’m looking for a way to do work with cloudflare

I will do a normal installation on VPS VULTR. but we have the same mistake as digitalocean with one click

Get confused about it.

Please do the following:

  1. Create a new VULTR VPS.
  2. Create a DNS-only (grey cloud) A record in Cloudflare that points to your VULTR VPS.
  3. Install Discourse on VULTR following discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub.
    1. Please save the output of ./discourse-setup somewhere so we can review it if needed.
  4. Check that your site loads. If not, share the output of ./discourse-setup, making sure to remove any credentials from it.

Don’t manually modify your app.yml! We need to make sure Discourse is working before you start playing with other templates.

Ok, I’ll do it, tomorrow I warn you.

Thanks. Happy New Year

Discourse not coming up may be related to the recent maxmind change. The bitnami image is also not working so there is a strong chance that digital ocean one click might also not have the same temporary workaround.

I did a one-click installation on digitalocean, after installing on normal vultr, i get the same error but i will do the install again to try to find solutions

installed at VULTR

Cloudflare

Error forum.meuxbox.com.br

I don’t understand why but Your server is not replying to pings. Are you behind some sort of firewall that is blocking connections to Your server?

I had 100% packet loss for 104.207.144.153

PING 104.207.144.153 (104.207.144.153) 56(84) bytes of data.

--- 104.207.144.153 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2034ms

Did you using LetEncrypt for your Discourse instance? Try to change the Cloudflare SSL/TLS encryption mode, if i remember correct.

That is only applicable if You have cloudflare proxy enabled. In DNS only mode, cloudflare ssl has no impact on discourse