Comment on Getting Linkwarden docker storage right
rtxn@lemmy.world 2 weeks ago
I’ve never used Linkwarden, but the /data folder is often used by Docker containers to store the application’s data, so it’s likely an internal path. You’ll have to create a volume that exposes the internal /data path to the host filesystem, then whatever is written into that directory will be made available to both the container and the host system. Any file or directory in the container can be exposed this way.
I usually put my volumes in /srv, into a subdirectory named after the service, and with the minimal necessary privileges to run the container and the service. You could, for example, create volumes like this:
/srv/linkwarden/postgres_data:/var/lib/postgresql/data /srv/linkwarden/linkwarden_data:/data/data /srv/linkwarden/meili_data:/meili_data
The volume path (left side of the colon) can be anything. The right side is where the services expect their files to appear inside the container.