Query regarding adding Cloudflare

AI-generated summary

Akash_Raju_M is setting up Cloudflare for a self-hosted Discourse instance installed via Docker, following a guide that involves adding cloudflare.template.yml to app.yml and configuring a direct domain (e.g., forum-direct.example.com) pointing to the VPS IP with Cloudflare’s orange cloud turned off. Akash is concerned about exposing the server IP and whether Cloudflare offers DDoS protection. Stephen clarifies that Cloudflare doesn’t protect the server IP even when proxying, and questions the necessity of hiding it. hawm notes that a direct domain isn’t strictly necessary if the template is properly configured. pfaffman advises that Discourse already includes basic protections, and warns that Cloudflare’s optimizations can break site functionality if not carefully managed. Based on this feedback, Akash_Raju_M decides to forgo Cloudflare for now.

Hello,

I have installed Discourse using docker installation from Github.

I wanted to setup Cloudflare and came across this guide: Full site CDN acceleration for Discourse

I have added cloudflare.template.yml to app.yml file.

I have set up https://forum-direct.example.com/ to point to IP address of my VPS hosting discourse and have turned off orange cloud in cloudflare and added this to discourse settings long polling base url

Is that all the settings I have to do to get cloudflare free to work with my site or do i need to configure anything else?

Also since https://forum-direct.example.com/ points to IP of my VPS, people can get my IP, correct? Can i prevent this somehow?

The initial issuance of a certificate will fail if Cloudflare is proxying your domain. Make sure the orange cloud is turned off.

Could you explain why this is a problem? Do you plan on securing the server? Cloudflare isn’t a firewall, even if you proxy traffic the VPS itself isn’t afforded any additional protection.

I thought it would provide basic ddos protection

Also, Will having cloudflare break any functionality?

You don’t have to make a direct access domain for your discourse for cloudflare in my experience,add the template file is enough.

Discourse provides basic protections. Unless you are running a community that is likely to make you a target, you are wasting your time.

Unless you are careful to turn off some of the optimizations it will break your site. There are many topics on the issue.

Okay I think I’m fine without cloudflare for now based on feedback, thanks for all the answers.