Nextcloud max file size setting on TrueNAS SCALE

monkey23

Cadet
Joined
Jun 26, 2023
Messages
1
Hi everyone,

I'm currently running a homelab with TrueNAS SCALE 22.12.3.1 and NextCloud 27.0.0_1.6.31 app installed.

I did the following steps to increase the file size limit of NextCloud from 512M to 16G,

1. get access to the shell of NextCloud container,
Code:
docker exec --user root -it NEXTCLOUD-CONTAINER-ID /bin/sh


2. install nano editor,
Code:
apt update
apt install nano


3. go to php directory
Code:
cd /usr/local/etc/php

There are two ini files in the directory: php.ini-development and php.ini-production

4. I changed the following configurations of the php.ini-production file
Code:
nano php.ini-production


Code:
upload_max_filesize = 16G
post_max_size = 16G
max_input_time = 3600
max_execution_time = 3600


and then save.

But after I restart the NextCloud app in TrueNAS, I found that all changes to the container are not saved.

Since I'm not so familiar with k8s, I really appreciate your instructions on how to do this correctly.

Thanks in advance!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You shouldn't be making changes to the container... set your persistent storage options so that the config is on your NAS host instead of in the container, then changes will remain when the container is redeployed (which happens almost every time you stop or start it in kubernetes).
 

Lepelot

Dabbler
Joined
Dec 13, 2020
Messages
21
Hello,
Can you guys please explain how you locate and modify the php.ini file to increase the file size? I am using the nextcloud app on truenas scale.
Thank you
 

minotauras

Cadet
Joined
Dec 8, 2023
Messages
2
You need to create php.ini. here is what I did to overcome this file limitation:
Code:
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
nano /usr/local/etc/php.ini

modify these settings:
Code:
upload_max_filesize = 2G
post_max_size = 2G
 

Lepelot

Dabbler
Joined
Dec 13, 2020
Messages
21
OK, this sounds great, but I don't see this file when I log into the TrueNas shell. Is there another way to get to this file?
 

Attachments

  • Capture d'écran 2023-12-09 081445.png
    Capture d'écran 2023-12-09 081445.png
    5.7 KB · Views: 57

minotauras

Cadet
Joined
Dec 8, 2023
Messages
2
run these commands to find if you have php installed and where php.ini file(s) might be:
Code:
whereis php
find / -name php.ini* 2>/dev/null
 
Top