Cannot attach external USB drives

I am using Ubuntu 18 and NextCloud 13.
Everything seems to be working but the mini-PC I installed Linux on has no real disk space.
I planned on attaching my 1TB drive via USB. When I do Linux sees it no problem and I can browse it.
It gets auto-mounted to /media/mike/USB as my user (mike) not www-data.

When I try to add the external drive to NextCloud I get a red dot and it doesn’t connect.
I tried to change the owner of the mounted folder but it says ‘operation not allowed’.
I tried mounting this drive as user www-data manually (see below) but still no luck.
[mount -t vfat /dev/mmcblk0p1 /media/mike/USB -o uid=33,gid=33,utf8,dmask=000,fmask=000]

Without this disk attached the NextCloud is useless for me.
Any ideas?

www-data probably has no permission to look into /media/mike (you can try sudo -u www-data ls -lisa /media/mike/USB). This probably makes sense, so I’d rather create a mountpoint at /media/USB and put my disk there. The chosen dmask and fmask are perhaps good for debugging, but later you probably should set them to a value that not everybody can read new files by default.

I’m getting the same problem. I’ve just set up NextCloud and it looks great. The only problem is it’s on a 4GB flash card so not much room for data.
I don’t know how to point it to the USB stick.
Any ideas?

I use the nextcloudpi-image. In that the name of the USB-drive is hardcoded: USBdrive

Thanks for pointing me to the nextcloudpi image. I didn’t know there was one. I spent ages downloading all the dependencies.

I found a link to it at


Nextcloud is installed at /var/www/htdocs/nextcloud (if I remeber right). Copy all /htdocs with -a to yout root of the USB-Stick. Mount that USB-Stick at /var/www. This way the system does not know that Nextcloud has changed place - the path is the same.