# Using Discourse with Cloudflare: Best Practices

**URL:** https://meta.discourse.org/t/using-discourse-with-cloudflare-best-practices/293405
**Category:** Self-Hosting
**Tags:** how-to, cloudflare
**Created:** [January 30, 2024, 2:56am UTC](https://meta.discourse.org/t/using-discourse-with-cloudflare-best-practices/293405 "2024-01-30T02:56:10Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 26, 2024, 2:40pm UTC](https://meta.discourse.org/t/using-discourse-with-cloudflare-best-practices/293405/6 "2024-02-26T14:40:14Z")

</div>

> [@TheDarkWizard](#):
>
> Do you still need the cloudflare template in app.yml for true IP addresses or has that changed over the years?

Yes. You do need the cloudflare template. Without it, all traffic will appear to come from cloudflare’s servers rather than the user’s browser IP.

I don’t see it mentioned in the OP, which seems like a glaring omission. How did you infer that you needed it?

> [@How do you setup Cloudflare?](https://meta.discourse.org/t/how-do-you-setup-cloudflare/32258/6):
>
> add `cloudflare.template.yml` to the end of the templates section in `app.yml`.

---

_[View the full topic](https://meta.discourse.org/t/using-discourse-with-cloudflare-best-practices/293405)._
