Appearance
Nextcloud
Importing files
To import a large amount of files, you can upload the files directly to the user's directory, then use OCC to manually scan for content.
Place the files in the user's directory.
Run
sudo chown -R www-data:www-data user-directoryto fix permissions.Run
sudo -u www-data php occ files:scan --allto scan for content.
Troubleshooting
Checking if redis is actually working
In the Redis Docker container, run redis-cli MONITOR and check for output while using the Nextcloud website.
Workarounds
OCC scan function has PHP memory limit error
Open a bash session to the Docker container and use this command instead.
sudo -u www-data PHP_MEMORY_LIMIT=512M php occ files:scan --all
Scripting
Maintenance mode
You can toggle maintenance mode from the host using sed.
Toggle maintenance mode on
sudo sed -i "s/'maintenance' => false/'maintenance' => true/g" /bw-storage/data/nextcloud/data/config/config.php
Toggle maintenance mode off
sudo sed -i "s/'maintenance' => false/'maintenance' => false/g" /bw-storage/data/nextcloud/data/config/config.php
Make sure the line
'maintenance' => false,is in theconfig.phpfile for this command to work.
Docker Compose
Configuration
Refer to server-resources repository for Docker Compose configuration.