Help--- I screwed up while trying to add external storage

In brief, I tried to follow the instruction on “how to allow the Nextcloud container to access directories on the host” from this link:

https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host

but instead of removing the mastercontainer, I removed the nextcloud-aio-nextcloud container. Shame on me!

so I then removed the mastercontainer, added the environment required to access external drive, and tried to redo the mastercontainer but it is failing now with this error in the log:

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Configuring Redis as session handler...
Appdata is not present. Did you maybe change the datadir after the initial Nextcloud installation? This is not supported!
See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
If you adjusted the datadir to be located on an external drive, make sure that the drive is still mounted!
In the datadir was found:
total 8
drwxr-x--- 2 www-data root 4096 Mar  6 10:07 .
drwxr-xr-x 1 root     root 4096 Mar  6 10:06 ..

But I did not want to change the datadir (if I did). I only added an external drive.

My docker run command was:

sudo docker run
–sig-proxy=false
–name nextcloud-aio-mastercontainer
–restart always
–publish 80:80
–publish 8080:8080
–publish 8443:8443
–volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config
–volume /var/run/docker.sock:/var/run/docker.sock:ro
–env NEXTCLOUD_MEMORY_LIMIT=1024M
–env NEXTCLOUD_DATADIR=“/USBdrive/nextcloud”
nextcloud/all-in-one:latest

I understood that I needed to add these 2 lines to be able to access the external drive:
–env NEXTCLOUD_MOUNT=“/mnt/”
–env NEXTCLOUD_MOUNT=“/media/” \

How can I correct my screw up?

ok, I used the AIO restore. That brought me to the state without the external drive. Then I redid what I was trying to do in the first place, and it worked.

Now I have the LOCAL choice in the External storage, but somehow, I can’t have access to it. I see a red exclamation mark when I try to set it. Searching… It’s probably some rights…

Hi, if you read further on https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host it says what kind of rights it needs

Hi, thanks for responding. Yes this is the instructions I followed… See my result here:

1 Like