<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Issues when using Cloudflare Proxy service for Cloudron]]></title><description><![CDATA[<p dir="auto">Recently I started using Cloudflare WAF service to protect my Cloudron instance. I had to proxy requests through Cloudflare for the WAF to work. After enabling Cloudflare proxy, I faced a few problems. I would like to share my setup as well as list out the problems.</p>
<h3>My Setup</h3>
<p dir="auto">Cloudflare supports different options for SSL termination, among which Full Mode and  Full (Strict) Modes are the two options. Since the origin server (Cloudron) forces all connections to be HTTPS, I used the Full(strict) mode. Also, Cloudflare does not support proxying <code>*.mydomain.org</code>, but only individual subdomains like <code>app1.mydomain.org</code>, <code>app2.mydomain.org</code>.</p>
<h4>Cloudflare Dashboard</h4>
<p dir="auto"><img src="/assets/uploads/files/1643031390114-3c091e2e-c93e-4eb0-b894-1b66d57c74d7-image-resized.png" alt="3c091e2e-c93e-4eb0-b894-1b66d57c74d7-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Cloudflare automatically provisions Edge Certificates for <code>mydomain.org</code> and <code>*.domain.org</code> and then does SSL termination on their end. The origin server (Cloudron) must also have a valid certificate or Cloudflare Origin CA Certificates.</p>
<h4>Cloudron Domain Settings</h4>
<p dir="auto">I tested with both DNS Providers here - Cloudflare as well as Wildcard, with same results.</p>
<p dir="auto"><img src="/assets/uploads/files/1643031798036-b5e52543-2e92-4498-9e78-f120d95c560a-image-resized.png" alt="b5e52543-2e92-4498-9e78-f120d95c560a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Many things are working as expected, but I noticed a few things got broken.</p>
<h4>While installing new apps</h4>
<p dir="auto"><img src="/assets/uploads/files/1643036064676-80f2f3fe-2857-4f30-ab36-bde06fb0c0ca-image-resized.png" alt="80f2f3fe-2857-4f30-ab36-bde06fb0c0ca-image.png" class=" img-fluid img-markdown" /></p>
<ol>
<li>
<p dir="auto">When I am using the Wildcard DNS provider or Cloudron, the app installs successfully but I see a certificate error when I open the newly installed app. That's because <code>newapp.mydomain.org</code> is only resolving because of the wildcard <code>*.mydomain.org</code> entry, and it points directly to my Cloudron without proxying through Cloudflare. Since my Cloudflare is using Custom Certificates from Cloudflare Origin CA, web browsers don't trust it. I have to manually go to Cloudflare dashboard and add a new A-Record in proxy mode. Then the certificate errors resolve.</p>
</li>
<li>
<p dir="auto">Even if I'm using Cloudflare DNS Provider using API Token, Cloudron adds an A-Record but the certificate error still shows up because the A-Record is still in DNS-Only mode. If Cloudron gave an option to set the A-Record in Proxy Mode while installing the app, I didn't have to go to Cloudflare and change the record from DNS Only mode to Proxied Mode and wait for DNS to propagate.</p>
</li>
</ol>
<h4>Some Apps Report Wrong IP of Visitors (Cloudflare IPs)</h4>
<p dir="auto">When a website is proxied through Cloudflare, the visitors connect to the Cloudflare servers, and one of the Cloudflare IPs connects to the origin (Cloudron) server. Cloudron does forward the <code>X-Forwarded-For</code> header to the apps, which works in most of the cases, but in this case <code>X-Forwarded-For</code> contains the Cloudflare server's IP instead of the real visitor's IP! That's a bummer. See <a href="https://shareablecode.com/snippets/how-to-get-real-visitor-ip-address-from-cloudflare-proxy-in-nginx-apache-logs-an-Fa6X-JQEe" target="_blank" rel="noopener noreferrer nofollow ugc">this online post on Cloudflare IPs</a> where it discusses the ideas to detect the visitor's real IP address. If Cloudron could <strong>check for <code>CF-Connecting-IP</code> header and pass that value as X-Forwarded-For</strong>, that would solve this issue entirely. Cloudflare publishes the list of IPs it uses to fetch origin content. The ipv4 addresses are <a href="https://www.cloudflare.com/ips-v4" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> and ipv4 addresses are <a href="https://www.cloudflare.com/ips-v6" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<hr />
<p dir="auto">That's all for now. I'll add more when I face other issues.</p>
]]></description><link>https://forum.cloudron.io/topic/6374/issues-when-using-cloudflare-proxy-service-for-cloudron</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 02:14:18 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/6374.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Jan 2022 14:54:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Wed, 15 May 2024 20:34:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Nice, thank you. Have just added them manually.</p>
<p dir="auto">Be double-nice if they were added automatically when Cloudflare is first used as a DNS Proxy, but I guess I understand that's both an additional feature to maintain, and maybe debatable if everyone would want it happening silently.</p>
]]></description><link>https://forum.cloudron.io/post/88541</link><guid isPermaLink="true">https://forum.cloudron.io/post/88541</guid><dc:creator><![CDATA[marcusquinn]]></dc:creator><pubDate>Wed, 15 May 2024 20:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Mon, 13 May 2024 11:17:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/marcusquinn" aria-label="Profile: marcusquinn">@<bdi>marcusquinn</bdi></a> yes, see <a href="https://docs.cloudron.io/networking/#trusted-ips" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/networking/#trusted-ips</a></p>
]]></description><link>https://forum.cloudron.io/post/88377</link><guid isPermaLink="true">https://forum.cloudron.io/post/88377</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 13 May 2024 11:17:43 GMT</pubDate></item><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Mon, 13 May 2024 00:16:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nj" aria-label="Profile: nj">@<bdi>nj</bdi></a> said in <a href="/post/42319">Issues when using Cloudflare Proxy service for Cloudron</a>:</p>
<blockquote>
<p dir="auto">Some Apps Report Wrong IP of Visitors (Cloudflare IPs)<br />
When a website is proxied through Cloudflare, the visitors connect to the Cloudflare servers, and one of the Cloudflare IPs connects to the origin (Cloudron) server. Cloudron does forward the X-Forwarded-For header to the apps, which works in most of the cases, but in this case X-Forwarded-For contains the Cloudflare server's IP instead of the real visitor's IP! That's a bummer. See this online post on Cloudflare IPs where it discusses the ideas to detect the visitor's real IP address. If Cloudron could check for CF-Connecting-IP header and pass that value as X-Forwarded-For, that would solve this issue entirely. Cloudflare publishes the list of IPs it uses to fetch origin content. The ipv4 addresses are here and ipv4 addresses are here.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nj" aria-label="Profile: nj">@<bdi>nj</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Did the IP forwarding suggestion here ever get implemented?</p>
]]></description><link>https://forum.cloudron.io/post/88346</link><guid isPermaLink="true">https://forum.cloudron.io/post/88346</guid><dc:creator><![CDATA[marcusquinn]]></dc:creator><pubDate>Mon, 13 May 2024 00:16:06 GMT</pubDate></item><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Sun, 30 Oct 2022 21:44:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajtatum" aria-label="Profile: ajtatum">@<bdi>ajtatum</bdi></a> yeah as <a class="plugin-mentions-user plugin-mentions-a" href="/user/benborges" aria-label="Profile: benborges">@<bdi>benborges</bdi></a> said, there's no way to proxy MX via Cloudflare afaik.</p>
]]></description><link>https://forum.cloudron.io/post/55134</link><guid isPermaLink="true">https://forum.cloudron.io/post/55134</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sun, 30 Oct 2022 21:44:25 GMT</pubDate></item><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Sun, 30 Oct 2022 18:12:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajtatum" aria-label="Profile: ajtatum">@<bdi>ajtatum</bdi></a> correct, but that's not a cloudron limit, that's how cloudflare &amp; DNS work<br />
the MX can never be proxied hence, somewhat nullifying the whole idea ??</p>
<p dir="auto">in my usecase, the only solution I have found is for anyone that attempt to resolve my IP directly is sent to my.cloudron.domain (hence cloudflare proxied) but there is nothing you can do for the MX.</p>
]]></description><link>https://forum.cloudron.io/post/55123</link><guid isPermaLink="true">https://forum.cloudron.io/post/55123</guid><dc:creator><![CDATA[benborges]]></dc:creator><pubDate>Sun, 30 Oct 2022 18:12:04 GMT</pubDate></item><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Sat, 29 Oct 2022 16:44:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Sorry to revive an old topic and if there's a newer one I apologize, but I was just curious about this as I would prefer to have some sites protected by Cloudflare. I realize for certain subdomains, such as for SMTP server, that can't be proxied. But I think that's the only exception unless you're utilizing Cloudron as an LDAP source then you'd also leave "<a href="http://my.cloudroninstance.com" target="_blank" rel="noopener noreferrer nofollow ugc">my.cloudroninstance.com</a>" un-proxied (which isn't ideal as it leaves it vulnerable).</p>
<p dir="auto">To give you some context, I'm asking because I have dedicated IP addresses and also use Tailscale. So, in Cloudflare I have a list of my dedicated IPs and Tailscale addresses and for some services I setup a WAF rule that simply blocks anyone from even attempting to access the site based on their IP address.</p>
]]></description><link>https://forum.cloudron.io/post/55092</link><guid isPermaLink="true">https://forum.cloudron.io/post/55092</guid><dc:creator><![CDATA[ajtatum]]></dc:creator><pubDate>Sat, 29 Oct 2022 16:44:38 GMT</pubDate></item><item><title><![CDATA[Reply to Issues when using Cloudflare Proxy service for Cloudron on Mon, 24 Jan 2022 18:08:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nj" aria-label="Profile: nj">@<bdi>nj</bdi></a> said in <a href="/post/42319">Issues when using Cloudflare Proxy service for Cloudron</a>:</p>
<blockquote>
<p dir="auto">Even if I'm using Cloudflare DNS Provider using API Token, Cloudron adds an A-Record but the certificate error still shows up because the A-Record is still in DNS-Only mode. If Cloudron gave an option to set the A-Record in Proxy Mode while installing the app, I didn't have to go to Cloudflare and change the record from DNS Only mode to Proxied Mode and wait for DNS to propagate.</p>
</blockquote>
<p dir="auto">This is the best way to do it.</p>
<ul>
<li>Add the domain in Cloudron with Cloudflare DNS provider</li>
<li>Cloudron will always add the A record in DNS Mode.</li>
<li>Go to Cloudflare, and turn on proxying.</li>
<li>For future DNS changes to this domain, Cloudron has code to "persist" the proxying flag. Just noting this down, since we have code explicitly for this use case.</li>
</ul>
<p dir="auto">I agree having a checkbox or something at app install time to enable proxying would be nice.</p>
]]></description><link>https://forum.cloudron.io/post/42331</link><guid isPermaLink="true">https://forum.cloudron.io/post/42331</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 24 Jan 2022 18:08:34 GMT</pubDate></item></channel></rss>