Mount nextcloud data as Immich external library
-
Hi!
I want to mount my Nextcloud data using the Immich external library feature. I used a volume in Cloudron for the Nextcloud app directory and mounted this volume in the Immich app.
Unfortunately, the Immich app is running as the "cloudron" user (uid 1000) while the Nextcloud app is running as "www-data" (uid 33), and files written by Nextcloud belong to this user. The permissions on the
/app/data/data
directory (which contains Nextcloud files) forbid reads from other users:drwxrwx--- 10 www-data www-data 4096 Jan 31 19:14 data
I tried to adjust the permissions on this directory but something restore the
770
mode a few seconds later...AFAIK there is no settings to change the user of an app in Cloudron. Any idea to solve my problem?
Thanks!
-
I would strongly advise to not let both apps use the same data storage based on a filesystem. Both are designed to work through their own APIs to modify files/photos and they will eventually run out of sync.
-
I see, well maybe you can explain how you intend to set this up. Like would Nextcloud be configured to use an external storage, or would you somehow mount the nextclouds main data folder as a volume into immich? Wonder how that would work and behave when apps get restored.
Generally if the apps support setting different data roots, this should be solved as explained with https://docs.cloudron.io/volumes/#sharing
But nextcloud, as far as I know, only supports that via its own external storage, otherwise you end up creating a volume based on internal platform folder paths, where the main nextcloud data resides.
-
I'm already using a volume for the main data storage of Nextcloud. My idea was to mount this volume in the Immich app and let it index the pictures inside using an external library.
I was not aware of the existence of the "media" group. Once I applied it to the
data
directory of Nextcloud (chown :media data/
), Immich was able to crawl the directory!Thanks!