Nextcloud won't upload large files (3GB+) proxied through cloudflare

I have nextcloud installed in docker on Unraid behind an nginx reverse proxy configured to use dns validation through cloudflare.

Everything works for the most part, but I’ve noticed that when uploading a 4.5GB file from outside the local network (Windows10.iso), it will stall at around 3.5GB and throttle back to 500Kb/s after having been rolling at 8MB/s prior.

However if I turn off the proxy flag in cloudflare for my nextcloud CNAME record (ie expose my server’s WAN IP directly) it works fine.

I have these changes made in my persistent data of my nextcloud docker install:

location ~ .php(?:$|/) {
fastcgi_connect_timeout 60;
fastcgi_send_timeout 1800;
fastcgi_read_timeout 1800;ade in the persistent dada of my nextcloud docker:

php_value upload_max_filesize 10G
php_value post_max_size 10G
php_value max_input_time 3600
php_value max_execution_time 360


That’s why i have turned off the reverse proxy of Cloudflare for my Nextcloud instance.

But probably that link is helpful:

1 Like

Yeah I have that done because I’m also using crowdsec instead of fail2ban in nginx and without enabling real-ip it won’t correctly block threats.

but actually I did an A-B-A on cloudflare proxy ON-OFF-ON and the issue didn’t repeat itself on the last go when I turned it back on. So maybe it was unrelated.

At any rate, I’d love to know if a lot of people on here proxy their NC instance behind cloudflare or just expore their real public IP. People argue that although there is no caching benefit which I presume is the purpose of a CDN like cloudflare, there are security benefits to block DDoS attacks and such. So I’m just trying to make sure that the following assumptions are true:

Assumption 1) Cloudflare has unlimited bandwidth
Assumption 2) Cloudflare free plan is max 100MB upload but NC works around this using blocks
Assumption 3) Cloudflare provides additional security benefits to your nextcloud instance
Assumption 4) Cloudflare doesn’t slow down your nextcloud performance (see assumption 1)

Well, they say Cloudflare can cause issues:

But nonetheless, does that work for you?

yeah copy. I’ll look out for those issues if they arise.

yeah it’s all working fine through a reverse proxy. I followed all the spaceinvaderone videos on youtube for unraid. At first it was just blindly following but now a few years later I feel like I understand some of the basic principles.

I’ll keep using cloudflare and report back any issues.

1 Like

Talk is working as well?

And syncing photos of cell phone too?

And also the desktop client?


Thank you!