I have a Raspberry Pi 4 with Raspbian OS. I have Open Media Vault v5 installed on the Raspberry and I installed NextCloudPi using a docker. From this official documentation.
The SD card is mouted at: /
My HDD drive is mouted at: /srv/dev-disk-by-label-NAS/
Install command: docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v installpath:/data --name nextcloudpi ownyourbits/nextcloudpi-armhf 192.168.1.100
My question is, how do I install and run NextCloud on the SD card while all the user data is stored at the HDD?
I don’t want the data to be stored on the SD card since it’s only 16GB and I don’t want NextCloud to run at the HDD since it spins down after 10 minutes and therefore I get long startup times when I want to connect to my NextCloud.
You can not when using docker image. Edit: I stand corrected look at answer below from gas85. Just mount it with -v
You can use the curl installer to install it on sdcard, then use nc-datadir to move data to your HDD
Ok, thanks for your answer!
I’ll try to install the NextCloudPi with the curl installer and I’ll get back if it worked out or not.
It did the trick thank you!
Now it’s installed on the SD card and I moved to data to be stored at: /srv/dev-disk-by-label-NAS/nextcloud-data
I found out that in the NextCloud config (
/var/www/nextcloud/config/config.php) there are actaully the
datadirectory that you can change, but I haven’t tested it myself if it works with Docker.
For sure it works with docker. Even, with docker you do not need to change config.php, simply mount data directory folder to a new location via:
docker run -d -v /your/new/folder/data:/var/www/html/data ...
Check this out for more information:
Seems you need simply mount it during the deployment to your HDD, e.g.:
docker run -d -v /your/hdd/nextcloud:/var/www/html ...