this post was submitted on 07 Jan 2025
32 points (92.1% liked)

Selfhosted

61333 readers
394 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Currently getting my first media server set up, and I'm wondering what the best directory would be for all the stored files. For reference, I'm working with Ubuntu server to follow the guide I'm using.

Mainly, I'm wondering if I should migrate /home/ to my RAID array, or leave /home/ where it is and create a new directory on the RAID array. Currently the server will just be for my use, but might expand it for others to use

top 18 comments
sorted by: hot top controversial new old
[–] MangoPenguin@lemmy.blahaj.zone 22 points 2 years ago (2 children)

I mount extra storage under /mnt/ and store stuff like media in there.

[–] deegeese@sopuli.xyz 10 points 2 years ago (1 children)

And make symlinks for large collections, like ~/photos -> /mnt/nas/photos

[–] MangoPenguin@lemmy.blahaj.zone 1 points 2 years ago* (last edited 2 years ago) (1 children)

Interesting, are you accessing files directly on the NAS or something like that where the symlink makes sense?

[–] deegeese@sopuli.xyz 3 points 2 years ago (1 children)

You want the big files to live on the NAS, but be navigable from your home dir for convenience and to discourage saving to the local disk.

[–] MangoPenguin@lemmy.blahaj.zone 1 points 2 years ago (1 children)

Oh I see, you mean you mount the NAS storage into /home?

[–] jws_shadotak@sh.itjust.works 6 points 2 years ago (2 children)

Not quite - He's saying to mount the NAS under /mnt/ and to create a symlink under /home/ to go directly to /mnt/nas/photos

If you're on KDE Plasma / Dolphin, this can be done here:

and put something like this in there

This will create a folder that goes directly to /mnt/nas/pictures, but you can put it anywhere.

[–] SidewaysHighways@lemmy.world 2 points 2 years ago

Gosh FINALLY this is starting to make sense. Thanks for your effort!

[–] needanke@feddit.org 2 points 2 years ago (1 children)

A bit offtopic: What theme is that? I was woundering why you would put windows screenshots under a comment about dolphin for a second.

[–] jws_shadotak@sh.itjust.works 1 points 2 years ago

Haha, it's PlasmaXDark - https://store.kde.org/p/1367172

I genuinely like the look and feel of Windows.

[–] SpikesOtherDog@ani.social 2 points 2 years ago* (last edited 2 years ago)

/mnt/ is where I would put this. Only exception would be if I had a service I was providing, like a media player server, and then I might mount it at /srv/

[–] MNByChoice@midwest.social 11 points 2 years ago

Mainly, I’m wondering if I should migrate /home/ to my RAID array, or leave /home/ where it is and create a new directory on the RAID array.

Leave home where it is. Symlink to important directories on RAID.

Makes it easier to mess with the RAID if it doesn't make logging in hard.

[–] normalexit@lemmy.world 7 points 2 years ago

Personally I wouldn't worry too much about where you mount the volume, I use /storage on my boxes because I is easy to remember and sounds good to me. I also typically make a storage group that I give access to manage the files in the volume vs having my user own everything.

I wouldn't put it in home just because you are considering sharing with others.

[–] savvywolf@pawb.social 6 points 2 years ago (1 children)

I think convention is for files served by the server to go in /srv or even /usr/lib.

Yup, I use /srv, works well.

/srv for me.

[–] deadcatbounce@reddthat.com 1 points 2 years ago* (last edited 2 years ago)

systemd seems to like mounting stuff on /media. However, I would consult the Linux filesystem hierarchy documents around (eg. Wikipedia and then follow the references) for the most compatible place.

/srv /mnt tend to suggest themselves. /home is for your personal stuff not shared user wide stuff.

Don't put stuff in local directories, leave it in a NAS location and mount it where you need it using fstab or auto/mount units and the appropriate filesystem. Maybe I've misunderstood something you wrote to think of this last bit.

[–] fmstrat@lemmy.nowsci.com 1 points 2 years ago

/storage for me.

[–] ocean@lemmy.selfhostcat.com -1 points 2 years ago

I checked my local backup server and I have two directories:

/home/share for backup files

/home/app data for backup appdata

My main server which unfortunately runs unraid is structured like

/mnt/user/array/media

/mnt/user/array/Nextcloud

/mnt/cache_ssd/appdata