# Cloudflare with Discourse

**URL:** https://meta.discourse.org/t/cloudflare-with-discourse/137456
**Category:** Self-hosting
**Created:** [December 31, 2019, 4:36pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456 "2019-12-31T16:36:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 4:36pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/1 "2019-12-31T16:36:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Jay91](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jay91/32/135181_2.png) [@Jay91](https://meta.discourse.org/u/Jay91)
#### Post date: [December 31, 2019, 5:49pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/2 "2019-12-31T17:49:41Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 6:17pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/3 "2019-12-31T18:17:06Z")

</div>

What rules do you recommend?

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

 ![installl](https://global.discourse-cdn.com/meta/original/3X/2/9/294ff78b914047ef079d70cc34cf96bbc95de37a.png)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 31, 2019, 6:23pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/4 "2019-12-31T18:23:50Z")

</div>

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

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

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 6:37pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/5 "2019-12-31T18:37:03Z")

</div>

> [@Falco](#):
>
> 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

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 31, 2019, 6:42pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/6 "2019-12-31T18:42:07Z")

</div>

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](https://global.discourse-cdn.com/meta/optimized/3X/d/6/d6a59bfd21d11a6c815e5706593952bd40b5df36_2_690x57.png)

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 7:11pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/7 "2019-12-31T19:11:57Z")

</div>

Cloudflare

 ![cloudflare](https://global.discourse-cdn.com/meta/original/3X/4/1/414efb827cab0c7383fdec699a0314eef98ac6b7.png)

Installation

 ![instalacao](https://global.discourse-cdn.com/meta/original/3X/1/f/1fc6c7898e4109e657b5ca1d6eef145fde341903.jpeg)

DigitalOcean

 ![digitalocean](https://global.discourse-cdn.com/meta/original/3X/7/5/75a80be08a21a1bf1b1e5a43ff0b9ac785ec3c77.png)

Error [http://forum.meuxbox.com.br](http://forum.meuxbox.com.br)

 ![erroo](https://global.discourse-cdn.com/meta/original/3X/1/a/1a825760d7559bcae733a0c7bd3761d93280d6eb.png)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 31, 2019, 7:17pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/8 "2019-12-31T19:17:57Z")

</div>

How was Discourse installed on this droplet?

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 7:20pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/9 "2019-12-31T19:20:04Z")

</div>

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

I always get the same error.

app yml

 ![app yml](https://global.discourse-cdn.com/meta/original/3X/c/2/c2d58425255645887c5154d85851dfc019a4376e.png)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 31, 2019, 7:21pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/10 "2019-12-31T19:21:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 7:26pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/11 "2019-12-31T19:26:56Z")

</div>

‘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

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 7:29pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/12 "2019-12-31T19:29:45Z")

</div>

> [@How do you setup Cloudflare?](https://meta.discourse.org/t/how-do-you-setup-cloudflare/32258/6):
>
> Yes, just: add cloudflare.template.yml to the end of the templates section in app.yml. do not enable Rocket Loader or any other features that will interfere with JavaScript Here’s how to edit in a nutshell: cd /var/discourse nano containers/app.yml # Make sure to use spaces, not the tab key. # Ctrl-O to "write [O]ut" # Ctrl-X to "e[X]it" ./launcher rebuild app credit to @riking

Get confused about it.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 31, 2019, 7:32pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/13 "2019-12-31T19:32:25Z")

</div>

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](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).
  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.

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [December 31, 2019, 7:34pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/14 "2019-12-31T19:34:51Z")

</div>

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

Thanks. Happy New Year

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 1, 2020, 5:28am UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/15 "2020-01-01T05:28:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [January 1, 2020, 5:54am UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/16 "2020-01-01T05:54:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Eduardo\_Braga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eduardo_braga/32/110348_2.png) [@Eduardo\_Braga](https://meta.discourse.org/u/Eduardo_Braga)
#### Post date: [January 1, 2020, 6:09pm UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/17 "2020-01-01T18:09:31Z")

</div>

installed at VULTR

 ![instalado](https://global.discourse-cdn.com/meta/original/3X/6/1/617acfa7dd2338ee06eb87ee0011778645f585f0.png)

Cloudflare

 ![cloudflare 3](https://global.discourse-cdn.com/meta/original/3X/6/5/65f549257b97a2e2b3aa0342e80e9522e56424f6.png)

Error forum.meuxbox.com.br

 ![error pagina](https://global.discourse-cdn.com/meta/original/3X/8/4/8422f87aa5bc6181e9303b1f6b89e662cc1c5f55.png)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 2, 2020, 6:50am UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/18 "2020-01-02T06:50:36Z")

</div>

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

```plaintext
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

```

---

<div class="post-metadata">

### Author: ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)
#### Post date: [January 2, 2020, 7:26am UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/19 "2020-01-02T07:26:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 2, 2020, 7:56am UTC](https://meta.discourse.org/t/cloudflare-with-discourse/137456/20 "2020-01-02T07:56:39Z")

</div>

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

[Next page](https://meta.discourse.org/t/cloudflare-with-discourse/137456.md?page=2)
