Skip to main content

๐Ÿค– Auto scan all folders

Auto scan all foldersโ€‹

You can start a scan with the following command:

sudo docker exec --user root backend python3 manage.py scan

backend is the default container name set by container_name: in docker-compose.yml; substitute your own if you changed it (see Changing the container names).

The plain scan command is incremental โ€” it only picks up files that are new or that were modified since the last finished scan. Use scan -f to force a full re-process of every file, or scan -s /path/a.jpg /path/b.jpg to scan specific files. See Management Commands for the full list.

Nextcloud users

manage.py scan only scans the local scan directory. To scan a connected Nextcloud library from the command line, run manage.py scan -n โ€” cron it separately.

You can just create a cron job to regularly call this command

# Every day at 3 AM
0 3 * * * sudo docker exec --user root backend python3 manage.py scan >/dev/null 2>&1