How to increase upload file size

Nextcloud 18
Tell me please how can I increase upload size.
I’ve noticed that Nextcloud can upload only 1Mb file. Else it returned Unknown error.

My menu Settings - Advanced Settings contain only Backup option. I’ve changed parameteres in .htaccess and .user.ini in my docker container, but it hasn’t success.

Edit the php.ini (php config file) of your webserver (in /etc/php/7.0/apache2/php.ini (can use another php version or another php engine (fpm, cli)) and increase “post_max_size” and “upload_max_filesize”.
Check if “max_execution_time” and “max_input_time” are not so little.
Restart your webserver AND php-fpm if you use it.

1 Like

I’ve installed nginx. It has /etc/nginx/nginx.conf configuration file. There is no apache here.
And what if there is no “php” directory in /etc?
May be I shoud install something else?

Possible a response here : How to set NGINX max post size? and How to set PHP maximum upload size?

Do you have install php engine and it’s required packages ?

apt-get install php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring
apt-get install php7.2-intl php-imagick php7.2-xml php7.2-zip

source : Example installation on Ubuntu 18.04 LTS — Nextcloud latest Administration Manual latest documentation

Here a tuto from Nextcloud documentation about Nginx configuration : Nginx configuration — Nextcloud latest Administration Manual latest documentation

Thanks a lot for the advises. It helps.
I’ve installed php7. After editing php.ini I can upload big files.

But to be honest editing nginx.conf was enough:) Only one string
image

1 Like

After struggling a lot on all the know configurations in nextcloud server, I realize the hard limit was set on the reverse proxy server sitting before the nextcloud server… and this fixed the issue forever :slight_smile: Thanks monk.