Data folder NextCloud AIO

Good evening, I ran the setup as per the NextCloud AIO guide and needed to set a different directory as the data directory than the default one. Specifically docker and nextcloud are installed on an SSD and the data should be on a RAID1 mounted on /mnt/raid1, however by adding the string to the container creation command the directory for the data remains the default one /mnt/ncdata

this is the command I used for the creation:

sudo docker run -it \
--name nextcloud-aio-mastercontainer \
--restart always \
-p 80:80 \
-p 8080:8080 \
-p 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
-e NEXTCLOUD_DATADIR="/mnt/raid1"

How I can solve?

Hello, the following command should make it work:

sudo docker run -it \
--name nextcloud-aio-mastercontainer \
--restart always \
-p 80:80 \
-p 8080:8080 \
-p 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
-e NEXTCLOUD_DATADIR="/mnt/raid1" \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
1 Like

I have to delete all and make a fresh install??

Yes or you may have a look at this: Question about changing data DIR? · Discussion #890 · nextcloud/all-in-one · GitHub

1 Like