Hello,

I need some help with plex/jellyfin (I have the same difficulty with both.) Note that I am brand new to Linux and Self-hosting, I’m using the home media server as a cool and useful project to learn Linux before moving away from Windows as I acknowledge I have a lot to learn in Linux before considering migrating in a smooth manner.

I’m here to learn and I don’t request to be spoon-fed a solution because I would ideally like to end up knowing more and be able to solve this myself next time.

Description of project: I’m trying to setup a local home media server running on 192.168, nothing fancy online.


Update

The comments below helped. My docker run was wrong and missing a source:target. Eventually I got it working and on my way also learned how to map an NTFS external drive with fstab! My media server is up and running!


Distro

Debian Bookworm

Goal

Install Plex on the Debian bookworm laptop and access music library locally

Issue

Library /home/user/media/data is seen and added to Plex but no actual files or sub-directory are then located |

Notes

Ran in docker container


How I setup plex’s docker:

sudo docker run \
-d \
--name plex \
--network=host \
-e TZ="<timezone>" \
-e PLEX_CLAIM="*My claim got I got online*" \
-v /home/*user*/.config/plex/config \
-v /home/*user*/plex/transcode \
-v /home/*user*/media/data \
plexinc/pms-docker

What I have tried/noticed:

  • I tried two versions of the above, one with “config” instead of “.config” but after running the container, no folder was created. I saw the “.config” and thought it was logical to have my config files go into the existing “.config” so I tried again with the new directory. However, no plex related config exist in there?
  • I tried messing with the permissions on the directories. The data directory (/home/user/media/data) is currently on 777. If I understood permissions correctly, it means the user, every user in the group of the directory, and everyone else have read, write and execute permissions. Correct?
  • I thought maybe it was an issue with name or file format. I tried with a file named 1.mp3 and then a.mp3 but in any case, the file was not seen.
  • I found this https://trash-guides.info/Hardlinks/How-to-setup-for/Unraid/ and copied the directory setup.
  • Reinstalled from scratch
  • Reboot
  • apt update/upgrade even though I don’t think it would do anything?
  • I ignored the “timezone” field in the docker run, is that bad? I’m not sure what format to input.

I’m out of ideas with my limited and new knowledge. Can you help me out? I can provide screenshots and more detailed information, just tell me what you need.

  • redcalcium@lemmy.institute
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    1
    ·
    1 year ago

    Your volume mounts seems to be incorrect. According to Plex docker readme, the volume mounts should be like this:

    -v :/config \
    -v :/transcode \
    -v :/data \
    
    • TwinTurbo@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      1 year ago

      That’s it! If you don’t specify a host path, i.e. the path before the colon, Docker will create an volume which saves any changes you make to that path in the container, but won’t mount any existing path from the host to the container.

    • vividspecter@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I’ll add that you should consider putting the database on a SSD in a separate location for better performance and so you can make backups more easily. That’s one of the benefits of docker in that you can easily make your own dir structure that suits your needs.

      I use /containers/appdata/ for config data but you can use any structure you like. I wouldn’t use ~/.config as that may conflict with non-container data.

    • Natal@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Thanks, that helped.

      Can I create several -v paths for different media locations or should I just move all data into the one folder mapped?

      • redcalcium@lemmy.institute
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        That’s up to you how to organize it, just do whatever thing most logical for you. I myself usually went with this setup:

        • mounted a dedicated SSD partition for docker /var/lib/docker path. That docker directory tend to grow larger and larger over time so I don’t want it to suddenly fill up my root partition when I’m not looking. You may not need to do this if you plan to create just a handful of containers in your machine.
        • mounted data partitions in /var/lib/host-path. Depending on what kind of disks available in the host, I may have an SSD or HDD partition mounted inside that directory (or both, or not at all so it’ll use the root partition).
        • container data directory live inside the data partitions, e.g. /var/lib/host-path/HDD/Plex. If the container requires multiple volumes, just put them as a sub directory there, e.g. /var/lib/host-path/HDD/Plex/Movies, /var/lib/host-path/HDD/Plex/configs etc.
  • Hizeh@hizeh.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Your want your media volume to link to your media folder outside of docker.

    Below volume definition line is outside:inside

    -v /home/user/media/data:/media

    docker run -d
    –name my_container
    -v my_volume:/path/inside/container
    image_name