Post Install Tweak

Increase file upload limit and PHP memory limit for Nextcloud.

This setting is done in the php.ini file located at /etc/php/8.2/fpm/

upload_max_filesize = 1G
memory_limit = 512M

Do not forget to restart php8.2-fpm and nginx after saving the configuration

Fix for the issue: PHP does not seem to be setup properly to query system environment variables.

We need to configure the file www.conf at /etc/php/8.2/fpm/pool.d by uncommenting the following lines.

;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
env[HOSTNAME] = $HOSTNAME
env[PATH] = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

Do not forget to restart php8.2-fpm and nginx after saving the configuration

Setup cronjob

A system like Nextcloud sometimes requires tasks to be done on a regular basis without the need for user interaction or hindering Nextcloud performance. For that purpose, as a system administrator, you can define background jobs (for example, database clean-ups) which are executed without any need for user interaction.

sudo crontab -u www-data -e  //creates new crontab if none exist
sudo -u www-data crontab -l  // shows the crontab content if it exists

For setting an interval of 15 min between each cron job, add the following line to crontab.

*/15  *  *  *  * php -f /var/www/nextcloud/cron.php

Last updated