Internal Server Error and wrong/old config after apt-get update/upgrade and reboot

Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4 LTS
Apache or nginx version (eg, Apache 2.4.25): 2.4.54
PHP version (eg, 7.4): 8.0.21

The issue you are facing:
I have my nextcloud and the mariadb installed within a docker environment.
I put nextcloud in maintenance mode and did and update/upgrade of my server.
After a reboot I’m getting an Internal Server Error.

When looking at config.php I see the dbhost and dbport are wrong.
What is the correct way to modify this file?
When I try to modify it in the container directly nextcloud gives me the following

Cannot write into "config" directory!
    This can usually be fixed by giving the web server write access to the config directory. But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See https://docs.nextcloud.com/server/24/go.php?to=admin-config

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Logged into server
  2. docker exec -u www-data nextcloud php occ maintenance:mode --on
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. sudo reboot
  6. After rebooting and I got the error below when trying to access nextcloud.
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

The output of your Nextcloud log in Admin > Logging:

I couldn't figure out how to grab this. Is this on the site itself?

The output of your config.php file in /var/www/html/config/config.php :
The dbhost should actually be 172.17.0.4. And db port should be 3306
How to modify?

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'passwordsalt' => 'MqiLX/UBROe52tJuDPkh44LusJHZXi',
  'secret' => '/FMdAwx5eG4NxfUlxh4mSfMSq1MOTQyaNr1j6nsXLtN5ZuH6',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    2 => '172.16.0.22',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => '172.17.0.3:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin2',
  'dbpassword' => '4pzDytI9wGvP03p843u4OtY60uNlH0',
  'installed' => true,
  'instanceid' => 'oczx1j5kp3lc',
  'maintenance' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'smtp.xxxxxx.xxxxx',
  'mail_smtpport' => '465',
  'mail_from_address' => 'xxxxxxxxxxxx',
  'mail_domain' => 'gmail.com',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxxxxxxxxxx@xxxxxxxxx.com',
  'mail_smtppassword' => 'xxunipnihqvizmyf',
  'default_phone_region' => 'US',
  'updater.secret' => '$2y$10$rgHtN4Zfjw3VtJvwt/FFCesGMXPKNVgN3SCdmBGaogDdfxq/1ueBS',
);

The output of your Apache/nginx/system log in /var/log/apache2/error.log:
It was empty…

Output errors in nextcloud.log in /var/www/html/data/nextcloud.log or as admin user in top right menu, filtering for errors.
Log is quite large so… I’m only pasting objects with Exception Error

