|

Error 413 on large file uploads with Nextcloud behind Nginx reverse proxy.

If you are running Nextcloud behind a Nginx proxy server, you will need to change the maximum file size for uploads which by default is only 1MB on Nginx.

You can use the “client_max_body_size” directive to set the required file size for uploading. This directive can be set in the http, server or location context. In this example, we will add the directive to the server context and limit the maximum file upload size to 100MB.

server {
    ...
    client_max_body_size 100M;
}

If you are still experiencing problems or do not want Nginx to check the file size, you can disable this option by setting the value of the “client_max_body_size” directive to “0”.

server {
    ...
    client_max_body_size 0;
}

Similar Posts