Testing Large File Synchronization with Nextcloud AIO and NGINX Proxy

:mag: Testing Large File Synchronization with Nextcloud AIO and NGINX Proxy

Date of test: April 23, 2025
Reason for testing:
Due to a noticeable increase in forum posts reporting issues with syncing large files via Nextcloud, I decided to perform a test focused on the stability, configuration, and behavior of syncing a file larger than 20 GB using the official desktop client.


:test_tube: Test Setup

  • Nextcloud AIO: v10.12.0

  • Nextcloud version: 30.0.9 - STABLE

  • Desktop client: Linux CachyOS - version 3.16.3 from the official repo

  • Server environment:

    • Platform: Proxmox virtual machine
    • OS: Ubuntu 24.04 LTS
    • Filesystem: XFS
      (Note: EXT4 is not recommended for large files based on my experience — XFS performs significantly better with large files.)
    • CPU: 12 cores
    • RAM: 12 GB
    • Disk: Kingston 3000 NVMe – 4 TB
    • Ballooning: enabled

      :brain: What is Ballooning?
      Ballooning is a memory management mechanism in virtualized environments that allows the hypervisor (e.g. Proxmox) to dynamically increase or decrease the amount of memory allocated to a VM.

      :white_check_mark: In this case, ballooning is an excellent safeguard against OOM (Out Of Memory) situations, which could otherwise cause service crashes when handling heavy tasks like uploading large files.

  • NGINX Proxy Manager - v2.12.3

  • Network:

    • Server: 1000/500 Mbit
    • Client: 5 GHz WiFi connection

:gear: docker-compose.yml Configuration

# version: "3.4"

volumes:
  nextcloud_aio_mastercontainer:
    external: true

services:
  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: unless-stopped
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 6789:8080
    environment:
      - APACHE_PORT=11000
      - NEXTCLOUD_MEMORY_LIMIT=4096M

:memo: Note:
The default memory_limit for Nextcloud AIO is 512 MB, which is insufficient when uploading large files.
Therefore, the following environment variable was explicitly added:

NEXTCLOUD_MEMORY_LIMIT=4096M

This configuration greatly improved stability and reliability during large file transfers.


:globe_with_meridians: NGINX Proxy Settings (via NGINX Proxy Manager)

In the Advanced tab for the domain/subdomain:

client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;

:pushpin: Important:
The setting client_max_body_size 0; removes any upload size limit imposed by the reverse proxy, which is essential for handling large file uploads.

Screenshots:


:receipt: Test File

  • Name: Avatar The Way of Water (2022).mkv
  • Size: 23.7 GB

:stopwatch: Sync Process

  1. Preparation phase:

    • After triggering the sync, it takes a few minutes before the upload begins.
    • This delay is due to hashing, chunk preparation, and initial comparison with the server.
  2. Transfer phase:

    • Upload duration: ~22 minutes
  3. Finalization phase:

    • Once uploaded, server-side finalization (e.g. database write and file verification) took approximately 30 seconds.

:white_check_mark: Result

The 23.7 GB file was successfully synchronized without errors or interruptions.
The combination of an increased memory limit and the XFS filesystem proved to be a reliable solution for syncing very large files in a Nextcloud AIO setup behind an NGINX Proxy.


:warning: Important Notes

  • Tested Nextcloud version: 30.0.9 is currently the STABLE release.

    :exclamation: Nextcloud 31 is not yet marked as STABLE — it may contain unpolished features that could cause issues with large file uploads, desktop client compatibility, or chunk handling behavior.

  • It is strongly advised to wait for the STABLE tag before deploying a new major version of Nextcloud, and to review the official release notes and issue tracker on GitHub — especially when working with large files or complex self-hosted environments (NGINX, VPN, encrypted storage, ZFS, etc.).

2 Likes

Thanks a lot!!

I tried Nginx Proxy Manager and seems to work… however, I am getting the Proxy IP address instead of the client IP Address.

  1. Share your IP address for device where is your NGINX PROXY MANAGER
  2. Share your IP address for device where is your Nextcloud AIO

Nginx proxy manager is in 192.168.200.5

Nextcloud is in 192.168.200.20, I added it to trusted_proxies

Does it mean that Nextcloud has IP 192.168.200.20 ?

Sorry… My mistake… … had a typo… Netxcloud is working and seeing the client IP

Thanks a lot.

1 Like

If I want nginx’s outbound port (i.e. Nextcloud’s reverse proxy port) to be a non-standard port, can it be implemented?

Yes, it’s possible. In my setup:

  • Port 6789 is used for the Nextcloud AIO admin interface.
  • Port 11000 is the reverse proxy target for Apache behind NGINX.

Just make sure NGINX forwards to the correct internal port, and that overwrite.cli.url and trusted_proxies are properly set in config.php.