Nextcloud App error when uploading

Good day everyone, I hope everyone is having a wonderful time today!

Here is my issue, I have nextcloud AIO running on Ubuntu VM with portainer management. Nextcloud AIO is running behind Cloudflare tunnel FYI.

Now I install nextcloud app on my iPhone and started auto upload of my images and videos. The most I have is 95gb of pictures, videos and files.

I have tailscale running on all my machines including my hyperV that’s running the nextcloud VM that’s solely for nextcloud.

Anyways whenever I am in the nextcloud app on my iPhone, for the life of me I can’t figure out why I am getting these error messages when my files are uploading to my nextcloud server.

I spend hours trying to find a solution online with any kind of documentation but I am a bit lost and as I said, I’m new to nextcloud.

Thank you for taking the time out to help me with this issue!


I would really appreciate if anyone knows a solution for this, or at the very least provide some insight on what could be the possible causes.

Unfortunately you’ve ignored to fill in the support template and to provide DETAILED information about your environment, used apps, software versions, network layout, etc., etc. Without this information it will most likely be impossible to help you on this topic.

Do I understand that you are using both services, Cloudflare tunnels and Tailscale to connect to your Nextcloud? How exatley did you set this up? Are you somehow trying to use them in tandem? If so this almost certainly part of the problem. And even if you’re not trying to tie them together somehow, it still seemsredundant, und erhöht die Komplexität unnötig.

If so, my recommendation would be:

Set up AIO with neither Cloudflare nor Tailscale, and only if that works, add either Cloudflare or Tailscale.

I am completely new to this so I didnt even know where to find the template and I saw some people didnt use it as well. My apologies

I have Nextcloud running as a vm on my hyperv server, I have tailscale on the hyperv server but for nextcloud ubuntu server, I do not have tailscale install since I have nextcloud AIO in portainer running cloudflare tunnel. That is why I am confused. The files are uploading but every few seconds are so I get those errors. I also have tailscale on my iphone as well. I disconnect my iphone tailscale and still have the same issue with the app so I am not sure it is a tailscale issue.

Ah ok. Then they should not affect each other, or at least not directly.

Then probably not. Unfortunately, I can’t really help you there, as I don’t use Cloudfare tunnels myself. But you might want to search through the topics here. As far as I can tell the Cloudfare topic comes up quite a bit.

Also, since a Cloudflare tunnel is basically just a fancy reverse proxy, maybe this might help as well: all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub

I appreciate you taking the time out to help me. Thank you!

I would have done NPM a long time ago with Cloudflare, however, I have at&t fiber and it doesnt allow me to open port 80 and 443 for nginx in the hyper v VM. It’s extremely frustrating that I spend days trying to get it to work but couldnt. Anyways I will review those topics and see if any anyone has any insight on this issue.

One thing that comes to mind that might cause problems like this is that, afaik, Cloudflare tunnels have some file size limitations, especially with the free plan, you might also want to look into that specifically when doing your research…

So I think I found the resolution to this issue. When I was logged on to the ios nextcloud app on my iphone, I was logging on as my.domain.com but I should have logon as https://my.domain.com.

After doing that and resetting the app, review the logs and review uploads, I did not get anymore of the errors. Thank God! before that I also change the max chunked size to 95MB since I am using cloudflare tunnel as well. Putting this here in case anyone also comes across this issue as well.

I take it bad, the issue is still not resolve, wasn’t getting the error all day until just now. This is extremely frustrating cause it doesn’t matter what I google, I can’t find a solution for this!

Hi,
we’re still missing some key information here — without that, it’s hard to move forward. We don’t have a crystal ball. :slightly_smiling_face:

  1. Where is your Nextcloud server hosted — at home or with a hosting provider (e.g., VPS)?
  2. Do you have a public IP address?
  3. Are you using Cloudflare Tunnel because you don’t have a public IP, or is there another reason?
  4. Is Cloudflare set as a proxy (orange cloud in DNS), or just DNS (gray cloud)?

In my experience, issues like the one you’re describing are often caused by Cloudflare, especially when using their proxy or tunnel features. It tends to limit certain types of requests — chunked uploads in particular — which can break the Nextcloud mobile app.

Tailscale is just adding unnecessary complexity in this case. For a basic remote access setup, you don’t need it — and here it might be doing more harm than good.

If you have a public IP, I recommend starting from a clean, simple setup:
→ Use a reverse proxy (NGINX or Caddy), get SSL via Let’s Encrypt, no Cloudflare, no Tailscale.
Once that works reliably, you can add other layers if truly needed.

Share more specific details about your current setup — only then can we help you find the simplest and most reliable solution.

Honestly I didn’t know what else information I needed to add. Everyone kinda needs different information so it’s just best for someone to ask for additional information if needed.

1# Ok so I have nextcloud running on a windows 2019 supermicro 2U server in hyper V at home.

2&3# Im using Cloudflare Tunnel for public IP and additional layer of security.

