Page 1 of 1

Nextcloud File Size Solution

Posted: 23 Sep 2023, 04:13
by ahochreiter
Myself, as many others encountered this problem while using the terramaster nextcloud app-package:

Code: Select all

Server replied "413 Request Entity Too Large"
Yet, no solution was ever provided.
To add insult to injury, those topics even got locked up so further discussion was surpressed.

The main problem at hand is the nginx server running on port 8181, having an itsy bitsy small allowed upload size of 100 MB.
All you need to do is to change that and restart the service.

1. Connect to the NAS via SSH. (User = your nas user, SSH Port = open the nas's webinterface, then go to Systemsettings > Terminal & SNMP > Telnet / SSH and make sure SSH is enabled and you asigned a port number)
2. Open nginx's config

Code: Select all

sudo vi /etc/nginx/nginx-http.conf
3. Search for the line containing

Code: Select all

client_max_body_size 100M;
(is probably line around line 4 or 5)
4. Replace the 100 MB with whatever you want eg 10GB

Code: Select all

client_max_body_size 10G;
5. Save and close the file
6. Restart the nginx service

Code: Select all

sudo service nginx restart
The change will take effect immediately. You can re-attempt to sync files from your nextcloud client now.
Have fun!

Re: Nextcloud File Size Solution

Posted: 23 Nov 2023, 11:57
by zelmajackson
Thanks for sharing this effective solution. It works for me