Jay Taylor's notes
back to listing indexThe Complete Guide to Building Your Own Personal Streaming Service Powered by Docker and Plex : Piracy
[web search]The Complete Guide to Building Your Own Personal Streaming Service Powered by Docker and Plex
hundreds of incomplete, intelligible tutorials and videos
Yeah, that pretty much sums up my experience with anything linux, lol.
See it like this: You learned a bit on the way and got some information you can only aquire by searching yourself...
But I feel you. Started with a RaspberryPi 4 and docker and now have all my services (radarr, sonarr, jackett, resilio and jellyfin) up and running
You're far better off learning and doing the way you did instead of having it handed it to you.
I'm sure you've already identified some things you would like to improve on your setup by reading this guide, but nothing really beats getting down in the digital ditch and doing the hard work on your own from time to time.
This is a great guide. I just built my own NAS with unraid. I can use this as a guide.
Damn, I just installed all these programs on my windows pc and everything just works. Been that way for months.
If you combine everything: Have it all in one network on one device. Easier to manage. Docker is also better than virtualization for such small services.
If you only run Plex on a Windows-PC (server) there are no advantages.
Only advantage to this: If you don't like/want Linux
Not running windows.
That’s about it. With WSL2.0 you can even get all the advantages of docker within windows. If you’re planning to run it on dedicated hardware you can save a lot of resources by not running windows. If you want a machine to just act like a server Linux is often faster.
Great guide, thank you. I set mine up about a month ago on my Synology NAS and it's all working beautifully.
I hope you don't mind me also recommending these guides for newcomers, as they helped me immensely in terms of using the correct file structures and Synology-specific examples:
https://wiki.servarr.com/Docker_Guide
https://trash-guides.info/Misc/how-to-set-up-hardlinks-and-atomic-moves/
Let me also plug a guide I wrote that covers many of the same topics from the perspective of (Synology) NAS owners:
https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/
I actually had an issue while writing this about hardlinks where that explanation would have been useful! I eventually figured it out in a purely docker context, but it's actually great that someone has broken it down into pieces specific to the arr suite.
Thanks for this! I recently switched from a bunch of file servers + kodi to plex, and then started thinking about giving sonarr/radarr a spin. Now might be the time.
Quick question: why docker instead of bare metal via your package manager? Seems like the latter would be easier to set up and maintain when you're only setting up one system, but that's probably just my ignorance of docker.
Sonarr is probably the best piece of software you can use along with Plex. I have it running with Plex on my family computer and it manages the whole thing perfectly.
My question woulde be, why docker if there's all those symbolic links and plenty of stuff I got to setup manually?
I once got a script that I could run on a kimsufi and it set it all up for me. I don't see the advantage of using docker here if I'll be setting up things outside of it anyways
You can think of docker like a lightwight virtualization (like esxi or virtualbox). The advantage: Containers are like little isolated programs running within the docker engine. They can't reach out except if you allow it. Like folder binds.
Container sees this:
• /media
Your bind on the host could be:
• /user/appoxo/media/movies
Your container can only see a /media folder but it redirects it to your actual media folder.
Wow what a write-up. Will take a look tomorrow. I'd definitely use jellyfin over Plex though
Came just to see if I could piggy back off of any comments for Portainer. It really makes all of these much easier to manage.
Second this, no reason to pay Plex for basic features.
Luckily the above guide shouldn't be hard to adopt. Most of the steps are the same, with just some googling of jellyfin-equivalent steps
Only downside is Jellyfin has a garbage roku app at the moment :(
Plex also has a history of deleting people before they hit that limit. Jellyfin and Emby really cater to the "entrepreneurial" individuals, which I don't personally support. Older media should be free, no matter who's hosting it.
Thank you for this. This is awesome. I apologize for this noob question as I'm very new to Linux, but is it possible to use my existing external hard drives with out formatting them? I have plex server on my PC, but want to move it to my Raspberry PI 4 so I can always have it running.
Depends...Afaik Linux can use NTFS but (so I read) it has more overhead than using ext4.
If you have questions about it running on docker with a raspberry pi I could try to help you :)
If you just want to try it out: Make a backup of your files and just plug in into your pi and mount it.
Warning: If you have external drives without it's own power supply it wont end good. The Pi will run unstable with 2 external drives.
This is truly the best post I’ve ever seen in a subreddit, I mean seriously...just wow. You’re awesome dude. I wish I could give awards or something.
Why do you think it's a lot of unnecessary hassle?
A lot of people run setups like this on seperate computers, virtualized machines, or raspberry pi's(wich don't support windows as far as I'm aware).
Linux is also free, doesn't spy on you, low-resource friendly and very stable.
Of course if you don't know any linux then it might be intimidating. But for someone that knows some linux it makes much more sense to set something like this up on a linux server. In my opinion it's also so much better working with a terminal then a GUI(god i hate windows server).
Why would you use windows for something like this? The only real reasons is because thats what you know how to do, or you dont have a pc you can install linux on. Which is totally valid reasons btw.
But I have a spare server and I spin up a VM, install linux and my media server and just leave it there for weeks/months without having to manage it.
There's also many great advantages of running services like this through docker. It's really easy to pull and run a image. Write a short docker-compose and save configurations and user data with persistant storage. The rest of the container you can throw away when it breaks. It's also easy to update(just pull the new image) or roll back to a previous image, which I personally have had to done a few times.
There's many great advantages to use linux for something like this and many other things. Almost all servers in the real world run linux for a reason.
But don't get me wrong, Windows is fine as well, personally I just wouldn't pick it for something like this for all the reasons mentioned above and probably more. I'm not a Microsoft hater, I use Windows 10 for my personal computer and lots of Microsoft cloud products privately and for work(IT).
And doesn't require paid subscription in order to use your own hardware for accelerating transcoding!
It's definately better in that it's open source and free, but Plex is just nicer. Plex made it easy to add friends and family to the ship's crew (arr).
Ideally, yes. Radarr/Sonarr scrape sites via Jackett in two ways: one is getting an updated list of everything in the category (low server impact), the other is by searching the indexers for something specific (high server impact). By leaving the machine on, you can both help the indexer (that you're no longer supporting through ads) and you can seed more which helps the entire community.
You don't have to convert your whole system either. 90% of these steps can be reused on a Raspberry Pi 4B for $55 for the 4GB model (min recommended RAM) and a USB hard drive. Would that interest anybody? I could add a rPi section to the appendix.
I am planning to build a budget server in a few months, and this is perfect for that. Thank you!
Great write-up! You can obviously use Plex alternatives for multiples logins and whatnot if you don't want to pay.
....And instead of buying a vpn for port forwarding and ssh. I would suggest using an actual vpn(since the definition of vpn is used differently for something like PIA or NordVPN, etc.) I would suggest to use ZeroTier instead its free and you can connect up to 50 devices on a single network(pay for more devices), the network itself is very secure. You can manage all your devices from your account as well.
I recently had to rebuild my Plex server and ended up sticking with Windows because I'm comfortable and could get it back up faster. However I intend on building a new Linux server and this guide will come in handy for sure!
I would also suggest using Tautulli for tracking watch history, media, etc. It also comes with a very user friendly mobile app.
I also use Ombi because it has a nice interface and allows my parents to request new TV shows and movies without needing to text me (My dad still does because he says it's easier).
There is also an app for Android called nzbGet360 that allows me to manage my torrents, nzb, Sonarr and Radarr all within a single app.
Some quality of life additions to look at would be:
Tdarr which allows you to convert your media into whatever you need. I'm currently in the process of converting everything to h265 to maximize storage space.
Bazarr which scrapes your media and finds subtitles for them through a whole bunch of different configurable websites.
Source: Have been hosting my own Plex server for many, many years. I also stick with Plex because it is the most widely accessible program and has a familiar feel to the usual streaming services
It’s used for seeding, which may feel unnecessary but it’s critical the peering network to function. And because you’re behind a VPN, there’s no risk to you for enabling it. I heavily suggest it only because there are so many leechers.
This is fantastic. It’s also worth noting that for individuals who’ve never dabbled in Linux or command line before there are hosted services you can buy that have “one-click” installers for Plex, Sonarr, Radarr and more.
They do, you specify the key (device) you want to use and it'll give you a random port for the given server.
But even when hosting your own server with PLEX, when I upload my video files they will get scanned into the library and eventually be shared with Plex, no? so what are my chances that my account would get suspended / banned due to copyrighted material?
I know of several cases where people uploaded such files Plex's cloud solution which resulted in their accounts getting cancelled due to copyright infringement. They only way I can see to circumvent this is to set up my own fileserver, upload all the videos and then use SFTP with KODI to sync up my library. Any better ideas than this?
Plex cloud was actually canceled, so your media will sit on your drive and go nowhere else. As far as I know, Plex Inc does not care what content you have stored locally. This could all change with one lawsuit, but I’m willing to bet Plex knows their true business model.
This guide was quite literally EXACTLY what I needed! The only unfortunate part is I use an AMD GPU. Think you could add AMD GPU support to future versions of the guide?
AMD support on Plex is a little hacky at the moment. While AMD has a custom software interface for fast encoding/decoding, most software (including ffmpeg, which both Plex and Emby use) instead defaults to vaapi.
Instead, I’d recommend using Emby for all AMD acceleration.
I don’t have a recent AMD GPU to test unfortunately, and now is not an easy time to get one. I’ll see if I can wrangle an older card from my friend group.
Thank you for this write up. I’ve saved this. I currently have an older host that’s running on Ubuntu. When it’s time to replace it, what are the advantages of running it on docker?
Mostly maintainability. Swapping in and out services or updating containers is a cinch compared to having to go through a package manager and clean up the crud yourself.
It takes about 30 seconds including download time to update every service you see in this guide, compared to having to individual grab binaries or get a release from GitHub.
It also makes it a cinch to add other services to the same host that otherwise might live at odds, like the UniFi controller or even separate instances of Radarr/Sonarr (which is unfortunately the best way I’ve found if you want to get both 1080p and 4K releases).
Lighter resource utilization with Linux server. Dedicate more of the horsepower to the apps and not the OS. Faster rebooting.
Docker compartmentilizes the apps so they don't break each other or the operating system. Easier to upgrade and maintain.
This is awesome! Would love a rclone/gdrive/mergerfs implementation section as well!
I wouldn't doubt for a second that this is THE post to give my free award. Kudos.
I do have one question though, and this is mostly for convenience reasons as my desktop is the most powerful computer that can surely handle a server task; is it possible to use only Windows? If so, how?
I'm sure I can get my hands on a lower end PC and have it running in the background, but if it'd be great if I could avoid doing so.
Is transmission the recommended torrent for this setup with vpn? Can I use qbittorent?
God I wish I had this a year ago. Do you think a future iteration might also include instructions on Usenet / sabnzb?
Thank you so much I've been fighting with linux and docker for months now(trying to run it all on an old pc) and this is the most concise write-up for linux server ever dear lord thank you so much
I could have done it all myself, but this is such a complete setup, this is almost art...
If I had to suggest a VPN service though, I'd say use Wireguard. It's a faster, newer and easier protocol to set up and use, it allows you to connect from anywhere to your home.
Fantastic job here! The only thing I'd change would be Jellyfin but other than that awesome!
This is a great guide, and I might follow it as I've always felt like I "should" set it up this way.
One thing I don't see answered that maybe you or someone else can for me is "but why?"
What makes this way so much better/worth it than just doing it in windows with 5% of the complexity?
but why
Automation! It's much easier in the future once you lay the groundwork now. I don't even look at trackers anymore, the latest episodes just appear in my library.
It really depends how much you watch and how easy you want to make it for your friends and family that you hopefully share with.
if you have a good client, smb is enough. just link your hdd to a raspberry pi, setup smb and enjoy. get sonarr/radarr and qbittorrent if you want to automate downloads.
if you’re in the Apple ecosystem, use infuse as the client, it’s the best (makes everything look like netflix). on Windows/linux/android vlc will do it but it looks like shit ♂️
Great post. I’m looking forward to what you write about Let’s Encrypt. I’ve been trying to figure out how to add Traefik2 to my set up for about a month now.
What is the advantage of using docker and not directly install it on Linux? I have no problem installing things on Linux and doing configurations, but never used docker for anything.
Also I use jellyfin, it's not as mature as Plex but it's completely opensource and free (for all platforms)
Thank you so much, I was just dreading all the research and crappy/outdated tutorials I was going to have to try to wade through. Great job.
This is a beautiful guide. Should be pinned :p Definitely saved for reference if I ever go and get my own dedicated server.
This is really cool, but it’s a lot for me. I achieve the same end result with windows, plex and a BitTorrent RSS feed.
I have a pretty much similar setup in my Synology DS218+ and it never lets me down getting content and having it ready for Plex (also powered by the NAS) somewhat I feel configuring a setup like this is a bit more cumbersome on Linux (even when my NAS has Linux lol) but yeah, there's a bit of joy doing this work (or maybe not a bit).
Definitely this is a dream setup which I don't think I'd ever dreamed about when I was a kid.
Why do people use linux for their servers? Sorry, maybe it's because I'm not that familiar with the OS, but I've got mine running on an old computer and I ave zero issues.
Linux is just very lightweight. Out of the box, it doesn't even output a video signal when running as a server and uses very little RAM. It also has exceptional software support with programs like Docker.
Asian countries seem to favor centralized piracy services over BitTorrent, so it's possible you will have slower speeds than in the US or EU, but all the technology will still work.
Question on plex, I tried setting up on the nas and it takes so long to load up the video files is that normal or perhaps a setting I'm missing?
To be fair it's two 10 tbs drives, the movies 10tb are all on a single folder, seasons are in separate folders of course
I'm willing to bet that the client is attempting to transcode the file, which is CPU intensive and probably more than the NAS can handle.
Check that "Disable video stream transcoding" is checked under Settings->Server->Transcoder.
Let's see. Most stuff is installed via docker containers, so you could as well use a Windows/Mac/BSD server instead of Linux.
Also, I'd recommend creating an Ansible playbook (far as docker images go, one can grab self-host seedbox build instead) to handle much of that stuff.
Thanks for this, bookmarked for this weekend to give it a good try setting up!
I just set up something very similar to this but with Xpenology (Synology OS for non-synology BYO hardware). Runs beautifully and as its on a repurposed thin client, it’s super quiet, small and power-efficient.
You can configure Sonarr/Radarr to change file names, but it’s actually advantageous to leave the file name as-is because it will enable you to find subtitles specific to your release group in Plex.
I'm interested on trying this, but I'm completely new to this and have zero idea but willing to learn.
My biggest question tho is, what PC spec should I build for this? Do I need a strong PC for this? Or I can use low-end PC for this?
Can anyone please recommend me a spec or if there's something I can buy already built for this kind of thing like Raspberry Pi.
RPi can run the whole stack but will suffer if you ever want to transcode to a lower bitrate or if you use a device without native support for the encoding of the file (some smart TVs, for example, will not be able to decode HEVC/h265).
If you do want to transcode, any Intel processor from 8th gen forward (including the cheaper i3) will have “Intel UHD graphics 630” built-in, and is the gold standard for up to 6 simultaneous transcodes in Plex.
I will be adding a Pi guide later today.