Increase upload max size in NextCloud Jail in TrueNas

Hi all, I just setup my TrueNas system and installed NextCloud plugin. I also installed the App in my iPad and tried auto upload photos and videos. Everything works fine until I found a few files just won’t upload. When I checked the log file, I found the following error for the files which failed:

2021-09-25 17:58:34 Network completed upload file: Air 4/20-09-14 11-03-49 with error code 413 and error description 413: The file is too large

My OS is as follows:

and PHP is showing the following:

I think the “Upload max size” being 513mb is definitely the issue. I just need some help to adjust this metric in my TrueNas system.

I have zero background in coding, so I guess the place I need to go is TrueNas Jail → Shell, then the following command line pops up:
Root@NextCloudJail:~ #

I don’t know what I need to next … if you could help with the next few lines so I can adjust the upload size limit that would be greatly appreciated! Thanks!


One very silly question, do I need to “Stop” the NextCloud plugin in TrueNas before I make any changes in Jail->Shell then restart the Plugin after changes are made?

An update. I did some research on how to navigate the Shell and changed the parameters in the .ini file in the following directory: /usr/local/etc/php/php.truenas.ini


restarted the Jail and the NextCloud plugin, the PHP section seems to have been updated with the new info:

however, when I tested on my ipad by shooting a video that’s more than 600M and let the NextCloud App auto upload, the 413 error code “The file is too large” still comes up and the video will not upload.

I think the “php.truenas.ini” just contains info for display only and doesn’t actually change the actual limit. unfortunately, I need to dig further. any help would be much appreciated!

I just ran into this issue and fixed it with the following:

vi /usr/local/etc/nginx/conf.d/nextcloud.conf

client_max_body_size 512M ====> client_max_body_size 20000M

service nginx restart

I had been looking for the solution and found this post, thought I’d share. Hope it helps.


1 Like

For this some users may have the client_max_body_size specified inside of:


mine was added into the .inc file and I needed to change the value there for this to work