Recover Netxcloud config after broken docker image on Unraid

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Unknown → Nextcloud AIO v10.14.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Unraid 7.0.1
  • Web server and version (e.g, Apache 2.4.25):
    • Unknown
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • NPMPlus 2.12.3+0a85402
  • PHP version (e.g, 8.3):
    • Unknown
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After to removal of the docker image (docker.img), since it was corrupted.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Some of my docker containers were not booting anymore. After a quick diagnosis, I figured out it was the docker image.
To “stop the bleeding”, I decided to delete my docker image, and begin a new one. This means I had to reinstall all the docker containers, and create new docker networks for them, since it was also destroyed. It worked perfectly for the other container, but not for Nextcloud AIO.
When I reinstalled it, the AIO page gave me a new passphrase, and started the containers. All, except 3: Apache, Notify Push, and Nextcloud.
The 2 first were waiting for the Nextcloud container. I don’t why, but it refuses to boot the Nextcloud container

Steps to replicate it (hint: details matter!):

  1. Boot on Unraid 7.0.1
  2. Configure drives and shares
  3. Install the Community Applications Plugin
  4. Install the nextcloud-aio-mastercontainer application from SpaceInvaderOne (you can follow the guide from SpaceInvaderOne’s YouTube channel)
  5. Complete the installation
  6. Stop the container
  7. Delete the /mnt/user/system/docker/docker.img file
  8. Install the nextcloud-aio-mastercontainer application from SpaceInvaderOne
  9. Try to complete the installation

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.

2025-05-16T08:44:39.194641730Z Connection to nextcloud-aio-database (172.23.0.4) 5432 port [tcp/postgresql] succeeded!
2025-05-16T08:44:39.196831300Z + '[' -f /dev-dri-group-was-added ']'
2025-05-16T08:44:39.197854772Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-05-16T08:44:39.202505330Z + '[' -n '' ']'
2025-05-16T08:44:39.202570384Z + set +x
2025-05-16T08:44:39.327884708Z Enabling Imagick...
2025-05-16T08:44:46.381074650Z WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.21/main: No such file or directory
2025-05-16T08:44:46.381146310Z WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.21/community: No such file or directory
2025-05-16T08:44:46.485150408Z Connection to nextcloud-aio-redis (172.23.0.5) 6379 port [tcp/redis] succeeded!
2025-05-16T08:44:46.874224191Z Initializing nextcloud 30.0.10.1 ...
2025-05-16T08:44:58.553561228Z Initializing finished
2025-05-16T08:44:58.553686504Z New Nextcloud instance.
2025-05-16T08:44:58.646163471Z Installing with pgsql database
2025-05-16T08:44:58.646225086Z Starting Nextcloud installation...
2025-05-16T08:45:13.870227831Z Login is invalid because files already exist for this user
2025-05-16T08:45:13.890575866Z Installation of Nextcloud failed!
2025-05-16T08:45:16.008690150Z Connection to nextcloud-aio-database (172.23.0.4) 5432 port [tcp/postgresql] succeeded!
2025-05-16T08:45:18.064552020Z               now              
2025-05-16T08:45:18.064613801Z -------------------------------
2025-05-16T08:45:18.064623427Z  2025-05-16 10:45:18.063572+02
2025-05-16T08:45:18.064630015Z (1 row)
2025-05-16T08:45:18.064636588Z 
2025-05-16T08:45:18.134894179Z + '[' -f /dev-dri-group-was-added ']'
2025-05-16T08:45:18.135797715Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-05-16T08:45:18.137813452Z + '[' -n '' ']'
2025-05-16T08:45:18.137885928Z + set +x
2025-05-16T08:45:18.193061925Z Connection to nextcloud-aio-redis (172.23.0.5) 6379 port [tcp/redis] succeeded!
2025-05-16T08:45:18.872875977Z The initial Nextcloud installation failed.
2025-05-16T08:45:18.872943346Z Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
2025-05-16T08:45:18.872962842Z See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance
2025-05-16T08:45:20.750581354Z Connection to nextcloud-aio-database (172.23.0.4) 5432 port [tcp/postgresql] succeeded!
2025-05-16T08:45:22.814774662Z               now              
2025-05-16T08:45:22.814845840Z -------------------------------
2025-05-16T08:45:22.814860857Z  2025-05-16 10:45:22.810036+02
2025-05-16T08:45:22.814870654Z (1 row)
2025-05-16T08:45:22.814879757Z 
2025-05-16T08:45:22.835164711Z + '[' -f /dev-dri-group-was-added ']'
2025-05-16T08:45:22.836018819Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-05-16T08:45:22.837800082Z + '[' -n '' ']'
2025-05-16T08:45:22.837871759Z + set +x
2025-05-16T08:45:22.889090850Z Connection to nextcloud-aio-redis (172.23.0.5) 6379 port [tcp/redis] succeeded!
2025-05-16T08:45:23.704579991Z The initial Nextcloud installation failed.
2025-05-16T08:45:23.704660571Z Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
2025-05-16T08:45:23.704771376Z See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance
2025-05-16T08:45:26.094860771Z Connection to nextcloud-aio-database (172.23.0.4) 5432 port [tcp/postgresql] succeeded!

(It keeps looping like this)

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!):

<?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,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' => 
  array (
    0 => '192.168.5.254:8666',
    1 => 'redacted',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.2.2',
  'overwrite.cli.url' => 'http://192.168.5.254:8666',
  'dbname' => 'db_nextcloud',
  'dbhost' => '192.168.5.254:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'files_markdown',
  ),
  'forbidden_filename_basenames' => 
  array (
    0 => 'con',
    1 => 'prn',
    2 => 'aux',
    3 => 'nul',
    4 => 'com0',
    5 => 'com1',
    6 => 'com2',
    7 => 'com3',
    8 => 'com4',
    9 => 'com5',
    10 => 'com6',
    11 => 'com7',
    12 => 'com8',
    13 => 'com9',
    14 => 'com¹',
    15 => 'com²',
    16 => 'com³',
    17 => 'lpt0',
    18 => 'lpt1',
    19 => 'lpt2',
    20 => 'lpt3',
    21 => 'lpt4',
    22 => 'lpt5',
    23 => 'lpt6',
    24 => 'lpt7',
    25 => 'lpt8',
    26 => 'lpt9',
    27 => 'lpt¹',
    28 => 'lpt²',
    29 => 'lpt³',
  ),
  'forbidden_filename_characters' => 
  array (
    0 => '<',
    1 => '>',
    2 => ':',
    3 => '"',
    4 => '|',
    5 => '?',
    6 => '*',
    7 => '\\',
    8 => '/',
  ),
  'forbidden_filename_extensions' => 
  array (
    0 => ' ',
    1 => '.',
    2 => '.filepart',
    3 => '.part',
  ),
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'loglevel' => 2,
  'maintenance' => false,
);

Apps

The output of occ app:list (if possible).

[Unavailble]

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Thanks for the help !!!

This is a very bad idea as the docker.img holds persistent data like the docker volumes. So this explains why in that case AIO wants to be reinstalled. You should have created a backup via the AIO interface first to export all persistent data. See https://youtu.be/U47nvwXrAOo?t=1236

Afterwards you would have had the option to re-import all data on a new AIO instance via the AIO interface. See GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Hey ! Thanks for the reply. Do you know if there is any way to recover the data of my users ?
Thank you very much !

You could try to recover the files only as the database is gone: all-in-one/migration.md at main · nextcloud/all-in-one · GitHub