Change max upload file size for snappy installation

Hi all,

I successfully installed nextcloud on an ubuntu server 16.04 by using snap and also setted up a dyndns and let’s encrypt.

Man that was easy!
Everything works great but I would like to upload files bigger then 10 GB. I found solutions for doing this with manual installation but none now for a snappy installed version.

Can you help me out?
Thanks and kind regards!


I don’t believe that’s possible with the snap version I’m afraid. You’ll be limited to the 2GB predefined.

Yes, unfortunately, it’s not possible to change Apache or PHP settings at this time.

I assume it is still not possible to change settings to allow to sync files larger than 2GB. Is this still the case or can Apache or PHP settings be edited now? Do you all know why this is not editable/changeable? Thanks

I realized that this is a php limit for 32 bit operating systems, mine being Ubuntu Snappy Core OS. Even though I have a Raspberry Pi 3, which is a 64 bit machine, the Raspberry Pi OS’s are still 32 bit systems. I have very few files over 2GB anyways. No big deal.

This limit has been worked around for Nextcloud 13

Sure…? :grinning:

Now I am installed Nextcloud 13.0.2 as a snap on Ubuntu server 18.04 and it is also have a limit 10G. As a soon, I can’t edit php.ini or something. And it have 512M in .htaccess. Is there any way to change max_upload_filesize?
I tried

snap set nextcloud php.upload-max-filesize=50G

but looks like it not work.

Hi seventh
The upload-max-filesize property is not “exposed” to the snap command.
Run snap get nextcloud php and you will see that only the php.memory-limit is accessible.

I found this in /snap/nextcloud/current/config/php/php-fpmd/www.conf
; Configure larger uploads than the default
php_admin_value[upload_tmp_dir] = ${SNAP_COMMON}/nextcloud/tmp
php_value[upload_max_filesize] = 16G
php_value[post_max_size] = 16G

Question: Can we modify /snap/nextcloud/current/config/php/php-fpmd/www.conf ?
Read somewhere that all these files in /snap/nextcloud are supposed to be readonly. But www.conf file permissions is 644 - writeable by www-data.
Haven’t tested of we can increase the upload_max_filesize and post_max_size from 16G to say 50G and if it will work.
But question remains will our customizations to the www.conf be erased when the file is replaced by the next Nextcloud snap upgrade?

Thank you very much

CM Gui