The initial Nextcloud installation failed. Nextcloid AIO startup loop after migration

Hello there !

I’m trying to migrate (files + DB) an existing Nextcloud instance to AIO.

I have checked out the following document: all-in-one/migration.md at main · nextcloud/all-in-one · GitHub

I can’t succeed in starting the Nextcloud container.

Nextcloud logs + Error:

2025-11-09T16:51:44.804938039Z Connection to nextcloud-aio-database (172.21.0.5) 5432 port [tcp/postgresql] succeeded!
2025-11-09T16:51:46.847678111Z               now              
2025-11-09T16:51:46.847698421Z -------------------------------
2025-11-09T16:51:46.847702460Z  2025-11-09 16:51:46.846939+00
2025-11-09T16:51:46.847705956Z (1 row)
2025-11-09T16:51:46.847709130Z 
2025-11-09T16:51:46.859310703Z + '[' -f /dev-dri-group-was-added ']'
2025-11-09T16:51:46.859700252Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-11-09T16:51:46.860262025Z + '[' -n '' ']'
2025-11-09T16:51:46.860271433Z + set +x
2025-11-09T16:51:46.871751975Z Enabling Imagick...
2025-11-09T16:51:48.064206807Z WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.22/main: No such file or directory
2025-11-09T16:51:48.064230847Z WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.22/community: No such file or directory
2025-11-09T16:51:48.095803273Z Connection to nextcloud-aio-redis (172.21.0.6) 6379 port [tcp/redis] succeeded!
2025-11-09T16:51:48.345652265Z The initial Nextcloud installation failed.
2025-11-09T16:51:48.345676119Z For more information about what went wrong, check the logs above.
2025-11-09T16:51:48.345679052Z Please reset AIO properly and try again.
2025-11-09T16:51:48.345681579Z See:
2025-11-09T16:51:48.345683776Z   https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance
2025-11-09T16:51:48.740233727Z Connection to nextcloud-aio-database (172.21.0.5) 5432 port [tcp/postgresql] succeeded!

Docker command

sudo docker run --init --sig-proxy=false
--name nextcloud-aio-mastercontainer --restart always
--publish 8080:8080
--env APACHE_PORT=11000
--env APACHE_IP_BINDING=127.0.0.1
--env APACHE_ADDITIONAL_NETWORK=""
--env SKIP_DOMAIN_VALIDATION=false
--env NEXTCLOUD_DATADIR="/mnt/ncdata"
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config
--volume /var/run/docker.sock:/var/run/docker.sock:ro ghcr.io/nextcloud-releases/all-in-one:latest

On my host, the Nextcloud data directory is at `/mnt/ncdata`.

I have reset my Nextcloud instance several times but can’t make it work.

I was able to run Nextcloud successfully by importing only the DB and not the files. (I know I’m not supposed to start the container until the end of the migration.) It was for debug)

I have also given the right access by executing:

  • chown -R 33:0 /mnt/ncdata
  • chmod -R 750 /mnt/ncdata

I have read this post too The initial Nextcloud installation failed. Nextcloid AIO startup loop but it doesn’t work.

Permissions

$ sudo ls -dl /mnt/ncdata/
drwxr-x--- 22 www-data root 4096 Nov  9 18:28 /mnt/ncdata/

Potential issue

One key point is identifying where the issue might be. According to the official documentation, section 7,

Now, with the containers still stopped, we are slowly starting to import your files and database. First, you need to modify the datadirectory that is stored inside the database export:

In my original database (from the original Nextcloud instance), I have entries in the database-dump.sql file that include many local:: paths.

COPY public.oc_storages (numeric_id, id, available, last_checked) FROM stdin;
1       local::/var/www/nextcloud/data/ 1       \N
2       home::admin     1       \N
3       home::user1    1       \N
4       home::user2     1       \N
5       home::user3       1       \N
7       home::user4     1       \N
9       home::user5     1       \N
35      local::/home/pi/        1       1587842810
36      local::/opt/nextcloud-data/     1       \N
37      local::/opt/nextcloud-data/data/        1       \N
39      shared::1644348ff6b8fab9838d117a1f39de90        0       1607793205
44      shared::ca706e3bac32a24433783177d66faccf        1       1601201187
47      shared::be05437f269268b900e437c509a79622        0       1607793202
48      home::user6    1       \N
51      home::user7   1       \N
52      home::user8    1       \N
53      home::user9      1       \N
54      home::user10  1       \N
64      home::user11    1       \N
65      local::/opt/server-data/nextcloud/      1       \N
73      home::user12    1       \N
56      shared::c9a2767476cc24c62962c1ed327e4a98        0       1762625133
55      shared::dd446885af981af1d4b668a66c86b474        0       1762625136

I’m not sure why there are so many local:: entries. What’s more, only local::/opt/server-data/nextcloud/ is valid — the other directories don’t exist.

I didn’t know what to do so I edited the file like that:

COPY public.oc_storages (numeric_id, id, available, last_checked) FROM stdin;
1       local::/mnt/ncdata/     1       \N
2       home::admin     1       \N
3       home::user1    1       \N
4       home::user2     1       \N
5       home::user3       1       \N
7       home::user4     1       \N
9       home::user5     1       \N
39      shared::1644348ff6b8fab9838d117a1f39de90        0       1607793205
44      shared::ca706e3bac32a24433783177d66faccf        1       1601201187
47      shared::be05437f269268b900e437c509a79622        0       1607793202
48      home::user6    1       \N
51      home::user7   1       \N
52      home::user8    1       \N
53      home::user9      1       \N
54      home::user10  1       \N
64      home::user11    1       \N
73      home::user12    1       \N
56      shared::c9a2767476cc24c62962c1ed327e4a98        0       1762625133
55      shared::dd446885af981af1d4b668a66c86b474        0       1762625136

Since I didn’t know what to do, I edited the file and removed the unused local:: entries. I’m not sure if that matters, because Nextcloud AIO works when I import only the database, without the files.

Do you have any idea what could be causing the issue?

Thank you for your help :slight_smile: .

Solution

I removed install.failed file :slight_smile:

Now it’s working !!! :partying_face:

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.