Skip to main content

5. Increasing File Upload Limit

By default nextcloud places a limit on the maximum file size for uploading, and also places a limit RAM usage. If you think you have enough computing resources, then you can follow the steps below, increase the limit and the RAM usage for nextcloud.

Steps:

Initially, you need to stop the nextcloud docker container by entering docker stop nextcloud

First navigate to your nextcloud data directory

Enter ls -a

Look for a file called .htaccess 

Enter nano .htaccess

It should look like this:

nextcloud-htaccess.png

Move your cursor to the first line, and press enter a few times, to leave some space. Then copy and paste the following editting the values to what you want:

php_value upload_max_filesize 16G
php_value post_max_size 16G
php_value max_input_time 3600
php_value max_execution_time 3600
php_value memory_limit 3072M 
# Memory limit is in MB. Change the top two values as well to what you want. Make sure to remove this comment

After that, your file should look something like this:

nextcloud-htaccess-editted.png

Once you're done, press Ctrl + X, y and Enter

To start nextcloud, enter docker start nextcloud

And with that, your nextcloud setup is OFFICIALLY done!!! Enjoy using your google drive/ onedrive alternative that you selfhost and have complete control over!

You're nextcloud instance is now completely setup