NextCloud in Docker cannot add Local External Storage

Hi, I’m trying to mount a storage device locally onto my NextCloud installed in my Raspberry Pi 4B. I have followed the documentation for Adding Local External Storage but my Nextcloud just refuses to connect to it. Im using NextCloud 21.0.1.

1 Like

Hi, did you mount the drive into the docker container? And did you set the correct permissions? It would probably help if you could post your docker-compose.yml file.

1 Like

The Docker container doesn’t have direct access to file systems mounted by the host. You’ll have to mount it on the host, pass through a mount point to your container, and then mount that in Nextcloud.

1 Like

Yes, that’s what I meant :+1:

image
Currently this is my docker-compose.yaml. Based on what KarlF12 said, means if I add a local storage, I would have to update docker-compose.yaml and restart the container?

Yes. You need to mount the directory that you want to add to Nextcloud via local external storage from outside the container into your container.

image
I have revised my docker-compose.yaml and it seems to do exactly what you meant. But I wanted to be dynamic. Currently with this implementation, the nextcloudData is mounted onto /data in the container. However, I expect the External Storage would allow me to arbitrarily mount anywhere. My knowledge on docker is still fairly new. So, I probably done something wrong here?