r/Piracy • • Mar 21 '21

Guide The Complete Guide to Building Your Own Personal Streaming Service Powered by Docker and Plex

Introduction

Plex Media Server is an excellent application, with compatible apps on almost every device with a screen. However, it's only as capable as the files you give it, and it's only as maintainable as the infrastructure you use to build it. This guide will cover installation and configuration on a flexible service platform known as Docker.

Docker is relatively operating system agnostic, but this guide will feature Linux commands and paths so it will also cover installing Linux.

Operating System

If you're an experienced Linux user, you can skip this step as you likely either already know how to install Ubuntu Server or you have another Linux distribution preference.

Download Ubuntu Server from https://ubuntu.com/download/server. Use unetbootin to push the ISO onto a USB drive (just copying the contents will not work) or use a CD burning tool to burn the ISO onto a CD.

On a new machine, all that should be required is to insert the USB drive and boot. If updating over an existing operating system, find your boot menu (or boot options, as it's sometimes called) and select the USB drive as the boot device.

Read the next part fully before proceeding with the install.

Take note that the installation can destroy data if you're installing on a system in use. I recommend disconnecting your media drives and leaving only the drive that you intend to let Ubuntu use. If you're dual booting (keeping windows on the same machine), this guide does not apply and you should search for a guide particularly for "dual booting".

Follow the prompts to install and configure your Ubuntu Server, but ensure you do not install docker during the setup. Ubuntu Snap uses an often outdated version of docker that we want to avoid.

Also make sure "Install OpenSSH server" is checked or you will not be able to access the machine remotely.

When the install has finished, reconnect your drives and boot up.

Connect to the machine remotely from an existing Windows 10 (via Command Prompt), Mac (via Terminal) or Linux computer (via Terminal) with

ssh your-username@serverIP

where your-username is the username chosen, and serverIP can be found with the command ip addr show (usually the one prefixed with 192.168.

Using Symbolic Links to Keep Media on the Same Drive (option 1)

While not recommended for portability reasons, if you are using only one drive for your Plex server, just run the following commands to create a "symbolic link" to continue with the tutorial:

mkdir /mnt/data
mkdir ~/plexmedia
sudo ln -s $HOME/plexmedia /mnt/data/

Auto-Mounting a different Drive(s) (option 2)

Once you've installed and are at a console (preferably via ssh so you can copy+paste the rest of the commands), ask the disk format utility what the available filesystems are with the command:

fdisk -l

You should see a list of entries at the bottom of the command, all beginning with /dev. If this is a new drive, please read the formatting a new drive for Linux section in the Appendix.

For each drive you wish to auto-mount, you must edit the file /etc/fstab by using the command sudo nano /etc/fstab and add a line entry at the bottom like the following:

/dev/sdb1 /mnt/data ntfs-3g uid=1000,gid=1000,dmask=027,fmask=137 0 0

The 1st column should be the path of the drive shown in fdisk -l, the 2nd column should be the destination for the mount (you must also create this destination using sudo mkdir /mnt/data), the 3rd column is the type of filesystem contained in the partition (ntfs-3g for Windows-format drives, ext4 for Linux-format) the 4th column is options (which you should copy unless you want different permissions), and the 5th and 6th columns are not used and therefore filled with 0s.

For space saving in a later step, it is imperative that you have your downloads folder and media folder on the same drive. I promise you it will save both space and disk operations.

Tip: To edit the fstab file on the command line, you can use either sudo nano /etc/fstab or sudo vim /etc/fstab. Both are what is called a "plaintext editor", but nano is easier and generally recommended for beginners.

Tip: Whenever you prefix a command with sudo, it runs as a "root user" or the administrator for the system. sudo actually means substitute user do and "substitutes" the root account for the rest of the command. Some files can only be changed by the root user, but be careful when running as sudo!

Once you have added all entries, verify that everything works with the following "mount all" command:

sudo mount -a

This guide will assume you mount at /mnt/data and that your drive contains /mnt/data/downloads, /mnt/data/media/tv, and /mnt/data/media/movies as subdirectories.

Installing Docker and Compose

Once you've installed, rebooted, and logged in you should be left with a fresh install of Linux. We're going to keep it that way by only installing two things: docker and docker-compose.

Docker

Docker uses their own repository that contains up-to-date version of docker. To add it to your Ubuntu system, use the following commands.

Get the prerequisite packages for adding a repository:

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

Add the keyring that authenticates the repository:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add the repository itself:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install the package from the new repository:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Lastly, add your current user to the docker group so you don't have to be root every time you want to interface with docker

 sudo usermod -aG docker $(whoami)

You'll need to sign out and back in.

Tip: You can either type exit or use Control-D to log out.

Compose

Compose is simpler than docker install, with only two commands required:

sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

Building the Compose File

Docker-compose uses a yml (yet another markup language) file to create and maintain docker instances for you.

All compose files contain a version string and a services object. The version string for this guide is 3.0, so the file will start out looking like

version: "3.0"
services:

Save the file as docker-compose.yml (using nano docker-compose.yml or vim docker-compose.yml) in a new directory called plex in your home folder.

Tip: You can create folders using mkdir your-new-folder-name, browse into them using cd folder-to-enter, and exit to the parent folder using cd ..

Tip: Your home folder is located in /home/your-username and you can switch to it at any time using cd ~. All commands except those run with sudo will recognize ~ as your home directory.

Jackett

Jackett is a all-in-one torrent query engine, and more importantly, it is searchable by the other automated components of our docker stack.

An example entry for the compose file is:

jackett:    
    image: linuxserver/jackett    
    container_name: jackett
    environment:    
        - PUID=1000    
        - PGID=1000    
        - TZ=Americas/New_York    
    volumes:    
        - ./config/jackett:/config    
    ports:    
        - 9117:9117    
    restart: unless-stopped

Ensure it is indented under services

Transmission-OpenVPN

In order for our traffic to remain private and secure, we will use a downloader enabled by an OpenVPN provider of your choice. I use TorGuard, but you can use any provider in the supported providers list.

An example entry for the compose file is:

transmission:    
    image: haugene/transmission-openvpn    
    container_name: transmission
    volumes:
        - /mnt/data:/mnt/data
    environment:
        - PUID=1000
        - PGID=1000
        - CREATE_TUN_DEVICE=true
        - OPENVPN_PROVIDER=PIA
        - OPENVPN_CONFIG=ca_toronto
        - OPENVPN_USERNAME=username
        - OPENVPN_PASSWORD=password
        - WEBPROXY_ENABLED=false
        - TRANSMISSION_DOWNLOAD_DIR=/mnt/data/downloads
        - TRANSMISSION_IDLE_SEEDING_LIMIT_ENABLED=true
        - TRANSMISSION_SEED_QUEUE_ENABLED=true
        - TRANSMISSION_INCOMPLETE_DIR_ENABLED=false
        - LOCAL_NETWORK=192.168.0.0/16
    cap_add:
        - NET_ADMIN
    logging:
        driver: json-file
        options:
            max-size: 10m
    ports:
        - "9091:9091"
    restart: unless-stopped

Update the following:

  • PIA to your provider
  • us_east to the VPN server you use with your provider. A list of servers grouped by provider is available here. It is recommended that you use a provider and server with port-forward capability.
  • username to the username you use with your provider
  • password to the password you use with your provider
  • 192.168.0.0/16 to your local network segment (if you access your router at http://192.168.1.1, the existing information is correct).

Additionally, the PUID and PGID variables should mirror the pid and gid you set earlier in the /etc/fstab portion of the guide. If you're following this guide exactly, they do not need to be changed.

Sonarr

Sonarr is a TV show scheduling and searching download program. It will take a list of shows you enjoy, search via Jackett, and add them to the transmission downloads queue.

An example entry for the compose file is:

sonarr:
    image: linuxserver/sonarr
    container_name: sonarr
    environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/New_York
    volumes:
        - ./config/sonarr:/config
        - /mnt/data:/mnt/data
    ports:
        - 8989:8989		
    depends_on:
        - jackett
        - transmission
    restart: unless-stopped

As in above, PUID and PGID must match the uid and gid of the drive mount.

Radarr

Radarr is similar to sonarr, but instead of TV shows, it is built for movies.

An example entry for the compose file is:

radarr:
    image: linuxserver/radarr
    container_name: radarr
    hostname: radarr
    environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/New_York
    volumes:
        - ./config/radarr:/config
        - /mnt/data:/mnt/data
    ports:
        - 7878:7878
    depends_on:
        - jackett
        - transmission
    restart: unless-stopped

As in above, PUID and PGID must match the uid and gid of the drive mount.

Plex

The Plex instance would ideally live on another server, but it's not required and adds complexity with file sharing systems.

Plex has an official docker image, but it does a poor job of managing permissions (which I've hoped you realized are important by now). Instead, we will use the linuxserver/plex image, which is maintained by the friendly folks at linuxserver.io.

The only caveat to this section of the guide is hardware acceleration, which is why for sake of simplicity I will provide three entries: one for CPU transcoding only, one for Intel GPU-based transcoding, and one for NVIDIA GPU-based transcoding.

For all containers (once again), PUID and GUID should match your fstab settings for pid and gid.

CPU-only Transcoding
plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    volumes:
        - /mnt/data/media:/media
        - ./config/plex:/config
    environment:
        - PUID=1000
        - PGID=1000
        - version=docker
    ports:
        - 32400:32400
    restart: unless-stopped

Intel GPU Transcoding

In order for Intel GPU transcoding to work, additionally install the intel-gpu-tools package, which will include both a command for monitoring our GPU's usage, and the underlying driver that makes it possible to use the GPU as a standalone device.

Install it with

sudo apt-get install intel-gpu-tools

Afterwards, add the entry:

plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    volumes:
        - /mnt/data/media:/media
        - ./config/plex:/config
    devices:
        - "/dev/dri:/dev/dri"
    environment:
        - PUID=1000
        - PGID=1000
        - version=docker
    ports:
        - 32400:32400
    restart: unless-stopped

NVIDIA GPU Transcoding

NVIDIA is the most complicated process of the bunch, but is still doable in docker. First, download the Linux drivers for your GPU from the official NVIDIA drivers page. After clicking search and the first download button, when you get to the last page that contains the text

This download includes the NVIDIA graphics driver

right-click the "DOWNLOAD" button and copy the link. Then, in your Linux server machine, run the following commands (copy one line at a time):

cd /tmp
wget -O driver.run [paste your link here, but don't inlcude the brackets!]
chmod +x driver.run
sudo ./driver.run

This will bring up a pseudo-GUI. Follow the instructions and reboot if asked. To verify that your NVIDIA GPU has registered, run the command

sudo nvidia-smi

It should output information about your GPU and current utilization. If it tells you it cannot detect an NVIDIA gpu, reinstall the drivers or try an earlier version.

Once the driver has been registered, the NVIDIA docker repository can be added with the following command (copy the whole thing)

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

And installed with this next command (copy the whole thing)

sudo apt-get update \
&& sudo apt-get install nvidia-docker2

Finally, we can add the following to our docker-compose.yml file (you may need to return to your earlier directory using the command cd ~/plex):

plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    volumes:
        - /mnt/data/media:/media
        - ./config/plex:/config
    environment:
        - PUID=1000
        - PGID=1000
        - version=docker
        - NVIDIA_VISIBLE_DEVICES=all
    runtime: nvidia
    ports:
        - 32400:32400
    restart: unless-stopped

Running and configuring the docker stack

Once the file has been built, we can start everything with one command while in the same folder as our docker-compose.yml file:

docker-compose up -d

The -d tells compose to run as a daemon, where logs are not printed to the console. If debugging, I suggest you remove the -d flag and run containers one at a time, e.g.

docker-compose up transmission-openvpn

Jackett

Jackett is only as good as the trackers you have added to it. Navigate to http://serverIP:9117 where serverIP is the IP address or local hostname of the Linux server.

Add a few indexers using the "add indexer" button. It may feel like a good idea to add a lot, but that increases search times for every single search. At minimum, I consider the following essential:

  • 1337x
  • EZTV
  • ETTV
  • RARBG

You can add YTS as well if you're OK with lower bitrate files, but I personally avoid them.

Congrats! You now have a multi-tracker search engine at your fingertips, or more importantly, the fingertips of Sonarr and Radarr. Keep this window open as we move to the next configuration step.

Radarr

Navigate to http://serverIP:7878 in order to access the Radarr console. We're going to change a few settings, starting with "Download Clients."

Under "Download Clients", press the add symbol and select Transmission from the bottom left. Name it "transmission", set the host as "transmission" and everything else can be left alone. Press test, wait for it to show a green checkmark, and then save.

Next, go to Indexers. Enable "Show Advanced" at the top menu bar under search. For each of the indexers you added to Jackett, do the following

  • Press the add symbol
  • Select Torznab
  • Go back to the Jackett window and click "copy Torznab Feed" for your index
  • Paste in the URL box, but change http://serverIP:9117 to http://jackett:9117. The docker containers address each other by their container name, not by your server's IP.
  • Copy the API key from Jackett (in the top right)

If you see a warning like

This indexer does not support any of the selected categories! (You may need to turn on advanced settings to see them)

You'll need to go back into Jackett, hit the wrench for the indexer causing the issue, and search for the category of "Movies." There are sometimes several. Copy each category you wish to search (for example, don't include Movies/x265/4k if you don't intend to watch 4K movies) and paste them, separated by commas, into the "Categories" box in Radarr.

Once done, it's time to add our first movie and define the destination paths for our downloads.

Search up a movie (preferably one that's recent and has seeders) in the top bar and select the correct movie. When the popup appears, click under "Root Folder" and select "Add a new path". Fill in the typing bar with /mnt/data/media/movies/ and press "OK". Select the quality profile desired (otherwise, it will select the most seeded) and check "Start search for missing movie".

View your transmission progress at http://serverIP:9091. The download should be added and everything should begin working. When the download finishes, the file will be "hard linked" to the /mnt/data/media/movies directory in a new organized folder. This enables you to seed your entire collection while also maintaining an organized file structure. 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. Similarly, when you want to delete a movie from your collection, make sure it is also deleted from /mnt/data/downloads.

Finally, we're going to authentication-lock Radarr by going to Settings -> General and selecting "Basic". Choose a username and password, but be aware that Radarr does not transmit the password securely (meaning you should pick a new password). This is optional but highly recommended.

Sonarr

Radarr is based on Sonarr and the same steps above should be followed, but this time at http://serverIP:8989.

The only other difference is that you should use the /mnt/data/media/tv directory as your "Root Folder" in order to keep the two libraries distinct for Plex.

If you opted for authentication on Radarr, you should do so on Sonarr with the same username and password. Otherwise, some web browsers will get confused.

Plex

This section is easiest done once you have at least one movie and at least one TV episode added. This can either be from Radarr/Sonarr or copied from an existing collection.

In order to set up Plex, the connection origin must appear from the same device that is hosting Plex. That means we cannot use http://serverIP:32400 just yet.

Exit out of your ssh connection and create a new connection, this time with the -L flag as follows:

ssh -L32400:localhost:32400 your-username@serverIP

This creates a "tunnel" from your device into the server that will allow you to configure Plex.

Now, navigate to http://localhost:32400/web to begin the setup.

Name your server something memorable (should be familiar to those who already use Plex), and uncheck "Allow me to access my media outside my home". Plex uses UPnP which only sometimes works on your router, but can cause serious security vulnerabilities.

When adding the libraries, create a Movies library using /media/movies as the path, and create a TV library using /media/tv as the path.

Fiddling with options

If not using hardware transcoding, this step can be skipped. Click the tools icon in the top right of Plex, choose the server from the dropdown menu in the middle of the left column, and under "Settings" click on "Transcoder". Check "Use hardware acceleration when available."

Future Goals

Well, you're done! You now have an all-in-one streaming service that will automatically grab new episodes of TV, chosen movies, and beam them using a nice UI to your various devices. It's a good idea to check out the Appendix for information on how to update your container, and how to secure your server with a firewall.

Future goals for this guide include:

  • Request Automation

    • Discord via Requestrr
    • Ombi
  • HTTPS support using LetsEncrypt (free certificates)
  • Access over the Internet

Let me know what's missing and what you're interested in seeing next!

Appendix

Partitioning and Formatting a New Drive for Linux

When a hard drive or SSD comes new out of the box, it does not yet have a file system on it (USB drives often being an exception). In Linux, formatting a drive is quite easy.

Find your drive by using sudo fdisk -l. Drives that are already formatted and partitioned will have numbers postfixed to them, e.g. /dev/sda1. When you see a drive with no number attached, it is not yet partitioned or formatted. Type the command sudo fdisk -l /dev/sdb if you are partitioning the second "b" drive in the system, and confirm that the "Disk model" matches the drive you expect to partition.

When ready to partition, use the command sudo fdisk /dev/sdb (replacing sdb with the drive you wish to partition). fdisk only writes the changes when you use the w command, so if you believe you have made a mistake, type q to quit and start over.

Use the n command to create a new partition, then continue pressing your enter key to fill in defaults until you return to the Command (m for help) prompt. Use p to print out the new partition layout (should be just one partition starting at 2048 and with the size you expect). If the changes are correct, type w to write the changes and quit.

Next, format the partition with sudo mkfs.ext4 /dev/sdb1 (replacing sdb1 with the partition you just created). If you are told there is already a partition signature, quit using Control-C and make sure you have entered the correct drive.

Congratulations, you have partitioned and formatted a drive in Linux. Return to the main guide for instructions on how to auto-mount the drive.

Updating the Containers

Updates are super easy with Docker. Navigate to your ~/plex directory using cd ~/plex and use the commands docker-compose pull and docker-compose up -d. Just like that, you're up to date!

Firewall

Firewalls are always a good idea, even on an internal network. Ubuntu comes built in with "ufw" or "universal firewall". The following commands will allow you to continue accessing your server, but block any nasty connections you don't intend to have happen (copy the whole thing).

sudo ufw allow 22/tcp \
&& sudo ufw allow 7878/tcp \
&& sudo ufw allow 8989/tcp \
&& sudo ufw allow 9091/tcp \
&& sudo ufw allow 32400/tcp \
&& sudo ufw allow 32400/udp \
&& sudo ufw enable

Press y to confirm the changes and the firewall will be online.

Monitoring GPU Usage

The following commands will show your GPU clock speed and usage. Both require the respective drivers to be installed, which has been done if you followed the guide.

  • Intel: sudo intel_gpu_top
  • NVIDIA: sudo nvidia-smi -l 1

Port-Forward Capable VPN Providers

Below is a partial list of port-fowarding capable VPN providers and regions. It is by no means exhaustive and is only the providers I have personally tested. If you know a provider and region that support port forwarding within the transmission-openvpn container, let me know!

  • PrivateInternetAccess (PIA)

    • Supported only in a handful of regions, but all work automatically
    • As of testing, those regions are

      • CA Toronto
      • CA Montreal
      • Netherlands
      • Switzerland
      • Sweden
      • France
      • Germany
      • Romania
      • Israel
  • TorGuard

    • Supported on every region, but only as a preconfigured option
    • Once you have chosen a server IP address and port, modify the compose entry by adding these two options to your environment entry under transmission:
    • -OPENVPN_OPTS=--remote theipgoeshere 1912 filled in with the IP address chosen
    • -TRANSMISSION_PEER_PORT=theportgoeshere filled in with the port chosen
    • -TRANSMISSION_PORT_FORWARDING_ENABLED=true with no modification
4.9k Upvotes

326 comments sorted by

537

u/[deleted] Mar 21 '21

A few notes:

  • This is admittedly a long guide, but I wanted to cater to everyone from those who have never used command prompt to those who are experience but haven't used docker.
  • The formatting isn't quite perfect in reddit, but maybe if this post gets enough attention we can fix it up in a permanent spot in the Wiki.
  • I was originally going to post this in r/PleX but was told they don't allow discussion of services that enable piracy. All I can say is "lol"

16

u/kingdazy Torrents Mar 21 '21

WhatBox uses similar "cut and paste commandline' tuts, and I've found them invaluable for doing the trickier stuff, not being a *nix savvy fellow. I appreciate this.

6

u/throwinmyjobaway Mar 21 '21

Some potential future additions:

Mergerfs to merge multiple drives into a single "drive"

Snapraid to create parity for your mergerfs drives (if one dies, snapraid can recover it)

I used the linuxserver.io "The Perfect Media Server" as my guide for those two.

and maybe offer a few more options for the torrent client. I personally loathe using Transmission's webui, and use markusmcnugen/qbittorrentvpn instead.

6

u/Very_done Mar 21 '21

I think I'm too dumb to Understand this either way, but thank you for your hard work

4

u/Oujii Mar 21 '21

I urge you to test ufw with docker as in all my testing up to last year, docker would create a rule on iptables and by pass any configuration you did with ufw. I even found a script a guy created in order to properly make docker work with ufw.

2

u/yesman_85 Yarrr! Mar 21 '21

Try rdt client if you want to download much faster without having to worry about a VPN. You just need a real debrid account.

→ More replies (2)

2

u/MazMazda3 Mar 21 '21

Mate, your work is treasure, we aren't appreciate it.

2

u/lutkul Mar 21 '21

Thank you dude. Might hook my raspberry running pi hole up with a hard drive and try to get Plex working. Seems like a fun project. I definetly saved this post and the pastebin markup.

0

u/[deleted] Mar 21 '21

[deleted] — view deleted comment

82

u/[deleted] Mar 21 '21

I have a local copy, and I see 450+ upvotes so hopefully there are 450+ other copies now. I hope to see this reposted in other communities, I just don’t know where else would be a better start.

78

u/bookgook Mar 21 '21

Here's the reddit markdown saved to an encrypted pastebin:

https://0bin.net/paste/QQ4WYw9v#cHgNS+GXAwDN5Jxv71FJ-eSakVec+ZaFgnNea6tSoPS

6

u/Fraun_Pollen Mar 21 '21

You could also throw this into a public GitHub repo as the readme so you could also include some more examples

9

u/ElijahPepe Mar 21 '21

You could create a website with Gatsby and a "nice" domain (like plex.wiki/plex.guide, both are taken so you might need to get creative with that). I would be interested in helping develop something like that (aside from content itself, just the bare basics to get setup). Gatsby works with the Markdown format, so you can easily copy and paste everything you typed up here into there.

→ More replies (2)
→ More replies (1)

34

u/_Epir_ Mar 21 '21

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/

5

u/[deleted] Mar 21 '21

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.

8

u/rdmDgnrtd Mar 21 '21 edited Mar 21 '21

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/

38

u/12_nick_12 Mar 21 '21

I would recommend JellyFin TBH since Plex has the ~100 friend limit.

10

u/[deleted] Mar 21 '21

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.

10

u/[deleted] Mar 22 '21

Jellyfin [...] really cater to the "entrepreneurial" individuals

Jellyfin dev here. We absolutely don't cater to people running commercial piracy servers. We hate it with a passion and we're distancing ourselves as far away from it as we can (It's against our community rules to talk about it on all our official platforms)

→ More replies (2)

8

u/Oujii Mar 21 '21

What do you mean by "entrepreneurial" individuals?

0

u/[deleted] Mar 21 '21

[deleted] — view deleted comment

14

u/Oujii Mar 22 '21

I see. I don't agree that Jellyfin caters to that audience, they just cater to the open source audience and people that don't wanna be pay walled behind basic features, like gpu transcoding.

→ More replies (1)

7

u/beaniebabycoin Mar 22 '21

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 :(

→ More replies (3)
→ More replies (1)

36

u/[deleted] Mar 21 '21

Jellyfin better

32

u/[deleted] Mar 21 '21

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).

10

u/rooser1111 Mar 21 '21

Can you elaborate on that adding friends and family part. Ive been hesistant to use plex for this very reason and stayed with emby.

12

u/[deleted] Mar 21 '21

Emby absolutely lets you manage your users more strongly. You can set transcode options, max video streams, and manage passwords all on a per-user basis.

I use both Plex and Emby personally, and let Emby be my "friends server" because I don't have to worry about them chewing resources or managing their own Plex pass (plex pass features on a server does not share to your friends).

I honestly only made the guide plex-centric because I was going to post in on r/PleX, and r/emby is much more dead. I can add an emby section, if there's enough interest. I already have the compose entries for myself.

→ More replies (5)
→ More replies (1)

14

u/Identity_Protected Mar 21 '21 edited Mar 21 '21

And doesn't require paid subscription in order to use your own hardware for accelerating transcoding!

3

u/Armitage2k Mar 22 '21

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?

3

u/[deleted] Mar 22 '21

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.

5

u/blaaackbear Mar 21 '21

does the machine have to running 24/7?

20

u/[deleted] Mar 21 '21

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.

5

u/Dovahkiin00 Mar 21 '21

I’d definitely appreciate that rPi appendix, if it wouldn’t be too much trouble for you!

13

u/[deleted] Mar 21 '21

I don't have a recent Pi on hand, and I'm sure there will be a catch while using USB storage that I won't be able to predict unless I have one but...

I just ordered a 4B 4GB model so I can be up to date on everything. I won't make a whole new post for it, but I will make sure it is added to the guide in the appendix and I will ping everyone in this comment tree when it's done (so far /u/blaaackbear, /u/ThereWillBeBoners (lol), and /u/Dovahkiin00).

→ More replies (7)

3

u/ThereWillBeBoners Mar 21 '21

Yes I am interested. My ultimate goal is to set up a completely independent and autonomous Raspberry Pi Plex server.

Wonderful guide by the way!

→ More replies (2)

2

u/canyonero__ Mar 21 '21

Do you need a vpn for protection while running this?

→ More replies (1)

5

u/BlackSheepDCSS Mar 21 '21

It has to be running for the services to work.

903

u/Godpadre Mar 21 '21
  • spend almost 2 weeks learning about linux, mounts and plex through hundreds of incomplete, intelligible tutorials and videos
  • spend most of this weekend piecing it all together
  • wake up to a reddit thread explaining it all in one sitting

Fml

43

u/Zaft45 Mar 21 '21

I had gotten about halfway through figuring out how to get everything to run together on Linux using a raspberry pi so it had comparability issues. I found dockSTARTer and it easily sets up all these programs for you with Docker. If OP used it his write up would’ve been only a few paragraphs.

23

u/supermitsuba Mar 21 '21

While having a higher level abstraction would be nice, it doesnt explain whats going on and how to secure, set environment variables or even where folders have to mount. I find sometimes glossing over these details can cause days of debugging.

Unfortunately/fortunately, linux is complex and has lots going on. I think the tutorial is great as a secondary resource, say if you were getting stuck on dockstarter. I also learned about dockstarter, so this is a neat tool. Thank you!

6

u/Zaft45 Mar 21 '21

For me learning how to use dockSTARTer and getting into more advanced features were what led me to understand and know how docker works and how to start configuring it all without added help. I agree dockSTARTer is a tool and it’s great to have both resources.

→ More replies (1)

7

u/Neuromante Mar 22 '21

hundreds of incomplete, intelligible tutorials and videos

Yeah, that pretty much sums up my experience with anything linux, lol.

6

u/Appoxo Torrents Mar 22 '21

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

→ More replies (2)

4

u/[deleted] Mar 22 '21

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.

2

u/pootislordftw Seeder Mar 21 '21

Why is a port forwarding vpn desirable again? I never quiet understood that

2

u/[deleted] Mar 21 '21

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.

2

u/pootislordftw Seeder Mar 21 '21

I use PIA with a qbittorent-openvpn setup and I remember a while ago the port forwarded servers went down for some reason so I had to switched to a non port forwarded one. The seeding still worked, should it not have or is that just a security/privacy thing?
And don't worry, I seed. Comcast gave us gig down but if my seed speed is faster that around 512 KBps it just tanks the speeds for anything else on network, but I've done like 8 tebibites by having that constantly going at 512kbps and without a limit from like 3-7 AM.

219

u/exegg Mar 21 '21

That's a lot of work. Saving this, thank you.

55

u/bruxc Mar 21 '21

As someone who has built a similar streaming service I will say it is a lot more work not having amazing documentation like this. Kudos, OP.

20

u/[deleted] Mar 21 '21

Some also-relevant applications with good documentation (and easy updates):

Swizzin runs on baremetal; cloudbox is dockerized. both communities are pretty large and support is easy to come by.

Swizzin

Cloudbox

9

u/dreamin_in_space Mar 21 '21

Damn, I just installed all these programs on my windows pc and everything just works. Been that way for months.

3

u/Zaft45 Mar 21 '21

If you don’t want to put in as much effort I’d just use dockSTARTer as it’ll configure all of it for you. No need to mess with compose files. Still requires some effort but it’s definitely easier.

→ More replies (1)

44

u/aspindler Mar 21 '21

What's the advantage of using this instead of just Plex for Windows?

36

u/smaghammer Mar 21 '21

Been running it on Windows for the past 4 years without any issues.

7

u/killbeard Mar 22 '21

Recently built a new pc, and been running Plex with no issues on windows 10, haven't had anything break because of an update. I used to run on Linux using an old machine, which was the perfect use of that old machine. Now that my main PC is on all the time, I don't see a reason to use the old server, as it would be a waste of energy cost.

11

u/daninet Mar 22 '21

I was thinking about the same. I have all these things running, plex, sonarr, radarr, jackett etc. On windows. Setup was around 30min because I was fiddling with video qualities in radarr. If you leave it to default you can setup all in 10min with next-next-next.

9

u/CassetteApe Mar 21 '21

Aside from the fact that Linux is free? I'd say none lol

41

u/LetrixZ Leecher Mar 22 '21

Wait, you guys pay for Windows?

13

u/sinat50 Mar 22 '21

Paid like 6 bucks for a code off of kinguin, obviously didn't work but windows 10 support honored it and validated my install.

→ More replies (3)

12

u/rafaelgsbr Mar 22 '21

This is r/piracy, Windows is also free

3

u/inaccurateTempedesc Mar 22 '21

Easier to just install linux than to pirate W10 imo

5

u/Vinnipinni Mar 22 '21

Hwidgen activates your hardware in seconds. Even if you completely format your drives and reinstall windows it will still be activated.

6

u/aspindler Mar 22 '21

I bought Windows 10 license for $5, on local "Ebay".

Easier than pirate, tbh.

→ More replies (5)
→ More replies (3)

3

u/ReusedBoofWater Mar 21 '21

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?

5

u/[deleted] Mar 21 '21

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.

→ More replies (1)

70

u/Cyno01 Yarrr! Mar 21 '21

"rEaD tHe mEgAtHrEad, tHiS iS aLl iN tHe wIkI¡"

But no, +1, good guide.

15

u/canyonero__ Mar 21 '21

Thank you for this. Incredible write up!

15

u/elislider Mar 21 '21

I also highly recommend using Portainer. It makes container learning and management so much easier and faster.

6

u/nth_derivative Mar 21 '21

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.

2

u/Appoxo Torrents Mar 22 '21

Especially if used together with OMV5 (very easy to update portainer this way)

2

u/Hendo16 Mar 22 '21

Exactly, I gotta be honest I'm surprised this guide didn't suggest the use of OMV/Portainer. I've built streaming services on windows machines and Ubuntu machines and both of them required way too much maintenance and weren't reliable. OMV is simpler, uses way less resources and is reliable

6

u/custardy_cream Mar 21 '21

Wow what a write-up. Will take a look tomorrow. I'd definitely use jellyfin over Plex though

20

u/darknmy Mar 21 '21

Eli5 why do I need this?

29

u/d3str0yer Torrents Mar 21 '21

essentially a local netflix, that updates the content automatically that you specified before.

e.g. new episode of american dad drops, your server downloads it, it appears in your plex dashboard

9

u/xi_mezmerize_ix Mar 21 '21

Why not just use an RSS feed from showRSS in your BitTorrent client? Massively simpler than the OP.

6

u/ElPlatanoDelBronx Mar 22 '21

I don't even do that. I just have Sonarr running with Plex and it literally gets any TV show I want on Plex within an hour of it releasing.

4

u/toutons Mar 22 '21

showrss is great, but it's selection is limited and sometimes takes longer than other sites. Sonarr basically searches for "your show s01e01" for you, automatically, across a variety of sites. The end experience is not much different from using an RSS feed in a torrent client, but you're no longer bound to a single provider.

→ More replies (2)
→ More replies (4)

2

u/[deleted] Mar 21 '21

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?

2

u/[deleted] Mar 21 '21

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).

5

u/medo459medo Mar 21 '21

thanks, legend. saved for later

5

u/[deleted] Mar 21 '21

god tier write up. saved for future use 👍mods, can we get this pinned/added to wiki?

4

u/Sam_1803 Mar 21 '21

Thanks for sharing!

4

u/Amongwolves2125 Mar 21 '21

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.

4

u/Appoxo Torrents Mar 22 '21

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.

→ More replies (1)
→ More replies (3)

1

u/HardlyW0rkingHard Mar 22 '21

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.

1

u/[deleted] Mar 22 '21

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.

1

u/VNGamerKrunker Mar 22 '21

Does this work in Asian countries?

1

u/[deleted] Mar 22 '21

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.

1

u/VNGamerKrunker Mar 22 '21

Do I really need to use a VPN in this case?

1

u/[deleted] Mar 22 '21

Outside of the west (really even just outside of the US and UK), VPN is not really required for torrents from what I’ve read.

But who knows. Asinine Copyright Laws (TM) could be headed to you soon.

→ More replies (2)

1

u/beer_in_my_face Mar 22 '21

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

1

u/[deleted] Mar 22 '21

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.

1

u/eastlake1212 Mar 22 '21

Will this automatically change file names as well?

1

u/[deleted] Mar 22 '21

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.

→ More replies (1)

1

u/zidaneski Mar 22 '21

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.

1

u/[deleted] Mar 22 '21

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.

1

u/Luvenis Mar 22 '21

Right now I have a desktop with windows 10 running plex natively. WHen I need to configure new stuff I'll just use teamviewer to remote into it.

But if I follow this guide would I see any power savings at all?

1

u/[deleted] Mar 22 '21

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.

1

u/CombatWombat1212 Mar 22 '21

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

3

u/[deleted] Mar 22 '21

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.

1

u/Mark_Knight Mar 22 '21

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

1

u/[deleted] Mar 22 '21

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?

2

u/Mark_Knight Mar 22 '21

ahh i see. i usually just download the movie via torrent and add it to my plex folder, refresh the library and watch. so i guess the method in the op removes the hassle of sifting through torrents manually?

1

u/kamunia Mar 22 '21

Amazing thanks! I want to build one, what specs do you recommend for a server like this?

2

u/[deleted] Mar 22 '21

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.

→ More replies (1)

1

u/Disposable_Fingers Mar 22 '21

Torguard is based in nuremberg, Germany is part of 15 eyes. Does that concern you at all?

1

u/[deleted] Mar 22 '21

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.

1

u/MegaBNinja Mar 23 '21

So how would this work on Windows? Would you just install all of these programs on a fresh install?

1

u/[deleted] Mar 23 '21

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

1

u/Bakerboy448 Mar 23 '21

one should never docker on windows

docker is a headache

windows in a headache

docker on windows is also linux on windows

combine it all and you're in for a bad time

1

u/[deleted] Mar 24 '21

I’ve only ever used it while developing lightweight applications. Is it IO limited or something?

→ More replies (1)
→ More replies (2)

1

u/redenno Leecher Mar 24 '21

what are the total expenses here? apart from the vpn?

2

u/[deleted] Mar 24 '21

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.

1

u/brbee Mar 28 '21 edited Mar 28 '21

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

1

u/[deleted] Mar 28 '21

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).

1

u/brbee Mar 28 '21

So I should move my downloads to my D drive instead of the usual C drive?

2

u/[deleted] Mar 28 '21

Yes, then hardlinks will work and you don’t have to manage your downloads.

You’ll also save drive write life because you’re only writing each file once.

→ More replies (3)

1

u/[deleted] Apr 05 '21

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.

2

u/[deleted] Apr 05 '21

You would want to use an NFS mount. Here is a good guide about how to modify your /etc/fstab file. You’ll also want to make sure that your router’s DHCP settings have a static IP address for your NAS.

2

u/[deleted] Apr 05 '21

legend, thanks a lot! After setting up the NFS and making it so it automounts I shoulb be able to safely continue with the rest, right?

2

u/[deleted] Apr 05 '21

Yes, the only caveat is that the mounted filesystem should support hardlinks. You can test that by running the following three commands

touch /mnt/your_filesystem/test.txt

ln /mnt/your_filesystem/test.txt /mnt/your_filesystem/test.txt.link

ls -i /mnt/your_filesystem/test.txt

The result of that last command should be 2.

2

u/[deleted] Apr 05 '21 edited Apr 06 '21

Thanks g!

EDIT:I get 37618081 adress of the mounting point

Second edit when I use -l instead of -i I get something bla bla bla 2 bla bla bla

2

u/[deleted] Apr 06 '21

That’s great, that means the NAS filesystem supports hardlinks and the rest of the guide will apply 100%.

1

u/Orthodox-Waffle Apr 24 '21

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.

1

u/[deleted] Apr 24 '21

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.

1

u/Orthodox-Waffle Apr 24 '21

hmm, in that case i've definitely got that part set wrong. How would i go about finding the correct ip range? I know every device thats on my network is 10.0.0.x does that mean my range is 10.0.0.0? and how do i go about finding the correct number for after the /

1

u/[deleted] Apr 24 '21

You can use a tool like this one to calculate the CIDR to put after the slash. Usually, it’s either /24 for 10.0.0.0-10.0.0.255 or /20 for 10.0.0.0-10.0.15.255.

→ More replies (2)

1

u/[deleted] May 31 '21

Stuck at mounting drives. I have my external drive partitioned and formatted, confirmed that it is ext4, and when running sudo -a, I recieve.

/mnt/data: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.

And here is the result of sudo fdisk -l

Disk /dev/loop0: 48.91 MiB, 51286016 bytes, 100168 sectors                                                             Units: sectors of 1 * 512 = 512 bytes                                                                                  Sector size (logical/physical): 512 bytes / 512 bytes                                                                  I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                                                                                                                                                                                                                                                                    Disk /dev/loop1: 60.59 MiB, 63537152 bytes, 124096 sectors                                                             Units: sectors of 1 * 512 = 512 bytes                                                                                  Sector size (logical/physical): 512 bytes / 512 bytes                                                                  I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                                                                                                                                                                                                                                                                    Disk /dev/loop2: 28.05 MiB, 29413376 bytes, 57448 sectors                                                              Units: sectors of 1 * 512 = 512 bytes                                                                                  Sector size (logical/physical): 512 bytes / 512 bytes                                                                  I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                                                                                                                                                                                                                                                                    Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors                                                      Units: sectors of 1 * 512 = 512 bytes                                                                                  Sector size (logical/physical): 512 bytes / 512 bytes                                                                  I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                      Disklabel type: dos                                                                                                    Disk identifier: 0xb59eb0cd                                                                                                                                                                                                                   Device         Boot  Start      End  Sectors  Size Id Type                                                             /dev/mmcblk0p1 *      2048   526335   524288  256M  c W95 FAT32 (LBA)                                                  /dev/mmcblk0p2      526336 62333918 61807583 29.5G 83 Linux                                                                                                                                                                                                                                                                                                          Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors                                                       Disk model: External USB 3.0                                                                                           Units: sectors of 1 * 512 = 512 bytes                                                                                  Sector size (logical/physical): 512 bytes / 512 bytes                                                                  I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                      Disklabel type: gpt                                                                                                    Disk identifier: 67E9892D-6936-445A-8CA9-D053C3EB3453                                                                                                                                                                                         Device     Start        End    Sectors  Size Type                                                                      /dev/sda1   2048 3907029134 3907027087  1.8T Linux filesystem

1

u/[deleted] May 31 '21

Double check the filesystem type with sudo blkid /dev/sda1.

If it shows ext4 like you expect, do a verbose mount with sudo mount -a -v. It should give you some extra information on what line in your /etc/fstab file is wrong.

→ More replies (1)

9

u/[deleted] Mar 21 '21

Just curious, why use Ubuntu/Linux when it seems like a whole lot of unnecessary hassle? I mean all of this seems sorta unnecessary when I've got the same thing running fine on a windows computer with just Plex and Sonarr/Radarr

3

u/[deleted] Mar 21 '21

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.

3

u/Havoced Mar 21 '21

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

3

u/Stryf3 Mar 21 '21

This is a very detailed guide. Thank you!

I have a sincere question. I currently use Firecore's Infuse on my Apple TV and a networked drive attached to my router. What advantages would I get by building a plex server instead?

3

u/[deleted] Mar 21 '21

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.

r/seedboxes

3

u/jfp555 Mar 21 '21

Thank you so much for doing this. Looking forward to setting this up during a slow week. By the way, just one question...wouldn't it be a bit more useful to use AMD gpus instead of nvidia?

3

u/[deleted] Mar 22 '21

If you guys have issues with unetbootin, use balena etcher it's better.

2

u/aaronryder773 ☠️ ᴅᴇᴀᴅ ᴍᴇɴ ᴛᴇʟʟ ɴᴏ ᴛᴀʟᴇꜱ Mar 21 '21

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.

→ More replies (2)

2

u/Rithic Yarrr! Mar 21 '21

When the guide has a lot of things to read, I switch to becoming a visual learner.

2

u/[deleted] Mar 21 '21

Mullvad VPN also claims to support port forwarding.

3

u/UnicornsOnLSD Mar 22 '21

They do, you specify the key (device) you want to use and it'll give you a random port for the given server.

→ More replies (2)

2

u/LexxiiConn Mar 22 '21

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.

2

u/[deleted] Mar 22 '21

Does a computer need to be on 24/7 for it to work

3

u/[deleted] Mar 21 '21

Overseerr is better than Ombi imo.

2

u/iamofnohelp Mar 22 '21

But it is still alpha.

2

u/rawimageReddit Mar 21 '21

Just buy a seedbox that has the capability to work with Plex.

1

u/shnukoms Mar 21 '21

Great work! Will try it out, thanks

1

u/Tenzu9 Mar 21 '21

Great guide, thank you for this. Saved.

1

u/shogun101 Mar 21 '21

Many thanks for taking the time and putting in the effort to make this guide!

I’ll definitely give it a go... Cheers!

1

u/zemssa Mar 21 '21

Thanks a lot mate!

1

u/RealMikeHawk Mar 21 '21

This is awesome! Would love a rclone/gdrive/mergerfs implementation section as well!

1

u/redblood252 Mar 21 '21

Anyone got a helm for this ? (Kubernetes)

1

u/magicalzidane Mar 21 '21

You're the champ OP! Have my poor man's gold! 🏅

1

u/Suwanneman Mar 21 '21

God I wish I had this a year ago. Do you think a future iteration might also include instructions on Usenet / sabnzb?

1

u/ToasterDust Mar 21 '21

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

1

u/IJKR6PY Mar 21 '21

Really great and detailed guide, thanks for sharing. Haven't used Sonarr on my server, might take a look.

1

u/theuniverseisboring Mar 21 '21

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.

1

u/Mr_Incredible_PhD Mar 21 '21

Fantastic job here! The only thing I'd change would be Jellyfin but other than that awesome!

1

u/rursache Piracy is bad, mkay? Mar 21 '21

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 🤷🏻‍♂️

1

u/GorillaWarfare_ Mar 21 '21

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.

1

u/vidoeiro Mar 22 '21

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)

→ More replies (1)

1

u/shreveportfixit Mar 22 '21

Commenting to save. Thanks!

1

u/xxxModxxx Mar 22 '21

Thanks for making this.

1

u/AWildGodAppeared Mar 22 '21

This is a beautiful guide. Should be pinned :p Definitely saved for reference if I ever go and get my own dedicated server.

1

u/LGAMER3412 🏴‍☠️ ʟᴀɴᴅʟᴜʙʙᴇʀ Mar 22 '21

This is gold

1

u/HerbalDreamin1 Mar 22 '21

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.

1

u/kratoz29 Torrents Mar 22 '21

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.

1

u/distortionwarrior Mar 22 '21

Nice! I'm going to read this later when I have time!

1

u/GSRoTu Mar 22 '21

You could also use a synology for easy install

1

u/ScipioTheBored Mar 22 '21

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.

1

u/jspikeball123 Mar 22 '21

This seems like a lot more work than just using unraid

1

u/EaterComputer Mar 22 '21

I just used DockSTARTer and it did most of the work for me

1

u/[deleted] Mar 22 '21

Thanks for this, bookmarked for this weekend to give it a good try setting up!

1

u/[deleted] Mar 22 '21

Jellyfin android app is free and all of it is open source. I moved on from plex.

1

u/vvictormanuel Mar 22 '21

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.

1

u/Ddog78 Mar 22 '21

Commenting here so I can start working on this in the evening today. Thank you so much for this. Luckily I already have knowledge about ubuntu, docker so this should be doable.

1

u/yusoffb01 Mar 22 '21

if you have high upload speed, can consider using google photos. split long videos to be below 15min then upload by folders. there is a limit of 100GB a day. I have 20TB uploaded. easy to stream

1

u/PossibleAd4837 Mar 22 '21

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

1

u/JBFortune Mar 22 '21

This looks like a lot of fun. Before I try it though....

I currently have Plex running on a small windows based server I have. To be honest, it works without issues. What advantages would this have over that?

Thanks

1

u/rohithkumarsp Mar 22 '21

I like your words funny man.jpg

1

u/bad_scientista Mar 22 '21

How to do it in Windows?

1

u/DrCokeMaster Mar 22 '21

Although I already have mine setup, this is an awesome informative post for newcomers. Thank you for giving back to the community

1

u/Boogertwilliams Mar 22 '21

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?

1

u/Bakerboy448 Mar 23 '21 edited Mar 23 '21

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/mediaand/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)

1

u/AdityaAr11 Apr 03 '21

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.

1

u/NathanielBHart Apr 15 '21 edited Apr 15 '21

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.

1

u/3stepBreader May 02 '21

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.

1

u/joshpry May 24 '21

Amazing 👏🙀😮😲😯👏

1

u/[deleted] Jun 05 '21

When running the command to install docker I'm met with this error

E: Package 'docker-ce' has no installation candidate

E: Unable to locate package docker-ce-cli

E: Unable to locate package containerd.io

E: Couldn't find any package by glob 'containerd.io'

E: Couldn't find any package by regex 'containerd.io'

1

u/[deleted] Jun 11 '21

I'd love to use this guide on an old Windows PC I've been wanting to convert into a media server with torrents, but I have a question. I'm relatively new to torrenting and I've just been using Transmission on my laptop. For a vpn, I really didn't want to pay, so I just kept using the free trial of Malwarebytes every week. It takes 5 minutes to set up a disposable email to get another license key, since Malwarebytes doesn't require a credit card. Malwarebytes doesn't support OpenVPN, so does anyone know of a service that does where I can do the same thing for it? Is it even possible to update the vpn details in the docker transmission yml file every week? Great guide, thanks for the effort in helping us.

1

u/CommonSenseUsed Jun 16 '21

Could I run this in wsl2 on windows?

1

u/Dbar412 Jul 26 '21

I'm new to plex and the like. What's the benefit of doing it this way as opposed to just installing the server on windows?

1

u/CiscoQL Oct 18 '21

I feel like this would have been better done if you wrote a shell script that does all this instead of writing how to do it yourself.

1

u/[deleted] Dec 16 '21

my maaannn !!! Abit mad about the time spend but its okay because off all that time saved

1

u/AutoModerator Feb 07 '24

Yarr! ➜ u/WhereIsYourMind, things to know about "RARBG":

  • RARBG ended its operations on 31st May, 2023.
  • Since the collapse, many clones and imitators have tried to claim the glory.
  • Websites that utilize RARBG's brand reputation are fake and must never be trusted.

 


 

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.