1

I hope this is the right place to ask this question.

My problems is as follows: I have a Ubuntu Server 22.04.2 with docker running on my home server. On one docker container I'm running Nextcloud and on another container I'm running paperless-ngx. Now I would like to access my scanned files from paperless via nextcloud.

  • So far I tried using Proftpd to add my Paperless-ngx archive directory via FTP as external storage to nextcloud. I think that this didn't work, because the docker volume isn't saved on my profile but instead in the system(?) files. So I couldn't access the directory with my profile login and also trying to login in as a root user didn't work either.

  • Next, I tried to create a soft/symbolic link with ln -s /<path to directory> /<path to directory>. The link was working but I also couldnt create the external storage on nextcloud with Proftpd. I'm not entirely sure why it didn't work, but I think it's because the linked directory has the same root settings (which I was not able to change) as the original directory thus using FTP was not possible.

  • Lastly, I tried using a soft link from my paperless directory directly to my nextcloud directory. I could see the directory in the terminal but it didn't show up, when I tried to access it in nextcloud.

I'm pretty new to using Ubuntu Servers and Docker containers so I probably made some silly decisions along the way. Could I have done something different to get it to work? Or are my "workarounds" not feasible at all? If so: Is there an easy solution to get this to work?

2
  • Many containers include instructions for using bind mount volumes, such as this Nextcloud container by Linuxserver.io (notice the volumes section). May 24, 2023 at 12:46
  • That sound very interesting, I'll take a look into that. Thanks for the suggestion May 24, 2023 at 14:06

1 Answer 1

0

The easiest way to do this (for homelab use) is by using Docker bind mounts for persistent storage.

The official Nextcloud image even has a section describing this (under Persistent Data).

An example of the command needed to run with persistent volumes for the config and data would be:

$ docker run -d \
    -p 8080:80 \
    -v /path/to/appdata:/var/www/html/config \
    -v /path/to/data:/var/www/html/data \
    nextcloud

Here, /path/to/appdata and /path/to/data need to be replaced with the actual full path of the folder where you want this persistent storage to be.

You could then map the folder /path/to/data into another container using the same method, allowing this folder to be directly shared between multiple containers and the host filesystem itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .