I’m running a very similar setup – Nextcloud AIO in Docker behind Nginx Proxy Manager. The only difference is that I don’t use Cloudflare or any DNS proxy service, since I have a public IP and everything goes directly through it. That way I avoid many of the issues that can appear with NPM + Cloudflare (timeouts, restrictions, or misrouting).
I documented my configuration in detail here:
It might help if you take a look. I describe the exact settings I’m using, for example:
- setting
client_max_body_size 0;so uploads don’t fail on proxy limits, - some details on how I route AIO containers through NPM,
- and notes about performance when handling larger files as well as limits within Proxmox.
Not sure if your issue is the same as what I had, but comparing your setup with mine could give you some ideas on where to look for the cause of the 502 error.