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.
Do I download the Ubuntu server to my USB flash drive or to the computer and can you do a video please with the steps
Windows is slightly less efficient because it’s rendering the GUI all the time, but it’s close enough that you won’t see power savings in any meaningful amount.
If you already have the arr suite with a torrent client that has VPN, I’d say you’re already set. This guide was for people who are starting from scratch in what I would consider a “best practice” way.
Why should I do this over making a simple Plex server on my Windows PC?
Cause honestly... You've written a LOT of words and steps here
Automation! Spend 3 hours now to save 10 minutes later every time you want a new file. It obviously only pays off if you download 18 or more files, but it turns a slow, difficult (finding a release, avoid ads, etc) process into a type and click one.
any tldr to why this is all necessary? when i set up plex i literally just installed the server on my pc, added my media, and i was good to go. is this more for remote viewing? because i mainly just use it on my home network
This is for automated searching, downloading, and managing your media. If you wanted to watch a recent movie, how would you get the file to your Plex?
Although I already have mine setup, this is an awesome informative post for newcomers. Thank you for giving back to the community
It depends how many users and what clients you’ll have. In all honesty, a raspberry Pi 4 has enough processing to handle all of the searching and downloading, and can even serve Plex if direct streaming.
If you want to save media to your phone, watch on older devices, or stream across the internet you probably want at minimum an Intel CPU with UHD graphics 630 (almost all desktop processors from 8th gen onward, including i3). A baseline motherboard (no overclocking, crappy audio, no wifi) with 8GB of ram is plenty, and the rest of the budget should go to drives. If you want to expand your storage budget, I suggest “shucking” WD external hard drives. You won’t get a warranty, but you’re looking at 12TB for $180 (on sale) vs $400 for a WD red drive that is essentially the same.
Torguard is based in nuremberg, Germany is part of 15 eyes. Does that concern you at all?
For single-user piracy, I don't think it matters. I wouldn't host a tracker in the 15 eyes, but lil-ol-me probably doesn't concern the intelligence agencies enough just downloading a few movies a week.
It's problematic and I wish it didn't exist, but the 15 eyes are unlikely to bother me.
Is it possible to enable hardware transcoding without plex pass? On their site is says: "Hardware-accelerated streaming is a premium feature and requires an active Plex Pass subscription"
Or is there a crack?
So how would this work on Windows? Would you just install all of these programs on a fresh install?
You can use Docker Desktop on Windows to a similar effect, but you'll have to change the paths to windows type paths.
Like this
transmission:
image: haugene/transmission-openvpn
container_name: transmission
volumes:
- C:/Data:/mnt/data
This is ... honestly the best guide I've seen.. and coming from the *Arrs, we've seen a lot of bad guides.
a few points of feedback:
Radarr and Sonarr should absolutely not be on preview at all. Preview is for nightly/alpha testing builds and not for general public consumption.
Qbit > Transmission
You're giving plex and your download client a bit more access than they need. They can be restricted to
/mnt/data/media:/mnt/data/media
and/mnt/data/downloads:/mnt/data/downloads
respectively
Otherwise, an excellent write up; I'd also suggest linking trash's guide and the docker guide as well
you can also link the radarr quickstart guide :) https://wiki.servarr.com/Radarr_Quick_Start_Guide
we're hoping to get one built for sonarr...soon(tm)
A $40 RPi 4B, $20 power and case kit, and a $180 GB 12TB external is what I’d consider minimum, and it should work excellently for all purposes but transcoding.
Deleting from the /mnt/data/downloads directory will not save you any space, because the two files point to the same 1's and 0's on your hard disk.
How? For instance for me it downloads everything first to my c drives download folder and copies and pastes it inside my d drive where i keep all my plex stuff. If I delete what i downloaded from my c drive it affects the space i had previously there. I even checked using windirstat and I don't have any hidden files relating to plex inside my c drive
Is there something wrong with my sonarr/radarr setup?
I delete those files from my C drive because they do nothing and take up space while my d drive holds everything to my plex server
Different drives (really, different file systems) means that the data has to be replicated across drives. If you download first to the D drive, you’ll be able to use hardlinks.
Here’s an eli5:
You have two sets of friends, each of which refer to you by a different nickname. You’re still the same person, whether you’re called “Robert” or “Bob” (filesystem handles), you just respond to both names. If both friends have a party (two filesystems) at the same time, you can’t attend both, since you’re only one person (one spot on the filesystem). If the parties are at the same location (filesystem) however, you can attend both.
In contrast, if you have an identical twin (a copy), then you and your twin can have separate names like before, but you’re also separate entities who can attend both parties at the same time. The requirement for this though is that you both take up space and resources (two copies on the filesystem).
I for now don't understand it, but thank you so much for your effort. I'll try it later because I love doing these things.
I am an absolute noob at this, but how would I make it if I wanted to use his setup but keep my media on a nas?
I got a NETGEAR nas a few months ago, it is too lacking for actual streaming and PLEX but I got a few Tb worth of storage space on there.
Essentially I would download the files to the linux server, and upload them to the NAS, and use the Linux tower to serve as the media server while having mount points for the NAS, if that makes sense.
Would love an addition that adds outside access so I can use my server when travelling other than that, great review
Edit: so I figured out the trick to outside access on the same PC as your VPN. It requires a VPN capable of split tunneling which my provider (Nord) does. To make it work, set up split tunneling to allow Plex media server and any other related tasks that have to do with PMS to the whitelist and they will be allowed through so that you can continue port forwarding as usual. All other programs not allowed through will be going through the VPN so torrenting services can continue to operate.
Also can set up a kill switch to disable internet if the VPN connection drops.
So i've got this all up and running but now i have no idea how to access my transmission web interface...
Also thank you so much having the vpn is so nice, no more scary comcast emails.
Accessing the transmission web interface is pretty easy, you just go to http://machine-ip:9091. The only hard step is making sure the LOCAL_NETWORK
variable in the transmission compose entry is set to your home IP range (most common is 192.168.1.0/24
), or else the return traffic will be sent out the VPN tunnel.
How did I just find this? Great write up! I wish you could write this off on your taxes as a charitable contribution lol.
Is there still plans to add a rpi section? I’m planning on doing this with a pi3 to Plex on my tv( lg cx) and I believe my lg cx can handle the transcoding. So I should be able to watch 4K?
Also what about kill switches on vpn’s? I got PIA, what happens if the vpn connection is lost, does it automatically stop seeding/downloading?
Thanks again.
16 more replies
Hey guys,
Presenting, Music Downloader for Android, built using Flutter and youtube_explode library which doesn't depend on YouTube data API and can directly download audio steams from YouTube URLs or search queries.
The app is minimal and is based on Neumorphism design.
Current features:
Full query YouTube search
YouTube url downloads
receive share intents directly from YouTube app or browser
Can basically download audio Streams from any YouTube video.
Since the app doesn't depend on YouTube data API you can have limitless downloads without having to worry about API usage quotas
Here's the github link if you want to check out the full source code :
https://github.com/hippedorange22/YtDownloader
Star the repo if you like the app.
Following features planned if there's interest,
video downloads
Spotify support
download path picker
Choice of which video to download the data from
Dark mode
In app video playback without ads like YouTube Vanced Etc.
You can find the latest stable apk in my repo's release section.
Let me know what you guys think.