How to make all the media plugins work with each other (users, groups, permissions, etc.)(rad-/son-/bazarr, deluge, plex, jackett)

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
Hey there,

I want to setup the "media plugins" to work with each other but I'm having problems with all the users, groups and permissions in general:

Sonarr and Radarr will send a torrent, that they got from jackett, to deluge to download. The downloaded file (that is owned by deluge) needs to be "imported" (as Sonarr and Radarr call it) by Sonarr and Radarr, but that is only possible when Sonarr and Radarr have the read and write permissions. Then Sonarr and Radarr need to move the downloaded file to the plex media folder. Then Plex also needs the correct permissions to be able to read the file (so that it can add the episode/movie to it's library). And then, Bazarr also needs to be able to read (and maybe write) the files so that it can add subtitles. Those subtitles (external .srt's) also need to be read by Plex, Sonarr/Radarr and Bazarr. The dataset that stores everything (name of dataset is "Plex Media") also needs the correct ACL and ownership so that every service can add and read their files (Sonarr, Radarr, Bazarr, Deluge) to the correct folder. But I also need to be able to read and write the dataset which I access via a SMB share.

You get it. It's a mess. My goal is to have the user "Media", which all the services will be run under in their jail (is that possible? Can you run a plugin under a different user?) and add "Media" to my group and set all permissions to 660. This way, every file created, moved and read is owned by "Media". Then I set ownership of the dataset "Plex Media" to the user "Media" and to MY group (which "Media" is in). This way, everyone can do what they need to do (because they are all run by the same user), and I can also read and write the files because "Media" is in my group and permissions are 660.

Only problem: I have no clue how to do this! And I hope you can help me. Simply said: I want to create a user, and run every plugin under that user. I also want to set permissions for the files that every plugin creates.

Info:
All the services are installed as (community)plugins:
  • Plex
  • Sonarr
  • Radarr
  • Deluge
  • Jackett
  • Bazarr
The desired user is "Media"
 

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
Never mind. I was already planning on running one vm (for other purposes), so I'm just going to run it all on the vm. It's too much hassle to make it work when I can do it on a "normal" linux system and set it up way more easily. It's also way easier to maintain/manage. The plugins are also giving me way to much problems, aka I'm done with them.
  • Tautulli won't install
  • The Bazarr web-ui shows 500 internal server error
  • Sonarr and Radarr both run old mono versions and take hours to update them (method)
  • I can't claim the plex server (it let's me log in, but then just goes to the homescreen without letting me claim the server and setup the libraries)
  • Openvpn just strait-up doesn't want to install
  • Grafana also
  • I already needed a vm for pihole and unbound
  • There is no bitwarden plugin
 

norseman

Dabbler
Joined
Sep 24, 2019
Messages
14
Hey there,

I want to setup the "media plugins" to work with each other but I'm having problems with all the users, groups and permissions in general:

Sonarr and Radarr will send a torrent, that they got from jackett, to deluge to download. The downloaded file (that is owned by deluge) needs to be "imported" (as Sonarr and Radarr call it) by Sonarr and Radarr, but that is only possible when Sonarr and Radarr have the read and write permissions. Then Sonarr and Radarr need to move the downloaded file to the plex media folder. Then Plex also needs the correct permissions to be able to read the file (so that it can add the episode/movie to it's library). And then, Bazarr also needs to be able to read (and maybe write) the files so that it can add subtitles. Those subtitles (external .srt's) also need to be read by Plex, Sonarr/Radarr and Bazarr. The dataset that stores everything (name of dataset is "Plex Media") also needs the correct ACL and ownership so that every service can add and read their files (Sonarr, Radarr, Bazarr, Deluge) to the correct folder. But I also need to be able to read and write the dataset which I access via a SMB share.

You get it. It's a mess. My goal is to have the user "Media", which all the services will be run under in their jail (is that possible? Can you run a plugin under a different user?) and add "Media" to my group and set all permissions to 660. This way, every file created, moved and read is owned by "Media". Then I set ownership of the dataset "Plex Media" to the user "Media" and to MY group (which "Media" is in). This way, everyone can do what they need to do (because they are all run by the same user), and I can also read and write the files because "Media" is in my group and permissions are 660.

Only problem: I have no clue how to do this! And I hope you can help me. Simply said: I want to create a user, and run every plugin under that user. I also want to set permissions for the files that every plugin creates.

Info:
All the services are installed as (community)plugins:
  • Plex
  • Sonarr
  • Radarr
  • Deluge
  • Jackett
  • Bazarr