{"reqId":"213ia9ZufHi2BWYl6QT8","level":3,"time":"2022-04-22T05:17:49+00:00","remoteAddr":"172.16.0.2","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":98,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",98]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":106,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":91,"function":"checkCoreUpdate","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":172,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"213ia9ZufHi2BWYl6QT8","level":3,"time":"2022-04-22T05:17:49+00:00","remoteAddr":"172.16.0.2","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":100,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",100]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":106,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":91,"function":"checkCoreUpdate","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":172,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"qZR2gwXth5cGi863rZdU","level":3,"time":"2022-04-22T22:28:03+00:00","remoteAddr":"172.16.0.2","user":"admin","app":"PHP","method":"GET","url":"/settings/admin/overview","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":98,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",98]},{"file":"/var/www/html/apps/updatenotification/lib/UpdateChecker.php","line":52,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Settings/Admin.php","line":90,"function":"getUpdateState","class":"OCA\\UpdateNotification\\UpdateChecker","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\UpdateNotification\\Settings\\Admin","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[{"10":[{"__class__":"OCA\\Settings\\Settings\\Admin\\Overview"}],"11":[{"__class__":"OCA\\UpdateNotification\\Settings\\Admin"}]}]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"section":"overview","_route":"settings.AdminSettings.index"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/overview"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"qZR2gwXth5cGi863rZdU","level":3,"time":"2022-04-22T22:28:03+00:00","remoteAddr":"172.16.0.2","user":"admin","app":"PHP","method":"GET","url":"/settings/admin/overview","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":100,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",100]},{"file":"/var/www/html/apps/updatenotification/lib/UpdateChecker.php","line":52,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Settings/Admin.php","line":90,"function":"getUpdateState","class":"OCA\\UpdateNotification\\UpdateChecker","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\UpdateNotification\\Settings\\Admin","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[{"10":[{"__class__":"OCA\\Settings\\Settings\\Admin\\Overview"}],"11":[{"__class__":"OCA\\UpdateNotification\\Settings\\Admin"}]}]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"section":"overview","_route":"settings.AdminSettings.index"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/overview"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"GtIxTUenTrcvn4yZgttL","level":3,"time":"2022-06-01T23:46:00+00:00","remoteAddr":"172.16.0.23","user":"admin","app":"index","method":"GET","url":"/index.php/core/preview.png?file=Photos/2022/05/22-05-30%2012-13-50%205250.jpg&x=1024&y=1024&a=1&mode=cover","message":"Call to a member function stat() on null in file '/var/www/html/lib/private/Files/SimpleFS/NewSimpleFile.php' line 153","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/4.3.1","version":"23.0.3.2","exception":{"Exception":"Exception","Message":"Call to a member function stat() on null in file '/var/www/html/lib/private/Files/SimpleFS/NewSimpleFile.php' line 153","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreview"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\PreviewController","getPreview",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.Preview.getPreview"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/core/preview.png"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":158,"Previous":{"Exception":"Error","Message":"Call to a member function stat() on null","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/SimpleFS/NewSimpleFile.php","line":136,"function":"checkFile","class":"OC\\Files\\SimpleFS\\NewSimpleFile","type":"->","args":[]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":262,"function":"putContent","class":"OC\\Files\\SimpleFS\\NewSimpleFile","type":"->","args":[null]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":140,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"},{"__class__":"OC\\Files\\SimpleFS\\NewSimpleFile"},"image/jpeg",""]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":109,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},[{"width":1024,"height":1024,"crop":false,"mode":"cover"}],"image/jpeg"]},{"file":"/var/www/html/lib/private/PreviewManager.php","line":212,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},1024,1024,false,"cover",null]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":169,"function":"getPreview","class":"OC\\PreviewManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},1024,1024,false,"cover"]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":106,"function":"fetchPreview","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},1024,1024,true,true,"cover"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"getPreview","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":["Photos/2022/05/22-05-30 12-13-50 5250.jpg",1024,1024,true,true,"cover"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreview"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreview"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\PreviewController","getPreview",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.Preview.getPreview"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/core/preview.png"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Files/SimpleFS/NewSimpleFile.php","Line":153},"CustomMessage":"--"}}
{"reqId":"WdnXTDFWgHpKGBDa8ZlM","level":3,"time":"2022-06-17T01:31:56+00:00","remoteAddr":"172.16.0.2","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":98,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",98]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":106,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":91,"function":"checkCoreUpdate","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":172,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"WdnXTDFWgHpKGBDa8ZlM","level":3,"time":"2022-06-17T01:31:56+00:00","remoteAddr":"172.16.0.2","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":100,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",100]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":106,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":91,"function":"checkCoreUpdate","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":172,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"Sh30mkWnUbiHxSF6lQ5T","level":3,"time":"2022-07-28T03:58:23+00:00","remoteAddr":"172.16.0.2","user":"admin","app":"PHP","method":"GET","url":"/settings/admin/overview","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":98,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",98]},{"file":"/var/www/html/apps/updatenotification/lib/UpdateChecker.php","line":52,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Settings/Admin.php","line":90,"function":"getUpdateState","class":"OCA\\UpdateNotification\\UpdateChecker","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\UpdateNotification\\Settings\\Admin","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[{"10":[{"__class__":"OCA\\Settings\\Settings\\Admin\\Overview"}],"11":[{"__class__":"OCA\\UpdateNotification\\Settings\\Admin"}]}]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"section":"overview","_route":"settings.AdminSettings.index"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/overview"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"Sh30mkWnUbiHxSF6lQ5T","level":3,"time":"2022-07-28T03:58:23+00:00","remoteAddr":"172.16.0.2","user":"admin","app":"PHP","method":"GET","url":"/settings/admin/overview","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":100,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",100]},{"file":"/var/www/html/apps/updatenotification/lib/UpdateChecker.php","line":52,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Settings/Admin.php","line":90,"function":"getUpdateState","class":"OCA\\UpdateNotification\\UpdateChecker","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\UpdateNotification\\Settings\\Admin","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[{"10":[{"__class__":"OCA\\Settings\\Settings\\Admin\\Overview"}],"11":[{"__class__":"OCA\\UpdateNotification\\Settings\\Admin"}]}]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["overview"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"section":"overview","_route":"settings.AdminSettings.index"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/overview"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"IWMLH7MgNg7R3yatrYte","level":3,"time":"2022-07-30T18:27:36+00:00","remoteAddr":"172.16.0.2","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#98","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":98,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",98]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":106,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":91,"function":"checkCoreUpdate","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":172,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"IWMLH7MgNg7R3yatrYte","level":3,"time":"2022-07-30T18:27:36+00:00","remoteAddr":"172.16.0.2","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0","version":"23.0.3.2","exception":{"Exception":"Error","Message":"Function libxml_disable_entity_loader() is deprecated at /var/www/html/lib/private/Updater/VersionCheck.php#100","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater/VersionCheck.php","line":100,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8192,"Function libxml_disable_entity_loader() is deprecated","/var/www/html/lib/private/Updater/VersionCheck.php",100]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":106,"function":"check","class":"OC\\Updater\\VersionCheck","type":"->","args":[]},{"file":"/var/www/html/apps/updatenotification/lib/Notification/BackgroundJob.php","line":91,"function":"checkCoreUpdate","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\UpdateNotification\\Notification\\BackgroundJob","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":172,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

You should configure you Nextclud running as Docker container using Env variables and persist config and storage using persistent volumes… the issue you hit could result from recreating container from scratch because of docker run (docker-compose up etc…)

see

The Nextcloud installation and all data beyond what lives in the database (file uploads, etc.) are stored in the unnamed docker volume volume /var/www/html. The docker daemon will store that data within the docker directory /var/lib/docker/volumes/.... That means your data is saved even if the container crashes, is stopped or deleted.
A named Docker volume or a mounted host directory should be used for upgrades and backups. To achieve this, you need one volume for your database container and one for Nextcloud.

Nextcloud:

  • /var/www/html/ folder where all Nextcloud data lives

$ docker run -d -v nextcloud:/var/www/html nextcloud

Database:

  • /var/lib/mysql MySQL / MariaDB Data
  • /var/lib/postgresql/data PostgreSQL Data

Hi thanks for tips.

I do manage nextcloud using portainer and have everything set up as environment variables.
And my environment variables appear to be correct but the config.php does not.
I also have a separate dockers for my mariadb instance and another for nextcloud.

I also have set up a persistent volume for access to my data outside of nextcloud.

I have no experience with Portainer - but I assume the issue is not specific to Portainer. If you have setup environment variables right expected behavior would be container picks up this data and apply them to config files

autoconfig.php line 16-22

please verify your container using docker inspect and interactive session and verify your volumes are mapped right…

Thank you for leading me in the right direction.
I was able to correct my issue by fixing permissions and the config.

I had to read the error again when it said Cannot write into "config" directory!

This was because the permissions were getting changed from under me and I forgot to log in with -u www-data… otherwise it defaults to root.

Thanks