Data storage on external drive for nextcloud docker


I am running the nextcloud docker containers on a Raspberry Pi and all works great.

I have connected an external drive that I would like to use to store the cloud data.
Optimally everything would be running on SD card but the external drive is used for the files of the users.

How do I achieve this? Is it even possible?

Is it even possible to use part of the SD card storage together with the external drive?

Thanks in advance

NC can use any already mounted locally attached storage as its data folder. It’s a parameter in your NC config.php.

It’s easier to do this on a new installation (since you won’t have files that’ll need to be moved from the old data location to the new one). Will you need to migrate any existing data?

Since you’re using Docker, the other variable will be how you’re managing your persistent data for your containers (named volumes versus bind mounts). The answer will determine where your persistent data is really being stored on your Docker host and, in turn, how and where your external drive needs to be integrated into your system.