4# I’m using nextcloud AIO so based on documentation, it consider cloud flare tunnel as reverse proxy if I recall correctly.

I’ve run nextcloud manual before and upload was working with no issues for the little quick test I did but this is my first time doing it and I thought AIO was significantly better cause I was having too much issues setting up the manual version.

After I tried setting up NPM with the nextcloud manual version, issues started, I have AT&T fiber, I’m in the US and it kept killing my connection, also wouldn’t allow me to do open port 443 and 80.

My original thought was to run NPM and then connect cloudflare tunnel to it.

As for Tailscale, I just wanted that on all my home devices to keep it safe but also allow me to use them remotely when needed.

Reason why I am not using Tailscale for nextcloud is to have family members use it and they are not computer literate whatsoever and some live outside of the country.

The Tailscale isn’t on Ubuntu box, it’s just on the hypervisor. So I don’t think Tailscale is the issue here.

I also installed the nextcloud desktop app on my dad machine lastnight and I didn’t get any errors when reviewing it. So idk.

I just increase the php memory from 512 to 1G but same issue. Increase nextcloud server RAM to 26Gb, upload is at 16g and max upload time is at 3600. So idk man, Im at my Witt’s end here.

Maybe it’s cloudflare doing it but maybe there’s something there I can change to fix this? I have rocket loader off as well so idk.

Hi,
I totally understand your frustration — I’ve been there too.

Personally, I haven’t tested Nextcloud AIO on Windows Server, so I can’t fully assess how it behaves in that environment.
I run everything on a self-hosted Proxmox server where I have multiple Ubuntu Server VMs.
One of them runs Nextcloud AIO, and it’s been working flawlessly for almost 3 years.


:closed_lock_with_key: Public IP vs. Cloudflare/Tailscale

I pay for a public IPv4 address specifically to avoid services like Cloudflare and Tailscale, because I’ve had issues with both in the past.

In particular, Cloudflare caused problems with syncing large files — uploads would either fail or endlessly loop. Cloudflare has certain limits and aggressive behavior that doesn’t always play nicely with protocols like WebDAV, especially over tunneled reverse proxies.


:white_check_mark: My Working Setup

Here’s the model I use that has been rock solid:

nextcloud.mydomain.sk
     ↓
paid public IP address
     ↓
router (forwarding ports 443 and 80)
     ↓
NGINX proxy server (running in a VM on my LAN)
     ↓
Nextcloud AIO (separate VM on same LAN)

  • SSL certificates are handled automatically via Let’s Encrypt on the NGINX proxy
  • Syncing works perfectly across desktop, mobile, and WebDAV
  • No HTTPS issues, no remote access problems, no outages

Just yesterday I helped another user set up a similar reverse proxy setup — here’s the thread if you’re interested:
:link: Can't make reverse proxy work between public Apache server and local Nextcloud server


:bulb: Suggestions

  • If you’re planning to share access with family members, especially non-technical users, I’d really recommend avoiding Cloudflare Tunnel.
  • If AT&T won’t let you open ports 80/443 at home, maybe look into hosting a small VPS or VM with a provider that gives you a public IP.
  • If you continue using Cloudflare, make sure to disable Rocket Loader, caching, compression, and other “optimizations” for the Nextcloud subdomain — these often cause trouble.
  • Also double-check your proxy headers (X-Forwarded-For, X-Real-IP, etc.) — misconfigured headers often lead to weird behavior with AIO behind reverse proxies.

If you ever want help switching to a direct reverse proxy setup (without Cloudflare), I’m happy to walk you through it. It can absolutely be made to work reliably even from home — if you can get basic port forwarding set up.
But you can follow my settings as mentioned above at URL.

So I mean nextcloud is running on a docker in portainer, however, I think the issue with Cloudflare and my iPhone maybe. I’m going to test the desktop software and see if it has the same issue.

I also have a another 2u supermicro that I just install promox on it and running trunas to back up nextcloud aio data, trying to setup borg remote repo to go to the truenas. Right now it’s setup to go to borgbase and it’s working flawlessly, same with clamav.

So the nextcloud server has 10tb raid 5 and the trunas has 16tb mirror. On both servers I only have 3 bays being use cause well that’s all the disks I have to use that can work with those disks.

Anyways I wish I had install unraid instead but too much work to redo it now.

I have another 10tb that I could have added with the three 16tb anyways I have about 50GB of pictures and videos I’m trying to upload from my phone. I just don’t understand why I’m having these issues when everybody else seems to have everything fine. All my config is literally exactly what others are using. I’m just flabbergasted man. Everything I’m seeing is saying my Apache server in the container can’t communicate with nextcloud when the 502 error comes? Idk it doesn’t make any sense.

Im wondering if the nextcloud aio default setting have anything to do with this, Default Cache Behavior · Cloudflare Cache (CDN) docs

Hi again,

Perfect to have extra info — now the picture is a bit clearer.

Just a quick perspective based on how I run things long-term:


:brain: On your setup with Proxmox and TrueNAS

