Skip to content

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.

  1. Place the files in the user's directory.

  2. Run sudo chown -R www-data:www-data user-directory to fix permissions.

  3. Run sudo -u www-data php occ files:scan --all to 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 the config.php file for this command to work.

Docker Compose ​

Configuration ​

Refer to server-resources repository for Docker Compose configuration.