The desired user is "Media"
Doing things through a VM... have you found it challenging to get the VM to access the filesystem??

I have everything in /mnt/<folder1>
/mnt/folder2

I plan on using many similar services as you.

The Plex plugin nor the torrent plugin play nicely together... it's been a few days now.
I was able to install tautulli and qbit in the same jail as the plex jail... however plex now crashes every couple of hours and I can't write files to any other folder but /downloads.

So weird.
 

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
Doing things through a VM... have you found it challenging to get the VM to access the filesystem??

I have everything in /mnt/<folder1>
/mnt/folder2

I plan on using many similar services as you.

The Plex plugin nor the torrent plugin play nicely together... it's been a few days now.
I was able to install tautulli and qbit in the same jail as the plex jail... however plex now crashes every couple of hours and I can't write files to any other folder but /downloads.

So weird.
I now have a different setup but my old setup worked perfectly too: I had one Ubuntu vm running and installed everything on there. Because everything was installed on basic Ubuntu (the VM) it all worked fine alongside each other. All services ran under the user and group "media" and I added myself and Plex to the media group. Then it all worked fine. Because all files were owned by "media" and all services were run under "media" so permissions worked fine. I had the "Plex Media" network share mounted in the VM so all services could access the media files.

Now I have Ubuntu as the os with TrueNAS in a VM. The rest is the same. I switched it around because now it's way easier to expand the hardware. GPU has been added, hba card (leading to more SATA ports available) has been added and passed through to the TrueNAS VM. I'm planning on expanding the RAM to 64GB. The OS and VM's OS now run on a m.2 ssd. The list goes on and on.
 

norseman

Dabbler
Joined
Sep 24, 2019
Messages
14
Thanks! I am running on a TrueNas Mini X+.
Now considering running in the VM but I am afraid I won't get any of the ZFS benefits, l2arc etc but will give it a try.

Thanks!
 

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
Thanks! I am running on a TrueNas Mini X+.
Now considering running in the VM but I am afraid I won't get any of the ZFS benefits, l2arc etc but will give it a try.

Thanks!
Running TrueNAS in a VM will work fine and you'll have all the features available to you if you set it up correctly.

I have an hba card installed (non-raid PCIe to 4x SAS to (4 ports X 4 SATA per SAS =) 16 SATA connections) that is passed through to the TrueNAS VM. Because the complete hba card is passed through, every SATA device connected to it gets passed through automatically too. So I just have all my HDDs connected to the hba and that makes them available to the VM. The SATA connections become the connections of the VM. Everything I connect to them automatically gets passed through to the VM.

All zfs features will work because TrueNAS is running in a VM, and that's what VM's do: make everything inside them work like they would if they were on a normal computer. So l2arc, de-duplication, hot spares, snapshots, etc. will all work if you pass the devices through correctly (which they are if you, for example, set it up like me with the passed through hba card).

The way I did it, with the os as Ubuntu and truenas as the VM, gives many opportunities for expansion and freedom. All my hardware upgrades are effective to my Ubuntu os, who will most likely need them. And otherwise I have the freedom to pass the hw through to the VM. The other way around, I couldn't have had the GPU being used by Plex. Now it can be.
 

5hepherd

Dabbler
Joined
Feb 24, 2023
Messages
23
Running TrueNAS in a VM will work fine and you'll have all the features available to you if you set it up correctly.

I have an hba card installed (non-raid PCIe to 4x SAS to (4 ports X 4 SATA per SAS =) 16 SATA connections) that is passed through to the TrueNAS VM. Because the complete hba card is passed through, every SATA device connected to it gets passed through automatically too. So I just have all my HDDs connected to the hba and that makes them available to the VM. The SATA connections become the connections of the VM. Everything I connect to them automatically gets passed through to the VM.

All zfs features will work because TrueNAS is running in a VM, and that's what VM's do: make everything inside them work like they would if they were on a normal computer. So l2arc, de-duplication, hot spares, snapshots, etc. will all work if you pass the devices through correctly (which they are if you, for example, set it up like me with the passed through hba card).

The way I did it, with the os as Ubuntu and truenas as the VM, gives many opportunities for expansion and freedom. All my hardware upgrades are effective to my Ubuntu os, who will most likely need them. And otherwise I have the freedom to pass the hw through to the VM. The other way around, I couldn't have had the GPU being used by Plex. Now it can be.
So are you running the VM on TrueNAS (as in created a VM with TrueNAS)? Or, did you make a VM, install TrueNAS on it, and then also install the ARRs and SABnzbd on that VM (outside TrueNAS)?
 
Top