If your goal with TrueNAS was mainly to back up your Proxmox/Nextcloud AIO, I’d personally consider it an unnecessary layer — unless you already had a dedicated device running TrueNAS (which doesn’t seem to be the case).

If it’s just a matter of using the available disks, then I’d strongly recommend handling the disks directly within Proxmox, without adding another OS in between. You’ll simplify your setup, reduce resource usage, and avoid potential permission or snapshot complications.


:gear: My recommendation – Simple and Proven Storage on Proxmox

Since you have a few disks (10 TB + 3×16 TB), I’d suggest using ZFS directly in Proxmox. It’s rock solid and works perfectly with backups, replication, and snapshots. Here are a few possible approaches:

:white_check_mark: Option A – ZFS Mirror (safe, simple)

  • Use two of the 16TB drives in a mirror (RAID1) for redundancy
  • Use the third disk (e.g., 10TB or spare 16TB) for local Proxmox backups (or another ZFS pool)

:white_check_mark: Option B – ZFS RAIDZ1 (more space, some redundancy)

  • Pool all three 16TB drives in a RAIDZ1 – you’ll get ~32TB usable with single-drive fault tolerance

Either way, your backups can be handled directly by Proxmox, either via the built-in backup system or by scheduling ZFS snapshots and replicating them to another disk or remote location.


:person_in_lotus_position: About Unraid and Cloudflare

I also intentionally avoid Unraid, especially because of known issues with Nextcloud performance and file handling under Docker in that environment.

And Cloudflare? I don’t use it at all.

I just pay a few euros per month for a public IP address, because that time-saving alone is worth far more than the hours I’d waste debugging uploads, timeouts, or odd proxy behavior. Time is expensive. Stability is priceless.

The shortest distance between two points is a straight line.
And in homelab environments — the fewer layers, the better.

:rightwards_hand: That said…

I totally understand that your setup and preferences may differ — and that’s absolutely valid.
Everyone has their own approach based on hardware availability, previous experience, or comfort level with certain tools and systems. If TrueNAS works well for your use case and fits into your workflow, that’s what matters.

At the end of the day, the goal is the same for all of us: build something stable, maintainable, and useful. And there’s more than one path to get there.

Wishing you good luck with the testing — and if you need help simplifying anything or want to experiment with a more direct setup, I’m happy to assist.

Ok so this is awesome and tbh these information will help a large amount of people but I have a few concerns.

I already have NPM setup in portainer but it keeps breaking, I guess because when I go into my AT&T fiber router, it doesn’t seems to be able to find the NPM in the VM with docker. It’s hard to explain, best to show you. Watch this video and you will understand clearly:

As for simplicity, simplicity is key and the best thing but I also want to make sure my system is safe which is also why I wanted to use cloudflare but the main reason is for the ddns I get with cloudflare to help avoid cgnat I currently can’t buy public ip address. If I could then i probably would have went with this setup from this video

So I’m really in a rough spot, I will try to see if I can forward the ports again but my router probably won’t pick up the NPM. If you have any insight on how this fiber router can see the NPM then that be much much appreciated.

As for the proxmox and truenas, i pass through the disks to truenas from proxmox unfortunately not with an HBA, however, it’s seem to be working just fine. The reason for this is because I saw a lot of people recommending this setup for a magnitude of reasons but for me is that I want the truenas to handle the disk but also because I also want to use the proxmox for virtualization and run stuffs and I mean just do home lab stuff, if I wanted it just for backups, I guess I would have debated just installing a proxmox backup server and call it a day but the plan is to have borg do its things for nextcloud AIO and veeam backup everything else to the truenas and then experiment with different VMs in proxmox when I come around different projects.

I guess the only other thing right now I would want to practice with is maybe a domain server but I have no idea how I would do that in my environment right now but one thing at a time, the goal right now is to get this d@mn nextcloud thing working properly.

My thing is cloudflare is a known issue but I also see that tons of other people seems to not have issues with the 502 error so I’m wondering if it’s because they are behind NPM? Idk, I’m not uploading a lot of big files, it’s just my iPhone and my dad new desktop right now.

After the initial upload is done, it just be uploading new picture and stuff that won’t be over 1G :man_shrugging:t5:

Your setup shows a clear vision and a strong drive to get things working the way you want.
I don’t have experience with AT&T routers, so I won’t be able to help with that part, but it’s good that you’re testing things step by step.

Wishing you success getting Nextcloud stable — once that’s sorted, your homelab will be in a great place to build on.
Stay with it, you’re on the right track.

Thank you for taking the time out of your day to help me or providing some alternate directions that I can take. You’re a big help to the community!

Even though I am getting these errors, I am still seeing that pictures are being uploaded, just very very slow.

As for anyone reading this and saw what we talked about with proxmox and truenas, see these videos explaining the benefits and why I decided to go this route.

Anyway that’s it for now.

If I find a way that fix my issue completely, I will update this and provide the resolution.

1 Like