Fix security and setup warnings

Update PHP configuration

#Switch the following directory to change the php memory limit 
cd /etc/php/7.4/apache2/

#Edit the php.ini file
sudo nano php.ini
#After that restart the service apache2 
sudo service apache2 restart 

No default phone region is set and no memory cache has been configured

#Switch to the following directory to enable caching and set your phone-region
cd /var/www/owncloud/config

#Edit the config.php file
sudo nano config.php

Hot to get rid of "transactional file locking should be configured..."

#Install redis-server
sudo apt install redis-server php7.4-redis

#Etit the config.php file
sudo nano /var/www/owncloud/config/config.php
#File: /var/www/owncloud/config/config.php

'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => \OC\Memcache\Redis',
'redis' => [
'host' => 'localhost',
'port' => 6379,
],
#After that restart the service apache2 
sudo service apache2 restart 

Set up cronjob for Nextcloud

#Set background job to cron
sudo -u www-data php occ background:cron

#For Owncloud to run smoothly, you will want to set up a cronjob
sudo crontab -u www-data -e

#If asked, press “1” to use the nano editor (which is super easy to use)
#Add the following line to your crontab file
*/15  *  *  *  * /usr/bin/php -f /var/www/owncloud/occ system:cron

#Show the entery in the crontab file
sudo crontab -u www-data -l

Last updated