Fast upload on LAN, but very slow on WAN

I am using Nextcloud 18.0.6 from the linuxserver.io Unraid docker.

My upload speeds seem to be limited to about 1 megabyte per second when trying to upload from outside of my network. This is the case for the webUI, mapped network drive, and the Nextcloud iOS app.

If I upload while on the LAN there are zero issues and the transfer goes the speed I would expect.

What can cause this discrepancy between WAN and LAN speeds?
What are the differences in how Nextcloud handles WAN vs LAN connections?

I don’t think it has anything to do with memory, bandwidth, or really anything that is in common between both WAN and LAN uploads. I am using a fairly basic pfSense setup for my router.

Apologies if this has already been answered, but I could not find a good answer for why there would be such a difference between WAN and LAN.

I figured it out - and it had to with the recommended settings in the documentation.

Basically for some reason the proxy_request_buffering set to “off” was the problem. Once I changed that to on and tweaked a few settings to still handle large files things seem to work much better.

Also. I ran into that “expected file size XXXX… but and wrote YYYY” error with very large files. Turns out my particular issue was my docker image filling up because space needs to be reserved for each portion of the file then finally enough to construct the entire file and finally move it. So basically I changed my docker image size to be 4x the size of the largest file that would feasibly be uploaded just to be safe.

1 Like

Hello johnsanc,
I think, i’ve the same issue as you. However, if I’ve well understand your solution works when you use nginx. Have you an idea to solve the problem when you don’t use nginx ?