Nextcloud AIO won't start after setting custom DATADIR on fresh install

I managed to install Nextcloud AIO with docker successfully on the first attempt. I wanted to change the data dir, so I removed the docker install by following the uninstall guide here: GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

I modify the run script by adding the -e NEXTCLOUD_DATADIR="/mnt/raid1/Share/nextcloud/ncdata" \ line to change the data directory and run again:

sudo docker run -d \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 3004:8080 \
-e APACHE_PORT=11000 \
-e NEXTCLOUD_DATADIR="/mnt/raid1/Share/nextcloud/ncdata" \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest

 

However, when I do the install for Nextcloud AIO fresh again, the Apache and Nextcloud container loops without starting. This is the message from the Nextcloud container:

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Configuring Redis as session handler...
Setting php max children...
Appdata is not present. Did you maybe change the datadir after aio was first started?
See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
In the datadir was found:
total 8
drwxr-x--- 2 www-data root 4096 Feb  8 21:59 .
drwxr-xr-x 1 root     root 4096 Jan 17 05:28 ..

The new “fresh” install seems not to be a fresh install as it remembers the previous installation’s Nextcloud AIO Login password (it doesn’t give me a new one like in the first install attempt).

I’m not sure what the issue is, I would apprecieate any help getting this issue sorted!
Thanks.

Hi, see GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance. foe how to reset aio properly.

Is it related to this:

As I get the same cryptic output…