Access data files from outside container with user pi

I use the docker image on my Raspberry Pi 2. I want to backup my ncp configuration and data from outside the container with Duplicati. However, the user pi can not reach most of the directories and files. It works when I change the owner, but that breaks ncp.
Is it possible to use the same user in the container as outside the container? So that pi can access the files. I think LinuxServer.io does this by using the “-e PUID= -e PGID=” parameter (see info).

Where is your data stored, inside the container or outside in a mapped volume (using the -v parameter when you created the container)?

If it’s outside, then you should be able to access it directly (with the sudo or chmod commands perhaps to overcome user priv issues), or alternatively you can share it via SMB or whatever depending on how you want to access it (see here for details)

Yes my data is stored on a mapped volume and I can access them using sudo, chown or chmod.

However, I have a second container with Duplicatir that can also access that’s mapped volume and I want to use duplicati to backup the files. My question is: is it possible to setup Nextcloud or the container so that the files are accessible without sudo rights so other containers can reach it without problems?

Is there someone that can help me or tell me what to do to get help?