How to use the local external storage

I’m trying to configure the app External Storage from Nextcloud. I want to use a docker volume. Here is the command I’m using to create the container :

 docker run -d --name=nextcloud -e PUID=1000 -e PGID=1000 -e TZ=Europe/Paris -p 443:443 -p 8080:80 -v /home/foo/data:/data --restart unless-stopped linuxserver/nextcloud

I don’t know where I’m supposed to point my local data folder (/home/foo/data) to the data folder of the container, then I expect to use the app External Storage. If run the container, I don’t have the right permission for deleting and else.
How can I make it functional ?

Have you read our documentation? You’re missing parts of the command. Use PUID/PGID instead of the -user flag.

Thanks for the reply, I updated the question

Please read the documentation: https://github.com/linuxserver/docker-nextcloud#docker
Your volume mounts aren’t correct either.

Sorry, I have pasted the wrong docker command, it was for the official Nextcloud container

You’ll have to get support from them at their forum. https://help.nextcloud.com/

I know, but I need to use this image because it allow to use PID and GID. I don’t know how to map correctly volume to use the External Storage app

When you add a location in the external storages app within nextcloud, you select from the drop down the type of connect you’re using for that external data.

Yes, I’m using the Local one. Then in the path I add /data but in this case I have some permission issue despite I assign the uid and gid, the folders have also the right permission

image
There isn’t a local one?

Yes I have Local storage option :grinning:

Local storage


Zoom


And here is content I’m getting from the external storage, I don’t want to have any of this.

Content

Well you learn something new every day,…I’ve never used that option. All I can suggest is make sure the UID/GID 1000 has full access/owns that folder you’re trying to mount.

My folders have the right permission, I can delete, create, move with no error, but the problem is, I have those files and folders which I don’t want to be shown.
Is the there a way to map a volume to a custom folder inside the container ?

you could do -v /path/to/location1:/location1 then in the storages app, add /location1.

1 Like

I tried your solution, but I’m encountering an issue (only with folders).
The command I’m using to create the container :

docker run -d   --name=nextcloud   -e PUID=1000   -e PGID=1000   -e TZ=Europe/Paris   -p 443:443   -p 8080:80 -v /home/seedbox/nextcloud:/config  -v /home/seedbox/data:/custom_data   --restart unless-stopped linuxserver/nextcloud

Error:

Error

And that’s how I configured it :

Configure

And here is on my local data folder :

local

If I do

id seedbox

I got

uid=1000(seedbox) gid=1000(seedbox) groups=1000(seedbox)

And here is the permission and the folder in the container :

Container

Log (nextcloud.log):

{"reqId":"xlzLmHxZElPKQcZ9M6Qo","level":3,"time":"2019-10-10T07:57:13+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"admin","app":"PHP","method":"DELETE","url":"\/remote.php\/dav\/files\/admin\/Home\/sdf","message":"rename(\/\/custom_data\/sdf,\/\/data\/admin\/files_trashbin\/files\/sdf.d1570694233): Cross-device link at \/config\/www\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#289","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/77.0.3865.90 Safari\/537.36","version":"16.0.3.0"}