How to use an USB-Pendrive on NextcloudPI

Hi there,

I’ve just set up NexcloudPI v1.13.1 (NC16.0.1.1) on a RaspberryPI 3b+.
Now I would like to add a 32 GB USB pen drive for storing my files.

But I’m struggling with it (I’m new to Linux and NC) …

So far I was able to “format usb drive” (as “USBdrive”) via NC admin GUI and activate automount.

‣ You should use nc-datadir to move your files to your plugged in USB drive

NextCloudPi version v1.13.1
NextCloudPi image NextCloudPi_03-09-19
distribution Raspbian GNU/Linux 9 \n \l
automount yes
USB devices sda
datadir /var/www/nextcloud/data

Obviously, the drive is there as “sda”

sda 8:0 1 29,4G 0 disk
└─sda1 8:1 1 29,4G 0 part /media/USBdrive
mmcblk0 179:0 0 14,9G 0 disk
├─mmcblk0p1 179:1 0 43,9M 0 part /boot
└─mmcblk0p2 179:2 0 14,8G 0 part /

But Config/Database and DataDir says “path doesn’t exist”
What should one put in in these boxes:



Many thanks in advance

Have you created ncdatabase and ncdata directories to your USBdrive?

mkdir /media/USBdrive/ncdatabase

I don’t use Nextcloud on pi but I would try that. (and maybe add / to the end if path still doesn’t exist) :slightly_smiling_face:

1 Like

Just use nc-database and nc-datadir. That message is only informative and the path will be created if it doesn’t exist.

1 Like