Situation
I broke one of the golden rules: never touch a running system.
I ran into some minor errors and tried to fix them – which caused the system to crash.
Now I’m restoring from a backup – and here I’m facing a problem I don’t understand.
The Basics
- Nextcloud Server version:
- 31.0.4
- Operating system and version (e.g., Ubuntu 24.04):
- Ubuntu 24.04 (LXC in Proxmox)
- Web server and version (e.g., Apache 2.4.25):
- nginx 1.27.2
- Reverse proxy and version (e.g., nginx 1.27.2):
- nginx 1.27.2
- PHP version (e.g., 8.3):
- 8.3
- Is this the first time you’ve seen this error?
- Yes
- When did the problem first occur?
- After restoring a Proxmox LXC backup
- Installation method (e.g., AIO, NCP, Bare Metal, Archive, etc.):
- Followed the guide by c-rieger. The LXC worked fine until I broke it and restored it.
- Are you using Cloudflare, mod_security, or similar tools?
- No
Summary of the issue you’re facing:
After restoring the LXC container, I get an error when logging in via the web interface only.
The login page itself works, but after submitting credentials, I get:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator. If this error appears repeatedly, please include the technical details below in your report.
More details can be found in the server log.
However, the mobile and desktop apps work without any issues.
Steps to replicate (details matter!):
- Web login fails — even after clearing cookies.
Log entries
Nextcloud
{"reqId":"m7lEYiVr1qhv6bQgxfWC","level":3,"time":"2025-07-24T13:22:59+02:00","remoteAddr":"91.65.97.175","user":"Zarri","app":"PHP","method":"GET","url":"/apps/files/","message":"file_get_contents(/media/Datengrab/nc_data/appdata_ocs74x9phe1n/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#294","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0","version":"31.0.4.1","data":{"app":"PHP"}}
{"reqId":"m7lEYiVr1qhv6bQgxfWC","level":3,"time":"2025-07-24T13:22:59+02:00","remoteAddr":"91.65.97.175","user":"Zarri","app":"index","method":"GET","url":"/apps/files/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0","version":"31.0.4.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":55,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":97,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":72,"function":"isCached","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":112,"function":"process","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":71,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/ResourceLocator.php","line":51,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":397,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":212,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":120,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":189,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":159,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1025,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":35,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}
{"reqId":"m7lEYiVr1qhv6bQgxfWC","level":3,"time":"2025-07-24T13:22:59+02:00","remoteAddr":"91.65.97.175","user":"Zarri","app":"PHP","method":"GET","url":"/apps/files/","message":"file_get_contents(/media/Datengrab/nc_data/appdata_ocs74x9phe1n/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#294","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0","version":"31.0.4.1","data":{"app":"PHP"}}
{"reqId":"m7lEYiVr1qhv6bQgxfWC","level":3,"time":"2025-07-24T13:22:59+02:00","remoteAddr":"91.65.97.175","user":"Zarri","app":"core","method":"GET","url":"/apps/files/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0","version":"31.0.4.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":55,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":97,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":72,"function":"isCached","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":112,"function":"process","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":71,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/ResourceLocator.php","line":51,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":397,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":212,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":120,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":189,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":159,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1025,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":35,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}
{"reqId":"m7lEYiVr1qhv6bQgxfWC","level":3,"time":"2025-07-24T13:22:59+02:00","remoteAddr":"91.65.97.175","user":"Zarri","app":"core","method":"GET","url":"/apps/files/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0","version":"31.0.4.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":55,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":97,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":72,"function":"isCached","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":112,"function":"process","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":71,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/ResourceLocator.php","line":51,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":397,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":212,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":120,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":113,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":297,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/index.php","line":89,"function":"printExceptionErrorPage","class":"OC_Template","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":35,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}
I see the failure to open the stream. I checked the file path – the file does not exist.
I also verified permissions (read/write etc.) – everything looks fine.
And I’m able to create files and folders using the desktop or mobile app.
Configuration
Nextcloud
config.php. (yeah my url is stil in, but thats fine)
<?php
$CONFIG = array (
'passwordsalt' => 'nope',
'secret' => 'nope,
'trusted_domains' =>
array (
0 => 'nextcloud-v2',
1 => 'zarri.sytes.net',
2 => '192.168.178.29',
3 => 'zarri.ipv64.net',
),
'trusted_proxies' =>
array (
0 => '192.168.178.24',
),
'datadirectory' => '/media/Datengrab/nc_data',
'dbtype' => 'mysql',
'version' => '31.0.4.1',
'overwrite.cli.url' => 'https://zarri.sytes.net',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'nope',
'installed' => true,
'instanceid' => 'nope',
'activity_expire_days' => 14,
'allow_local_remote_servers' => true,
'auth.bruteforce.protection.enabled' => true,
'blacklisted_files' =>
array (
0 => '.htaccess',
1 => 'Thumbs.db',
2 => 'thumbs.db',
),
'cron_log' => true,
'default_phone_region' => 'DE',
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\PNG',
1 => 'OC\\Preview\\JPEG',
2 => 'OC\\Preview\\GIF',
3 => 'OC\\Preview\\BMP',
4 => 'OC\\Preview\\XBitmap',
5 => 'OC\\Preview\\Movie',
6 => 'OC\\Preview\\PDF',
7 => 'OC\\Preview\\MP3',
8 => 'OC\\Preview\\TXT',
9 => 'OC\\Preview\\MarkDown',
10 => 'OC\\Preview\\HEIC',
11 => 'OC\\Preview\\Movie',
12 => 'OC\\Preview\\MKV',
13 => 'OC\\Preview\\MP4',
14 => 'OC\\Preview\\AVI',
),
'filesystem_check_changes' => 0,
'filelocking.enabled' => 'true',
'htaccess.RewriteBase' => '/',
'integrity.check.disabled' => false,
'knowledgebaseenabled' => false,
'log_rotate_size' => '104857600',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'loglevel' => 2,
'logtimezone' => 'Europe/Berlin',
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'overwriteprotocol' => 'https',
'preview_max_x' => 1024,
'preview_max_y' => 768,
'preview_max_scale_factor' => 1,
'profile.enabled' => false,
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'password' => 'nope',
'timeout' => 0.5,
'dbindex' => 1,
),
'quota_include_external_storage' => false,
'share_folder' => '/Freigaben',
'skeletondirectory' => '',
'trashbin_retention_obligation' => 'auto, 7',
'maintenance_window_start' => 1,
'memories.db.triggers.fcu' => true,
'memories.exiftool' => '/var/www/nextcloud/apps/memories/bin-ext/exiftool-amd64-glibc',
'memories.vod.path' => '/var/www/nextcloud/apps/memories/bin-ext/go-vod-amd64',
'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
'memories.vod.ffprobe' => '/usr/bin/ffprobe',
'maintenance' => false,
'theme' => '',
'app_install_overwrite' =>
array (
),
);
Conclusion
Am I just too stupid to see the problem?