Docker: Suggestion: Allow us to specify Upload Max Size in Docker-Compose

Created on 29 Sep 2019  路  7Comments  路  Source: nextcloud/docker

Is your feature request related to a problem? Please describe.
Yes, I cannot change the "Upload max size", which is set to 2MB by default. I am using a docker-compose.yml file to easily start up nextcloud but, for the life of me, dont know how to edit this one crucial setting that honestly needs to be added. Maybe as an ENV setting or something

Describe the solution you'd like
Just like how I can mount the /html file, I should have an "ENVIRONMENT" setting that allows me to specify the upload max size, just like how you can specify SMTP settings and such. No, doing commands in the docker container itself is bad because if you copy that same docker-compose file and run it, you would have to remember what command you need to type to change the upload max size.

Describe alternatives you've considered
No need, its simple as that

Additional context
Allow us to change timezone, userid, usergroup (inside the container) and more with this.

enhancement

Most helpful comment

All 7 comments

I don't disagree with more settings, but if this is an issue with not being able to upload files over 2MB are you sure nginx, traefik, haproxy, apache or whatever you may have as a proxy is not limiting you? 2MB shouldn't be the default max size in NC afaik.

Your proxy server needs to have an increased client_max_body_size/maxRequestBodyBytes/etc

https://github.com/nextcloud/server/pull/13990
https://github.com/nextcloud/server/pull/14430

Since Nextcloud 16 php settings are not overwritten via .htaccess or .user.ini. So the current max_upload_size for the docker image is 2MB. Probably something like below should be done for upload_max_filesize and post_max_size.

https://github.com/nextcloud/docker/blob/145652e70c8e61d0dd51ef95da7ef34bfd5b78ec/17.0/apache/Dockerfile#L97

cc @J0WI fyi

@Lartza I dont think this is a problem with Traefik because it is a hardcoded setting as shown here: https://i.imgur.com/lMc4vid.png - This has to do how PHP settings are set within the Docker container itself. Nowhere on Dockerhub do we see the ability to do that!

As for more settings suggestions, a guy called "Wonderfall" used to have a great Docker container he made himself but he stopped updating it, so theres a start for inspiration: https://github.com/Wonderfall/docker-nextcloud

Edit: @kesselb I was wondering, how long something like this can take? Since it is because hard enough to upload files and do you have a workaround for the time being?

You can always mount a custom php.ini to work around any issues with default values. See the discussion in #568, #765 and https://github.com/nextcloud/server/pull/13990#issuecomment-460944011.
It's hard to find a 'good' default for everybody (#865).

@kesselb

Since Nextcloud 16 php settings are not overwritten via .htaccess or .user.ini.

Documentation states otherwise. Should it be updated? https://docs.nextcloud.com/server/16/admin_manual/configuration_files/big_file_upload_configuration.html

image

Feel free to submit a pull request ;)

Was this page helpful?
0 / 5 - 0 ratings