I am fairly new in the selfhosting business. I host a few services like Jellyfin or AdGuard, but most of my data just sits on plain SMB shares on my NAS.

I am interested in setting up things like Paperless-ngx, Nextcloud maybe Immich as well. One thing I am struggling with is how to organize all this so I don’t have the data scattered around multiple places or in the worst-case even duplicated. I like the simplicity of network shares and the fact that I am not relying on a third-party application to keep being maintained. I am currently not sure I am willing to give that up. However, I am also intrigued by the features these services provide. I know Nextcloud has the option to mount external storage, but I don’t know which downsides come with that. It gets more complicated with Paperless. As far as I know you typically have a consume directory where you throw in your data and Paperless stores it using its own system in the media directory. This means I either throw in everything or I suddenly have two locations where my documents are stored. If I would mount that media directory in things like Nextcloud I probably wouldn’t be able to find anything because of the different structure and naming scheme.

The idea that I had in mind is that I have a single directory structure of my data that can be used on its own and all these tools are just different frontends and provide different views and information of the same data. Maybe this approach is just something from the past and I should move on.

I should add that I am not planning to expose any of these services to the public. All of this is only accessed from inside my house or using a Wireguard VPN.

  • How do you guys handle all this?
  • How do you avoid data duplication?
  • How do you avoid multiple potential file locations? Is a document in my Nextcloud, in my Paperless or just on the network share?
  • Do you prepare in some ways in case an application stops being maintained?
  • How has this reliance on multiple services impacted other things e.g. your backups?
  • czl@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 hours ago

    Immich and paperless like their own data structure. But they both also just keep your files pretty much intact.

    So in order:

    • Since I mostly only use 1 app to manage each “type” of data, I let them have their own folder. Unmanaged files just go on a personal share
    • By pretty much just accessing the files trough that application. The only way I need to access them in another way is if I need to migrate to another app
    • I don’t use Nextcloud, but when accessing files, doesn’t it just show the normal folder structure? You can give it access to the “base” folder and see everything if needed.
    • Two ways: 1. the more important the data, the more mature and hopefully with longer support the app needs to be. Documents and photos are important. Game roms are not. 2. Only choose apps that don’t store the data in a proprietary format. Both paperless and immich like their folder structures and naming, but it’s still pdfs, jpgs and heic underneath. This way of I need to move apps, at most, metadata is lost.
    • I just backup all of it — app data, files, etc. No real impact.
  • Lemmert@reddthat.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago
    • Just like czl I do have seperate apps for each type of data I use. For example Ente for photos and Syncthing for keeping the documents folder of my devices synced up.
    • It’s not something I really think about because my data sources are functionally disjoint. (e.g. I don’t have photos from my phone in my documents folder). The only exception is Ente, where I do keep a plaintext copy of the “shared with family” account to display some family photos on our digital photoframe. This also “answers” your next question.
    • I don’t have anything set up for when an application stops support. I do however do look beforehand whether it’s possible to extract my data in a way I can migrate to another platform if need be. For example, some services like Ente offer an easy plaintext way to export/backup your data in directories mirroring your albums. That way I could easily head to Immich
    • It hasn’t really. I usually do backups by keeping two copies of all my volumes. So running more services doesn’t really impact much of anything.

    A sidenote on Nextcloud: it does use the same folder structure in its data volume as it presents to the user. So it’s fairly easy to manage, but you need to update the folder you made the change within the container for it to show up. When we used to keep photo’s synced up with Nextcloud, I could directly access that folder for the photoframe. Since Ente is e2ee I needed to duplicate data in that case

  • TheHive@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago

    After setting up paperless and Immich I struggled with this as well. I had a structure before an was very attached to it. But both, like mentioned below, will organize files in their own way. There are ways to keep things like you had them, export them, whatever. But I deemed it to be not worth the effort.

    It took me some time, but I just accepted whatever these do. In particular since I really like those two services mentioned. Data is accessed through them, and that’s it for now. I backup everything through proxmox mechanisms, which is way more convenient then messing with the data in any way.

    Should I want to migrate, I can always cobble together a migration script that pulls my data in ways I like.

  • Scipitie@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 hours ago

    Hey, Welcome! You’re having a wonderful and sometimes exhausting journey in front of you :)

    I’ll just brain dump based on your questions and my associations. Hope something useful is in between!

    First the basic setup options because they tie into how to handle your date flow:

    basic Most popular I think is docker compose: here I suggest splitting it into one compose file per service though with one file holding your port config. This prevents you yourself getting confused by your port mappings :)

    Second in line is a proxmox setup - similar vein and I lack the hands-on experience to talk about the difference.

    Then there’s the “everything native” approach where you don’t rely on containers but manage it yourself or via a dedicated OS that makes life easier (after the learning curve) like nixos.

    DATA

    All this foundational stuff is important because it changes your approach. In general: don’t fear data duplication. Duplicate it until you learn where you want your data to life and only then define your flow.

    Specific example: after I got used to paperless I don’t look into my opencloud anymore, at all. I still duplicate them there but as distributed backup, not for consumption.

    If a dataset has a clear place ten it’s easy. If not then your options are different depending on your setup: For the *arr stack the official recommendation is to use one shared folder and mount that into each part for example. I personally don’t like that and have hard links for everything - that’s basically a pointer to the file that looks like the file itself everywhere. As long as one pointer exists the file still stays on your drive but when the last pointer is gone, the file is effectively deleted. On Linux, you can think of every file this way but by default only one pointer exists (which often people test as synonymous to “the file”. Drawdown: this only works really well if you manually keep either track of which tool links where or you don’t containerize everything.

    Again a specific example: My downloaded torrents never get moved - instead hard links are created into whichever path and naming scheme I defined for each consumer - this way, out of murdrrbot_07.mp3 a new author/series/booktitle.mp3 was created, both pointing to the same data and seeing it as a proper file.

    But then there is one more thing: I suggest you split your thinking into data consumption and manipulation - because for the first, data duplication doesn’t matter. Especially for documents you’re talking about a ridiculous small amount of disk space and if it’s only reading/watching/hearing you as manager have no problem that data might exist multiple times.

    If you want to keep it clean by design then you’re leaving the starter mode self holster - welcome to system design and infrastructure architecture! Here your approach could be to define lifecycles for each data type that you have. What a “data type” is in this context btw is a user term, NOT the underlying tech stack. You need to understand and document how an invoice should be treated and consumed by you differently than an invitation or a informal letter. Only then do you map file types, incoming channels, transformation steps, etc etc.

    In my opinion: huge overkill to this upfront.

    In short: spin everything up, observe how you use it and only then decide where things need to stay unique and cleaned up. Don’t break your head over something that’s actually quite easy to repair!

    • 5ymm3trY@discuss.tchncs.deOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 minutes ago

      As I have said in the other comment: I already use Docker and docker-compose for all the services I host. They are also all configured to use bind mounts instead of volume mounts, so that I am in control where everything is located. I heard about Proxmox, but I never really looked into it because never saw the need for something different than a docker container. I also don’t have a dedicated server. All my services are running as Docker containers directly on the NAS.

      I am not a fan of data duplication, disk space aside. You are pretty much guaranteed to have diverging file structures sooner or later. I don’t want to look up a file on three different applications just to find the newest version of it. I know you can use rsync and a cron job, but that just adds more complexity to a problem that I don’t want to have in the first place. This might work for something like a read-only backup like i presume you do with Paperless and OpenCloud, but I am not sure how this handles a case where, at least in theory, your files can be changed, renamed etc. in multiple different locations.

      How do you handle your Paperless documents? Do you have a local file structure that you manage on your own for these documents or do you shove them all into Paperless and process them entirely in there (naming, tagging, etc.)?

      I get your idea of trying things out even though it might result in temporary data duplication to find the way that works best for me. I am just curious how other peoples workflow looks like. Maybe I can also learn from the mistakes other people made in the past :)

  • i_stole_ur_taco@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 hours ago

    I run everything in docker. My docker volumes are all subdirectories under /media, which is the root of my NAS. If an app only needs something specific, docker only mounts, eg /media/movies. If the app needs many subdirectories (like backups), it gets the full /media mount.

    All the docker data/configs are under /docker/volumes (eg /docker/volumes/jellyfin), and every container is configured with compose in /docker/docker-compose.yml.

    The biggest hurdle for me was creating a sane docker-compose file that defines where everything lives. Once that is standardized, adding and maintaining your apps becomes easy.

    If you’re very new to this, even a dumb LLM like ChatGPT can be very helpful to explain what’s inconsistent, redundant, or incorrect with your config. If you are lost I would strongly suggest this as a way to get oriented. But DO NOT copy and paste anything into the LLM containing passwords, tokens, keys, etc. if you accident do, change those keys before finishing up your project.

    With docker there’s no duplication- you have one copy of everything you need and you just point each container at the same data. This makes it trivial to keep file consistent across your apps and doesn’t waste space.

    • 5ymm3trY@discuss.tchncs.deOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      I already use Docker and docker-compose for all the services I host. They are also all configured to use bind mounts instead of volume mounts, so that I am in control where everything is located. I mainly use the official documentation although I sometimes like to check https://github.com/Haxxnet/Compose-Examples/tree/main. I didn’t came across any major problems with that workflow so far, but that is also besides the point of my original question.

      Jellyfin is a good example of the workflow I had in mind. I have a media share on my NAS and just point Jellyfin to that share in the docker-compose. But that is not how things like Paperless work, at least not from my (still limited) understanding of it. I think there are other workflows, but the main one of Paperless is a consume directory and a data/media directory. Everything in the consume directory gets ingested by Paperless and is moved with (I think) a different hierarchical structure and filename to the media directory. So if I point the consume directory to my current documents share on the NAS everything is moved away. I am sure there are ways to specify how Paperless organizes the media directory, but it most certainly will not be exactly the same as before. So making the data/media directory function as my new NAS “share” will also result in a change. In addition to that, my documents share on the NAS also contains data that I probably don’t need to track with Paperless e.g. some spreadsheets. I am not sure how Paperless handles documents in the media directory that were not originally processed using the consume folder or if that is even a good idea in the first place.