The Basics
- Nextcloud Server version (e.g., 29.x.x):
34.0.2
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu server 26.04
- Web server and version (e.g, Apache 2.4.25):
- nginx/1.28.3 (Ubuntu)
- Reverse proxy and version _(e.g. nginx 1.27.2)
- nginx/1.28.3
- PHP version (e.g, 8.3):
- 8.5.4
- Is this the first time you’ve seen this error? (Yes / No):
Yes
- When did this problem seem to first start?
Just now
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Bare metal
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
Yes
Summary of the issue you are facing:
After deleting the preview folders within appdata, running occ files:scann-app-data, and then running occ preview:generate-all, the directory does not populate at all despite encountering no errors with the -vvv flag.
Steps to replicate it (hint: details matter!):
-
Delete previews folders in appdata_/preview while nginx isn’t running.
-
Run ‘sudo -u www-data php /var/www/cloud/occ files:scan-app-data’
-
Start nginx
-
Run ‘sudo -u www-data php /var/www/cloud/occ preview:generate-all -vvv’
Log entries
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.
{"reqId":"wWpF6MfAiwNEWWI8W853","level":3,"time":"2026-08-01T09:46:35+00:00","remoteAddr":"162.158.19.63","user":"mgomez","app":"index","method":"GET","url":"/core/preview?fileId=22032&x=128&y=128&mimeFallback=true&v=398c23&a=0","scriptName":"/index.php","message":"Unable to open preview stream at /mnt/smbshare/DATA/appdata_ockcgxrdv2hs/preview/7/f/6/4/1/1/f/22032/256-256-crop.jpg","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"34.0.2.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"Unable to open preview stream at /mnt/smbshare/DATA/appdata_ockcgxrdv2hs/preview/7/f/6/4/1/1/f/22032/256-256-crop.jpg","Code":0,"Trace":[{"file":"/var/www/cloud/lib/private/Preview/Storage/StorageFactory.php","line":33,"function":"readPreview","class":"OC\\Preview\\Storage\\LocalPreviewStorage","type":"->"},{"file":"/var/www/cloud/lib/private/Preview/Storage/PreviewFile.php","line":74,"function":"readPreview","class":"OC\\Preview\\Storage\\StorageFactory","type":"->"},{"file":"/var/www/cloud/lib/public/AppFramework/Http/FileDisplayResponse.php","line":53,"function":"read","class":"OC\\Preview\\Storage\\PreviewFile","type":"->"},{"file":"/var/www/cloud/lib/private/AppFramework/App.php","line":194,"function":"callback","class":"OCP\\AppFramework\\Http\\FileDisplayResponse","type":"->"},{"file":"/var/www/cloud/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/cloud/lib/base.php","line":1172,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/cloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/cloud/lib/private/Preview/Storage/LocalPreviewStorage.php","Line":60,"message":"Unable to open preview stream at /mnt/smbshare/DATA/appdata_ockcgxrdv2hs/preview/7/f/6/4/1/1/f/22032/256-256-crop.jpg","exception":"{\"class\":\"OCP\\Files\\NotFoundException\",\"message\":\"Unable to open preview stream at /mnt/smbshare/DATA/appdata_ockcgxrdv2hs/preview/7/f/6/4/1/1/f/22032/256-256-crop.jpg\",\"code\":0,\"file\":\"/var/www/cloud/lib/private/Preview/Storage/LocalPreviewStorage.php:60\",\"trace\":\"#0 /var/www/cloud/lib/private/Preview/Storage/StorageFactory.php(33): OC\\Preview\\Storage\\LocalPreviewStorage->readPreview()\\n#1 /var/www/cloud/lib/private/Preview/Storage/PreviewFile.php(74): OC\\Preview\\Storage\\StorageFactory->readPreview()\\n#2 /var/www/cloud/lib/public/AppFramework/Http/FileDisplayResponse.php(53): OC\\Preview\\Storage\\PreviewFile->read()\\n#3 /var/www/cloud/lib/private/AppFramework/App.php(194): OCP\\AppFramework\\Http\\FileDisplayResponse->callback()\\n#4 /var/www/cloud/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main()\\n#5 /var/www/cloud/lib/base.php(1172): OC\\Route\\Router->match()\\n#6 /var/www/cloud/index.php(25): OC::handleRequest()\\n#7 {main}\"}","CustomMessage":"Unable to open preview stream at /mnt/smbshare/DATA/appdata_ockcgxrdv2hs/preview/7/f/6/4/1/1/f/22032/256-256-crop.jpg"},"id":"6a6dc6a72afa9"}
Configuration
Nextcloud
The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"cloud.gomezconsulting.ovh"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "34.0.2.1",
"overwrite.cli.url": "https:\/\/cloud.gomezconsulting.ovh",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"enable_previews": true,
"installed": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"maintenance": false,
"app_install_overwrite": [],
"loglevel": 2,
"memories.db.triggers.fcu": true,
"memories.exiftool": "\/var\/www\/cloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
"memories.vod.path": "\/var\/www\/cloud\/apps\/memories\/bin-ext\/go-vod-amd64",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe"
}
}
Apps
Enabled:
- activity: 7.0.0
- app_api: 34.0.0
- appstore: 1.0.0
- bruteforcesettings: 7.0.0
- circles: 34.0.0
- cloud_federation_api: 1.18.0
- comments: 1.24.0
- contactsinteraction: 1.15.0
- cookbook: 0.11.9
- dashboard: 7.14.0
- dav: 1.39.0
- federatedfilesharing: 1.24.0
- federation: 1.24.0
- files: 2.6.0
- files_downloadlimit: 5.2.0
- files_external: 1.26.0
- files_lock: 34.0.1
- files_reminders: 1.7.0
- files_sharing: 1.26.0
- files_trashbin: 1.24.0
- files_versions: 1.27.0
- firstrunwizard: 7.0.0-dev.0
- logreader: 7.0.0
- lookup_server_connector: 1.22.0
- news: 28.6.0
- nextcloud_announcements: 6.0.0
- notifications: 7.0.0-dev.1
- oauth2: 1.22.0
- office: 1.0.0
- password_policy: 6.0.0-dev.0
- photos: 7.0.0
- previewgenerator: 5.14.0
- privacy: 6.0.0-dev.1
- profile: 1.3.0
- provisioning_api: 1.24.0
- recommendations: 7.0.0
- related_resources: 5.0.0-dev.0
- richdocuments: 11.1.0
- serverinfo: 6.0.0
- settings: 1.17.0
- sharebymail: 1.24.0
- support: 6.0.0
- survey_client: 6.0.0-dev.0
- systemtags: 1.24.0
- tasks: 0.18.1
- text: 8.0.0
- theming: 2.9.0
- twofactor_backupcodes: 1.23.0
- twofactor_totp: 16.0.0
- updatenotification: 1.24.0
- user_status: 1.14.0
- viewer: 7.0.0-dev.0
- weather_status: 1.14.0
- webhook_listeners: 1.6.0
- workflowengine: 2.16.0
Disabled: - admin_audit: 1.24.0
- encryption: 2.22.0
- files_pdfviewer: 7.0.0-dev.0 (installed 7.0.0-dev.0)
- suspicious_login: 12.0.0-dev.0
- twofactor_nextcloud_notification: 8.0.0
- user_ldap: 1.25.0