AIO Installation with NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_datadir fails

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • latest, believe it must be 30.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.10
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes, but I have seen a a lot of times as I have tried a lot of different things.
  • Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
    • AIO

Summary of the issue you are facing:

When I create the AIO-master pod with “NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_datadir” the installation fails.
If I use default it works as it should.

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

  1. Install Ubuntu 24.10
  2. Install docker
  3. Do docker compose up with this file NextCloud docker compose with NFS volumes - Pastebin.com

Error from the Nextcloud pod:

Connection to nextcloud-aio-database (172.19.0.3) 5432 port [tcp/postgresql] succeeded!
+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Enabling Imagick...
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.20/main: No such file or directory
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.20/community: No such file or directory
Connection to nextcloud-aio-redis (172.19.0.4) 6379 port [tcp/redis] succeeded!
Initializing nextcloud 30.0.2.2 ...
Initializing finished
New Nextcloud instance.
Installing with pgsql database
Starting Nextcloud installation...
Cannot create or write into the data directory /mnt/ncdata
Installation of Nextcloud failed!
Connection to nextcloud-aio-database (172.19.0.3) 5432 port [tcp/postgresql] succeeded!

If I remove NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_datadir and the nextcloud_aio_nextcloud_datadir volume declaration from compose file it installs as expected.

The strange thing is that I managed to get it up and running on Wednesday. The wanted to change somthing which I later regret.

Looks like the permissions are not set correctly for the volume. How did you create the volume?

Hi

Thank you for fast response.

Yes agree.
The volume is created with the linked compose.yaml file.

Permissions doesn’t look right, but why do docker create 2 “identical” volumes with different rights.

root@nextcloud01:/ds1511/dockerconf# ls -la /var/lib/docker/volumes/nextcloud_aio_mastercontainer/
total 16
drwx-----x 3 root root 4096 Dec 8 15:49 .
drwx-----x 5 root root 4096 Dec 8 15:49 …
drwxrwxrwx 6 1026 users 4096 Dec 8 15:49 _data

root@nextcloud01:/ds1511/dockerconf# ls -la /var/lib/docker/volumes/nextcloud_aio_nextcloud_datadir/
total 16
drwx-----x 3 root root 4096 Dec 8 15:49 .
drwx-----x 5 root root 4096 Dec 8 15:49 …
drwxr-xr-x 2 root root 4096 Dec 8 15:49 _data

/nOrphf

I have corrected the permissions

root@nextcloud01:/ds1511/dockerconf# ls -la /var/lib/docker/volumes/nextcloud_aio_nextcloud_datadir/ & ls -la /var/lib/docker/volumes/nextcloud_aio_mastercontainer/
[1] 112208
total 16
drwx-----x 3 root root 4096 Dec 8 15:49 .
drwx-----x 5 root root 4096 Dec 8 15:49 …
drwxrwxrwx 6 1026 users 4096 Dec 8 15:49 _data
-rw------- 1 root root 156 Dec 8 15:49 opts.json
root@nextcloud01:/ds1511/dockerconf# total 16
drwx-----x 3 root root 4096 Dec 8 15:49 .
drwx-----x 5 root root 4096 Dec 8 15:49 …
drwxrwxrwx 2 root root 4096 Dec 8 15:49 _data
-rw------- 1 root root 158 Dec 8 15:49 opts.json

but after I press Download and start in AIO they are set back to:
root@nextcloud01:/ds1511/dockerconf# ls -la /var/lib/docker/volumes/nextcloud_aio_nextcloud_datadir/ & ls -la /var/lib/docker/volumes/nextcloud_aio_mastercontainer/
[1] 112737
total 16
drwx-----x 3 root root 4096 Dec 8 15:49 .
drwx-----x 10 root root 4096 Dec 8 16:01 …
drwxr-x— 2 www-data root 4096 Dec 8 16:01 _data
-rw------- 1 root root 158 Dec 8 15:49 opts.json
total 16
drwx-----x 3 root root 4096 Dec 8 15:49 .
drwx-----x 10 root root 4096 Dec 8 16:01 …
drwxrwxrwx 6 1026 users 4096 Dec 8 15:49 _data
-rw------- 1 root root 156 Dec 8 15:49 opts.json

and something manages to write something as “install.failed” file is stored on the underlying NFS share.

Now I have changed the setup a bit.
Instead of having docker create a NFS volume I have mapped the root of the NFS volume to a mount point and then get docker to bind to that folder instead.

Creating of folders:
root@nextcloud01:/ds1511/dockerstore# mkdir nextcloud_aio_apache
mkdir nextcloud_aio_notify_push
mkdir nextcloud_aio_nextcloud
mkdir nextcloud_aio_redis
mkdir nextcloud_aio_database
mkdir nextcloud_aio_mastercontainer
mkdir nextcloud_aio_nextcloud_datadir
mkdir nextcloud_aio_backupdir
root@nextcloud01:/ds1511/dockerstore# ls -la
total 40
drwxrwxrwx 10 1026 users 4096 Dec 8 16:54 .
drwxr-xr-x 4 root root 4096 Dec 7 23:09 …
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_apache
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_backupdir
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_database
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_mastercontainer
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_nextcloud
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_nextcloud_datadir
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_notify_push
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_redis

Then I run the AIO and permissions get changed:
root@nextcloud01:/ds1511/dockerconf# ls -la /ds1511/dockerstore/
total 40
drwxrwxrwx 10 1026 users 4096 Dec 8 16:54 .
drwxr-xr-x 4 root root 4096 Dec 7 23:09 …
drwxr-xr-x 2 www-data www-data 4096 Dec 8 17:11 nextcloud_aio_apache
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_backupdir
drwx------ 19 dnsmasq systemd-journal 4096 Dec 8 17:08 nextcloud_aio_database
drwxrwxrwx 6 root root 4096 Dec 8 17:07 nextcloud_aio_mastercontainer
drwxrwxrwt 17 www-data root 4096 Dec 8 17:10 nextcloud_aio_nextcloud
drwxr-x— 2 www-data root 4096 Dec 8 17:14 nextcloud_aio_nextcloud_datadir
drwxrwxrwx 2 root root 4096 Dec 8 16:54 nextcloud_aio_notify_push
drwxr-xr-x 2 dnsmasq administrator 4096 Nov 12 02:38 nextcloud_aio_redis

Managed to get the permissions sorted.

For future reference, boot up your NextCloud even though it fails.
Correct the folders for which NextCloud fails and reset the NextCloud and delete content of folders and create it all from scratch again.

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