Nextcloud with cloudflare SSL, loading slow and lost packets


I’m using cloudflare for my domain and also cloudflare SSL cerificate (free).

If I’m accessing my nextcloud server from local LAN via local IP or from outside LAN but using another domain (that is also pointing to my server, with a SSL warning of course - because I’m using cloudflare certificate), the server is answering OK, so it seems all nextcloud configs are OK.

If I’m accessing the server via the designated domain (the one registered in cloudflare), my nextcloud server is answering normally (without SSL warning) BUT extremely slow, and some parts/pictures does not load completely. I need to send several refresh commands until a page is completely loaded.

I’m using port 2053 for secure access (2053 mapped to 443 in my router).

Any idea?

Thank you,

Do you have rocket loader enabled? I found it didn’t play well with Nextcloud so turned it off for our Nextcloud domain using Page Rules.

1 Like

No, I don’t have rocket loader enabled, but thank you for your message, it gave me an idea to try different settings for speed/cache etc. so I’ll make further tests

1 Like

@Costinr good to check for Mirage as well,

It. may be worth testing directly to 443

Thanks, but I’m on the free plan, so no Mirage in the free plan, as far as I know

Done. Same result.

I’m lost, I’ve tried every option I could think about.

Looking into dev tools in browser in network, I’ve seen a lot of 522. After every retry, the page is loading “a little bit more” probably combining local cache with cloudflare’s responses. I could say it’s a nextcloud server issue, BUT when accessing the server via any other way from WAN (via direct external IP for example), the pages are loading normally (after initial SSL warning of course, as I’m using cloudflare’s certificate).

There is any way to watch into some logs in cloudflare to understand where is the bottleneck? (Again, I’m on the free plan, I just wanted the SSL and some basic protection from cloudflare)

Thank you,

1 Like


Still no solution until now.

I really cannot understand where is the problem, as any other way to access my nextcloud server is ok, except via cloudflare registered domain.

I have just a little better results with page rule “cache: bypass”, but still with lost packets. Every refresh/reload gives other missing parts, until a complete page (not always succeed to load full page)

Unfortunately, I use (for the moment) cloudflare SSL certificate, so I cannot test with pause on cloudflare.

Any idea please?

Thank you,

It may be worth finding the 522 errors in your logs. It’s a difficult error to pinpoint as it can come from any number of devices. It’s worth contacting your hosting provider to see if they can help find the errors in the logs. Details described here, Troubleshooting Cloudflare 5XX errors · Cloudflare Support docs

1 Like

It’s worth contacting your hosting provider


As I said in my first message, I’m my own provider.
And again, 522 are partially messages, identified via dev tools in chrome (it’s not a general 522) and these errors does not appear when my nextcloud server is accessed via a different domain pointing to the same external IP or if accessed via the external IP directly (with SSL warning of course).

The pages are completely loaded with normal speed when my nextcloud server is accessed via a different domain pointing to the same external IP or if accessed via the external IP directly.

The problem arise only if accessed via protected by cloudflare domain. Several successive reload/refresh commands usually complete the page.

I’ve attached 2 screen captures, one if accessed via registered and protected by cloudflare domain, the other if accessed via external IP directly. Both captures are made from clean incognito chrome.

Here is the first capture (via cloudflare):

Thank you,

And here is the second capture (via external IP):


Maybe the most relevant situation:

  1. Edge certificates from cloudflare

  1. Encryption set to Full (not strict)

  1. Domain unproxied in DNS

  1. In browser with warning

and surprise: nextcloud pages are loaded normally, with normal speed and complete.

On the contrary, If the domain is set in DNS with proxy, browser says it’s a secure connection (without warning) BUT the nextcloud pages are loaded only partially and very slow.

Really no idea what to try, I’ve tried all the possible settings I could think about…

How much traffic does your Nextcloud cause per month?

Proxying Nextcloud is against Cloudflare’s ToS. That’s usually not a problem, but maybe you are getting limited because of high non-html traffic?

Hi and thank you,

limited because of high non-html traffic

No, definitely not, I’m uploading 2-3 jpeg images (phone backup) per day, and I’m using nextcloud to access my personal work folder (mostly docs)

Nextcloud is against Cloudflare’s ToS

Why? I’ve read it and I’ve found nothing I could infringe with nextcloud.

Thank you,

Essentially, the ToS say that only Enterprise customers may use Cloudflare for distribution of large files.

But that usually only matters if you cause a lot of traffic. I’m using Nextcloud myself behind Cloudflare, and they usually don’t care if you just use it for documents or some pictures.

Are you also using cloudflare SSL certificates? Or some other certificates?

And are on a paid plan or the free one?

Thank you,

I use LetsEncrypt certificates for my Origin, but that really shouldn’t matter.

My Nextcloud is also on a free plan.

1 Like

Thank you for the answer.

It seems that somehow cloudflare certificates are also involved in this issue (beside the - probable - ToS)

I’ve made some tests with another domain, and if using nextcloud with let’s encrypt the speed is normal, but with cloudflare certificates (free) the behavior is exactly as described in the previous posts.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.