Lynn's quick and easy guide to TrueNAS and Plex

Started by Lynnette, December 16, 2022, 04:39:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lynnette

Creating your own NAS and Plex Media Server
The quick and easy way to feel superior to others, and to access your media away from home

Hey there! In this guide, I'll handhold you through the process of setting up a storage server out of a retired computer, and how to set up Plex media server on that computer. The only cost attached to this is hardware, so if you have an old PC laying around, it could become your new storage solution for all your personal files. Setting up your NAS and Plex is a relatively easy process if you're somewhat techy, but I've tried to add some of the pitfalls I made during setup near the top for easy checking. Feel free to ask questions and discuss below! I'll try to add any key information I might've missed as it gets pointed out, so do let me know if any step seems unclear. I mostly created this as documentation for myself, but figured others might find some use for it as well.

What's my background in all of this?
Hopefully it'll spark some confidence, I have worked in IT-support for about five years in total, lately as a technical lead for a major domestic IT company, and been an "advanced user" for 15 or so? This is what I do eight hours a day while being paid, and another eight without being paid. Feel free to call me a nerd, it'll just make me feel superior. You can't hurt me.

Who is this guide aimed at?
Someone with intermediate computer knowledge. I'm not expecting complete newbies to try setting up a media server, so I'm aiming for the person who knows some general troubleshooting for their own computer (and as a result, also immediate family), and who has maybe put together their own computer. You're not expected to know anything about file storage solutions and whatnot. Foreign terminology will be attempted to be explained as we go. I'll only be explaining the software-side in detail, so the guide assumes that you can install some harddrives on your own for instance.

What is the end result?
The end result is a personal file storage solution with redundancy (You won't lose all your data if a drive fails), that also can be used to stream your own files when away from home, for instance at the airport or when visiting family. What you chose to put on the server is up to you.

Why did you make this guide?
Because I'm proud that I managed to set it up and want to gloat.
Also because I realized afterward that it was super-useful, and figured three or four people might see this and think "Hey, that sounds pretty neat. Maybe I'll try it one day."

Q&A
Q.What is TrueNAS?
TrueNAS is an open-source network attached storage server operating system. It's free for up to six storage drives, and is feature rich for those who really want to set up a rich storage environment for their home.
Q.What is Plex-server?
Plex itself is a media server streaming service hybrid. You supply your own files, and they become available in the Plex web interface or app. Plex has support for web-browsers, apps on phone, and smart-TVs, among others. It also supports remote streaming, so you don't have to be on the same network as the server. It's a free service with a paid service (one-time fee or monthly/annual payments) that adds some features. Plex-pass is not necessary, and I would advice against getting it unless you know what you need it for.
Q.Why would I do all this instead of just putting my files on my computer?
Sharing between computers in the household, freeing up space on your own computer, and making your files easily shareable with friends and family. Plex is a great tool to for instance share home videos.
Q.TrueNAS looks difficult, are there any easier alternatives?
Unraid is another similar tool that is regarded as more user-friendly, but requires a paid license. I won't be covering it in this guide as I'm not familiar with it personally, but there's loads of good resources on how to use it on youtube.
Q.How long time does this take to set up?
If you follow the guide, it should only take a couple hours.

Q.How much RAM should I have/how recent of a CPU do I need?
TrueNAS has a requirement of 16gb of ram. DDR3/DDR4 ram is cheap, and you can always expand down the road.For the CPU, aim for a quad core CPU, I'd say 4th gen Intel or later, any AMD Ryzen will do. Aim for at least a quad-core CPU. Faster is better, but if you have spare cash to spend on the CPU, buy more harddrives instead. Make sure that your ram fits with your motherboard before you buy.
Q.What can I use for my media server?
Basically any old computer will do. I would advice against using a laptop due to poor expandability, but it can be done. The ideal computer has a quad-core CPU or higher, and enough 3'5" bays for at least four harddrives. Services like Plex can run off your personal computer or an Nvidia Shield, but I wouldn't recommend it. If you need a computer to build the NAS in, I would recommend looking at retired office computers, like a Dell Optiplex, tend to work well for these applications, and can be had very cheap.
Q.Can I use old harddrives for this?
I would recommend buying new harddrives, you can get a pair of 4 terrabyte harddrives from western digital for about 75 dollars each on Amazon, but keep in mind - It'll never be enough storage, and expanding your storage is a bit of a chore after you've first set up the storage, but it can be done. Keep in mind we will be saving one drive for redundancy, so if you only buy two drives, you'll only get the storage of one of them. If you're storing critical files on the NAS, buy NAS-drives! Western Digital Red drives are a good option. They're better suited for running continuously, so lifespan should be greater, though the cheapest drives will do if you're not completely reliant on those files. We'll be setting up some redundancy anyway, so it should be fine unless more than one drive fails at once.
Q.I cheaped out and just bought two drives, now my storage is full!
Well, it was going to fill up eventually anyway. TrueNAS does not allow for pool-expansion (yet), so you'll have to move your files elsewhere, and then rebuild your storage-pool.
Q.Can I use mismatched harddrives with different capacities?
Short answer, no. Long answer, yes, it is possible, but you would only get the storage of the smallest drive. (citation needed)
Q.How fast do my harddrives need to be?
Not very unless you're having a lot of users use the same server. 5400rpm is plenty for a handful of users.
Q.Do I need a separate SSD/Harddrive to run trueNAS off of?
No, you can run TrueNAS off of a USB stick if you so desire. Some people prefer this to free up SATA-ports in their computer. Personally, I'd say buy a cheap SSD, 120gb or smaller can be had for around 20 buckaroos on Amazon, it just feels like a safer solution, but maybe I'm the weird one in the equation.
Q.Will all my files be available all the time to me?
Only those connected to Plex, that have file formats Plex accepts. You could use a VPN to gain remote access to all file storage, but I won't go into that.
Q.Is this safe?
TrueNAS is open source, so there's always some risk, but unless you make it remotely available, it should be secure enough as long as you set up 2FA. Plex is generally regarded as safe as well, but I wouldn't put all my juicy nudes on it if I was an A-list celebrity. Fortunately for me I'm not.
For some physical safety though. don't use molex to sata adapters. Molex to Sata, lose all your data.

Troubleshooting
Plex is not finding my media!
Double-check your permissions under storage in truenas. Make sure that UID "972" (Plex) has read-permissions on all datasets.
If this fails, check your mount points, remember each dataset must mount to a different folder in the destination.
I can't sign in to the root account, my authenticator code doesn't get accepted!
To regain access, you'll have to connect a screen and keyboard to the TrueNAS computer, and reset the password of the root user. This will also allow you to disable the authenticator.
When you regain access, make sure that your NTP server is set to the right one for your country. The server address can easily be found in a quick google search. "NTP server Norway" for instance.
I can't find my folders on my personal computer!
If your user in TrueNAS has the same name as your personal computer user, double-check that you have permissions for the folder under the storage tab. You'll have to check this for each missing folder.
If your user in TrueNAS doesn't have the same name as your personal computer, try mapping the drive again but sign in with the credentials you created that have access to the folder.

Checklist - Things to have before beginning
[ ] A computer with at least two harddrives and 16gb of ram.
[ ] Either an SSD or flashdrive (min. 16gb) to install TrueNAS to, plugged in to the computer.
[ ] An Ethernet connection, connected to the computer that is being turned into a NAS.
[ ] A screen to connect this computer to, and a keyboard. A mouse isn't necessary but can be convenient if you have to mess around in the bios to boot the right device.
[ ] Something to drink and snack on - I'd say stick to coffee and chocolate, but if you're feeling daring, I won't judge if you crack open that bottle of whiskey whispering sweet words in your ear.
[ ] Another computer you can do the setup on after TrueNAS is installed.

1. Getting your installation media ready, and installing TrueNAS Core
TrueNAS' own youtube guide on installing TrueNAS

Download the most recent iso from TrueNAS' website. For this guide, I'll be using TrueNAS core 13, so I can't help if there's differences in Legacy. I'd recommend to download TrueNAS Core 13 as well.
Next, we'll mount the ISO to a flash-drive to create our install media. I believe Windows 10 has a built-in tool, but I'm old at heart and used Rufus, another piece of freeware. Plug in the flash drive you intend to use to install TrueNAS with, and select your file with the big SELECT button. You don't have to change any other settings. Be aware that this will delete any files on the flashdrive.
When it's done, unplug the flash drive and plug it in to the computer you're installing TrueNAS on. If the computer isn't already turned off, turn it off.

If the server-computer doesn't have a harddrive with an operating system installed to it, it'll do one of two things
 - It will either realize that you have an installation media plugged in, and will run the bootloader (installation process).
 - It will not find it, and you'll have to select it manually. All motherboard-manifacturers use different bioses, some are easier than others, but what you're looking for is boot order. Make sure your flash drive with TrueNAS on it is on the top of the hierarchy, save, and exit the bios.

Once you get the splash-screen for the installer, select option 1 by pressing enter, or wait for it to start automatically.
Select Install/upgrade.
Select the target disk for the installation. Pick your SSD/flash drive from this list. Do not pick one of your harddrives. Select your SSD/flash drive, and continue, and press enter on the warning that any files on the disk will be deleted.

Next, we'll be setting the root password. This is the password for the user with the highest degree of access, so set a password. Use a secure one.
On the trueNAS boot mode, this depends on your hardware, for most semi-modern hardware UEFI is the right choice.
Assuming you're using an SSD, pick "Create Swap" when you're asked, if you're running on a flashdrive, don't unless it's at least 32gb.
Installation takes a bit of time, perfect time for a bathroom break or some tax-filing.

When it's done, reboot your system and remove your installation media.

2. Booting TrueNAS for the first time, and accessing the web-interface
When the TrueNAS bootloader shows up, press enter to boot the system up. On the first startup, this will take a bit of time. Future boots will be much quicker.
Once it's done, you'll have a basic console allowing you to make changes to the network interface, reset the root password etc. For the time being, we'll be leaving these options alone as we can do all of this in the webUI. When TrueNAS is done loading, it should present you with an IP-address to the web interface, for instance "Https://192.168.0.167". At this point, you can note down the number and unplug the screen and keyboard from the server, TrueNAS is installed! If you see the IP 0.0.0.0, double-check the ethernet connection to the NAS. If it's disconnected, reboot the server.

Enter the IP-address in the web-browser of your main PC, and you'll arrive at the TrueNAS login page. The user with maximum access is "Root", the password is the one you set up when you first set up TrueNAS. If you've forgotten it already, you'll have to connect the screen and keyboard again, and reset the password from the terminal.


3. Setting up some basic security for your root user
To make sure no malicious souls can access your server, we'll be setting up two-factor authentication on the server. This step is optional but highly recommended.

Under the system category in the left column, begin with selecting "NTP Servers"
Chose the "Add" button. A quick google search will find you the NTP-server for your local area, search "NTP server Norway" for instance. The NTP server name should look something like "0.no.pool.ntp.org". Check the "Prefer" box, and press submit.
What is an NTP server?
An NTP server is essentially a clock that we use to check our own clock against. Due to the nature of electronics, tracking time precisely is very tricky, so NTP servers are used as a sort of anchor. The server will regularly check against the NTP server and correct its time based on what the NTP server says.

Do not sign out/close the tab until you've finished the next step, as this will lock you out and you will have to reset your root user password through the terminal on the NAS itself.
Next, under the general tab, select 2FA. You can leave the fields as default. Enable 2FA and show QR code, and scan it with your preferred 2FA-app on your phone. I'd recommend google authenticator. Once you see a six-digit code pop up in your authenticator app, you're good to go.

4. Networking
This step might be optional, so I'd suggest ignoring it for now and looping back during troubleshooting, but I might've just gotten lucky. If you experience your data regularly becoming unavailable, you might need to set a static IP address. It did it by default for me, but this might be because I already had a static IP address set up on my router for that computer in the past.
Open the "Network" tab on the left column, and select interfaces.
You should see one network interface, EM0, show up in the list. Click on this to expand it, and press edit. Under IP-addresses, enter the IP-address you're currently signed in through, the one that was displayed in the terminal, and press apply. If you can reload the page and the login screen/webGUI shows, you're good.
What is a webGUI?
Web Graphic User Interface. Basically the website-version of the system. Lots of printers have them for instance, and they're useful for adjusting a system without having to hook up a keyboard and mouse.


Important!
I did not have to do this step, so I don't have any first-hand experience with this, I'm only going by the documentation for TrueNAS here.


5. Creating user(s) and group(s)
Next, we'll create a user. If you're creating multiple users, repeat this step until you've created users for everyone who is going to access the server and its files.

In the left column, select Accounts, and click users. Press the "add" button.
I would highly recommend to make both the full name and username the same, and to make them both the same name and password as the user account on the computer of the person who the account belongs to. This will allow us to use SSO, so you don't have to log in to access your files.
What is SSO?
SSO stands for Single Sign-On, and essentially uses your existing username to see that you are indeed the same person as the one the account is made for, allowing you to skip entering a username and password.

Email is not mandatory, but I would recommend adding your personal email as the admin user, for monitoring reasons later in the guide. Make sure "Samba authentication" is checked, everything else can be left as default. Press submit, you now have a user. Repeat this step however many times you want, for the users who will be accessing your NAS.

Next, we'll create the groups. Groups allow you to set permissions on folders for more than one user at a time, and are convenient if you're setting up this server for your family to use, not just you.
Select groups under the account category in the left column, and click add. Leave the GID as default, and create a fitting name for your group. For instance "Adults" and "kids". On my part, I just created a single group and gave it a basic name. Make sure Samba authentication is checked, and press submit. Repeat this step for however many groups you need.

Next, expand the group you created, and press the "Members" button. You'll be presented with a long list of users, most of them system-related. Users you've created will usually be at the bottom. Select the ones you're adding to the group, and press the arrow to the right. This will add them to the group. Press Save, and these users are now in that group. Nifty! Repeat however many times necessary for each group.

6. Creating a storage pool and datasets, and giving permissions
Okay, we're at the point where things start to get a bit technical, and we're starting to deep-dive into storage-solutions that you've likely never heard of. As such, I created a small terminology guide to make you feel a bit more in the loop.
Terminology
ZFS - ZFS is the file-system that TrueNAS is built on.
Pool - A pool is a collection of one or more harddrives or SSDs, pooled together to create one big storage.
Dataset - Subfolders on a pool.
Redundancy - Making it so that if one of your drives fail, you don't lose all your data.
RAID - Redundant Array of Independent Disks, basically what we'll use to create our pool
RAIDz - Same thing as RAID but for ZFS. For those that know a bit about RAID, keep in mind the raid levels don't match up!
ACLs - An ACL is basically the access rules on your datasets - Who is allowed to access what.

In addition, here's a quick redundancy guide, so you can make a better choice on what fits you best.
Redundancy and you
TrueNAS offers a handful different methods of pooling your drives together;
Raw mount - If you have just one harddrive, you'll just have to mount it like any other harddrive. Zero redundancy
Striping - Striping is essentially splitting your data between multiple drives. This is a really fucking dumb choice to do, as if one of the drives fail, you lose all your data. Wouldn't recommend this in any storage-application.
Mirroring - If you have just two drives, your only redundancy option is mirroring. With mirroring, whatever files you load on to the NAS, it gets written to both of the disks. It's an inefficient solution if you have more than two drives, but if you only have two, it's a good option for redundancy.
RaidZ1 - This is your most efficient solution when you have three or more drives. One of your drives will be reserved for parity data - Basically data that can be used to rebuild your pool if you had a drive failure. So if you installed four harddrives for instance, you would get the capacity of three of them. Very efficient, but rebuilding the pool if a drive fails takes a long time. Performance is also a bit lower than mirroring. This is the most cost-effective solution when you have three or more drives. It's equivalent to RAID5 for those familiar with hardware-RAID.
RaidZ2 - Same as RaidZ1 but with two parity drives and at least four harddrives. Equivalent to RAID6.
Stripe+Mirror - Your drives are split into two halves that are striped. Then those two are mirrored to each other. You lose half your capacity. High performance and very safe, but expensive. Not recommended for price reasons.

My recommendations would be;
Two drives - Use mirroring.
Three or more - Use RaidZ1. RaidZ2 if you're storing a lot of super-critical data on the server. If you're just storing home videos etc. use RaidZ1, you can still live through one drive failure.
If you decide to use striping and lose your data, please write "I'm a big dum-dum who built my nas without any redundancy, and it came back to bite me" as a post below. I could always use more salt.


But alright! Now that you've chosen what level of redundancy you want, let's get a move on shall we! Select Storage from the left column, and chose Pools, then press the Add-button.
Select "Create a new pool", you'll now be presented with a list of your drives. Create a name for your pool, this won't be visible anywhere else so feel free to name it what you want. I just went with MirroredPool.
In the list of drives, check off all the ones you want to add to the pool. You can create more pools later, but I would usually recommend adding all your drives since you can't expand on a pool later. When all the disks are on the right side, TrueNAS will suggest a redundancy option, but it tends to play on the very very safe side. For most, RaidZ/RaidZ1 (Same thing) will be the ideal choice.
With this done, press the create button, confirm, and create. Formatting can take a bit of time.
Congratulations, we've created a pool!

Now, we could rush on to just share the whole pool, and that would be fine, but it's not best practice. If you fuck up the permissions for this share, anyone on your network could go in and make all the folders unavailable to you, no good very bad job.

Instead, click the three dots on the right end of your newly created pool, and chose Add Dataset. This will create a new folder in the pool. You can name the folder what you want, on my part, I created two, "BigData" for my personal files, and "Media" for Plex. If you want more personal shares etc, you can do that at this step too, for instance one for you and your partner, and one for the kids, or a bunch of personal ones.

When you're done creating your datasets, you should see a stack of subfolders under the pool.


If you're setting up Plex

If you're setting up plex, on your media dataset, create another dataset for each category you want on Plex. On my part, I created one for movies, and one for TV shows.

When we've created our datasets, we need to set some permissions. Without permissions, we won't be able to access our data after all.
Press the three dots to the right of your dataset, and chose edit permissions

You'll be presented with the basic permissions editor, but it's very limited. Instead, select "use ACL manager". Select "Create a custom ACL", and continue.
The first thing we'll do is delete the "Everyone@" listing, this is very bad and I have no clue why TrueNAS adds it by default.
After deleting it, chose Add ACL item. If the dataset is just for one person, chose user. If it's for one of the groups you created ear, chose group. Add the user or group who is gaining access below.
On permissions type, select Basic.
Under permissions, if it's for a single user, use full access. If it's for multiple users, I'd recommend selecting Modify. Finally, press save. Congratulations, you've set permissions on your dataset!


If you're setting up Plex
We'll have to set some additional permissions on the media dataset and the sub-datasets.
Start off with the root dataset, the one I named media and you probably did the same. Edit permissions like we did earlier.
Chose add ACL Item
On who, select User
Enter 972 in the user-field. This is the user-ID for Plex. TrueNAS might tell you that no user exists on that UID, but ignore it. Permissions type basic again, and for security reasons, chose read as the permission type. Make sure to give yourself access to these datasets as well! Full access or Modify.
Repeat this for both media and the sub-datasets you created.



7. Creating a Share and mapping it in Windows
Great, you've created your storage, now we just have to find it in Windows so we can start adding files.

In the left column, select "Sharing", and then Windows Share (SMB). Press the add button in the top right.
On the top, you'll see a file hierarchy. Open it, and select the folder you're intending to share. Best practice is to not share the pool itself, but rather the datasets we created. For instance my BigData and Media. Select the folder, the name will be set automatically. Make sure the Enabled box is checked, and submit. Repeat this step for all datasets you're sharing.

Now, if we've done everything right, we should be able to find the share in Windows.

As a test, you can just try to route to it without mapping it just yet.
Open your file explorer, and write the following to the URL-field, the one where it displays which folder you're in and how many folders deep you are.
\\IPaddress\Sharename
For instance;
\\192.168.0.119\media
If you don't get any errors, congratulations!

Go back to my computer, and press "map network drive". Add the IP and folder that you used earlier to the folder-field, and select a drive-letter. If you want to feel like an IT-person, L is commonly used for shared drives among several users, and H is commonly used for home directory. If you set up users with the same names and passwords as your personal computer(s), leave the rest as default. If you didn't, select "Connect using different credentials".
on the different credentials, the username would be;
Ipaddress\username, the password would be the one you set up in TrueNAS, for instance.
192.168.0.119\Lynnette

If you can create a folder or a text file in the mapped drive, congratulations! You've successfully mapped your network drive.


8. Scrubbing, Monitoring, and NetData
Now that we've set up our share, it's time to set ourselves up for success and automating the things that keep your NAS healthy. We'll start with setting up some S.M.A.R.T tests.

Under Tasks, select Smart-tests. TrueNAS might have some set as default, but if not, chose Add.
Select all disks, and SHORT as the type. Daily is a bit too often, so select weekly, and submit.
Repeat this and create one for LONG as well, but set it to monthly.

Next, go to Scrub tasks under the Tasks category on the left. Click Add.
Select your pool, and set it to a weekly schedule. Finally, press submit.

Finally, we'll set up NetData. NetData is a monitoring community-plugin, which will let you see what your NAS is currently doing. It's also helpful for troubleshooting down the road.
Chose plugins in the left column. On the top right of the plugins-page, you can chose what collection to browse. We want to swap over to community. You'll be presented with a ton of choices, what we're looking for is NetData. Click the plugin, and chose Install. For the Jail Name, I'd suggest calling it the same as the plugin, so NetData. You don't need to edit any other settings, so click save.

what is a jail?
A jail is essentially virtualization - Running a computer on another computer. As a safety solution, we create jails to separate our plugins from the server itself.

The plugin should automatically start, and you'll get an IP-address to the admin portal. Copy the admin portal IP and paste it to a new tab. You should now get the NetData interface. Bookmark this, makes it easy to hop in and check if your NAS is misbehaving.

If all you wanted was to set up a shared NAS, you're done! Now we're moving on to the fun, optional stuff!


9. Time to start Plexin'
Still with me? Awesome! You'll be the coolest kid on the block when you show off your Plex server.

If you didn't already, go back to step 6, and add the 972 user permission to the datasets on your media-folder. If you open the media folder in windows file explorer, you should see the sub-datasets you created, for instance "TV shows" and "movies" as separate folders. If they show up, good, continue, if not, you fucked up, back to step 6.

Go to the plugins page in TrueNAS, and select Plex Media Server. Click install. For the jail-name, just call it Plex. This will download and install the latest version of Plex.

Once the plex-plugin is done installing, you'll get the splash-message saying Plugin installed correctly, as well as the admin portal URL.
Now, the first thing we're going to do is to stop the plugin. Expand the Plex-jail under plugins, and press stop. Before we move on, we need to mount some storage for the plex server. Due to how jails work, they are not able to see your data unless your explicitly tell them to.

Select Add mount-points in the list of options for the plex server.
Go under actions, and press add. On source, we want to chose the movies/TV series dataset we created. Do not select the media-folder as a whole. This is bad practice and can give you some headaches down the line if you want to mess around with other plugins.
Under the destination, click on the folder that is presented. It should look like this;
/mnt/vol1/iocage/jails/plex/root
This will add it to the destination. Add /tv series to that, this will create a new folder.
/mnt/vol1/iocage/jails/plex/root/tv series

Click on submit. Repeat this step for however many datasets you created for your plex-server. Be sure to create a unique destination every time, each mount point must mount to a different folder.

Now, we can go back to the plugins menu, and click start. Great, we've done all the prework for Plex.

10. Configuring Plex and finding folders
Click manage under Plex in the Plugins page. This will lead you to the management page for your Plex Media Server.

You'll have to create a Plex user account, so if you haven't done this already, go to Plex.tv and create your account.

You'll get a screen talking a bit about how Plex works. Press "got it" and move on. On the page about Plex Pass, unless you know you'll be needing it, just close the page with the X in the top right.

You'll be asked to create a friendly name for the plex server, you can just give it a name like "plex on truenas" for instance. If you leave the "Allow me to access my data outside my home", Plex will try to set it up for you. If you don't need this, you can remove this checkmark and move on.

Next, we'll be asked to add libraries. Click add, and select the category. This just determines the icon for it later, but pick the right one for convenience' sake, you can give it a name if you'd like. Press next.

We'll then be asked to browse for media folder. If you did everything right, this should be piece of cake. Click browse, and select the / on the left hand side. Select the dataset we created and shared with Plex. If it's grayed out, double-check that UID 972 has read permissions. Repeat this step for however many categories you created mount points for.

With that done, dope! We're all set, all that remains is populating our Plex server.


11. Populating Plex
Unless you snuck ahead, we've successfully mounted our folders to plex, but they're empty. This is because... Well, your folders are empty. It's time to start filling them. For movies, you can just dump the .mp4 files or .mkv files directly into the folder we created for them, through file explorer in windows. For TV shows, we'll want to be a bit smarter.

Create a folder with the name of the show you're adding. For shows with several seasons, there's two ways of doing things - The easy way and the hard way.
A universal naming scheme is name of show S01E01, for instance "house MD S01E01". If your files have this format, you can just dump them in, but it's not best practice. Instead, create a folder named "Season 1" under the House MD folder, and add your files to that. It can be smart to just add one or two files for now, just to test that everything is working.

Go back to the Plex interface, and in the left column, where your categories are, press the three dots on the category and chose "Scan library files". Plex will then add the folders under that category to the Plex page, and you can start streaming! Congratulations, Netflix is no more, and you're instilled with a feeling of superiority.

Next steps are entirely optional.

12. Giving others access to your Plex server, configuring bitrates, and remote access
Press the wrench icon in the top right of the Plex page.
For giving others access, chose "Manage Library Access". Chose "Grant Library Access", and add either their Plex username or email if they don't have an account. They will have to create one if they don't already have one. They'll then receive an invitation to view your files. You can also chose which folders they can access, so if you have 500gb of weird porn, maybe don't share that one with them.

Next, quality. Under Plex Web, I'd recommend setting video quality to maximum, and just reducing it over time if your internet can't handle the current speeds.
Lastly, the transcoder. Under Settings and transcoder, much like with the internet speed, just set it to "Make my CPU hurt", he's a big boy, he can handle it. Just reduce it over time if need be. For background transcoding, I'd recommend setting this to slower, this will give you better video quality at the cost of some buffering initially. If you're experiencing frequent buffering while streaming, reduce the transcoder quality and speed up the background transcode.

Lastly, remote access if you didn't enable this during setup. Go to Remote Access and enable it. If it's not working, check the docs, Plex has a lot of troubleshooting steps for this if it's not working, but you may have to manually open ports in your router, so proceed with caution. I didn't have to do anything, so I don't have any immediate advice.

13. Shows in my Plex page without posters
Plex will automatically try to match your folder names up against the names of shows through existing databases, I believe IMDB. In some instances though, it needs a helping hand. Mouse over the show or movie that isn't getting matched, and click the three dots in the lower right. Chose Match. It should now present a list of shows or movies that it thinks matches what the files are, and it's usually pretty accurate. Pick it, and the poster should update. Episode synopsises etc. should also automatically be added.


14. An important note about piracy
I won't involve myself in how you get your files, so don't use this as an endorsement for piracy. However, if your files are not attained through legal means, and you're sharing your plex media library with others, this may be considered distribution of pirated material. Laws and enforcement are different in every country, but this is something to consider. I'm not an ethics professor or a lawyer, so I can't help you here.


15. Managing Plex Metadata
We're moving on from casual nerdy to competitive nerdy here. This step is largely unnecessary unless you care a lot about watch-orders, want to make every single special of every single show available, or you just have too much time on your hands and care too much if your self-hosted notflix does things right.

Metadata is, simply put, the data that Plex, as well as other applications, use to identify a file. "Data about data" is the blanket explainer. In our case, metadata is what allows Plex to tell that episode 13 is, in fact, episode 13. For regular seasons of a show, this will usually already be in place depending on your source.

Where it gets tricky is with specials. For anime, it will be OVAs or movies in an existing franchise. For TV-shows and movies, it will typically be behind-the-scenes footage, cut content and the likes. After watching LOTR extended edition for just shy of 12 hours, you need MORE. That sorts of material.

But, as mentioned, managing the metadata is a pain in the ass.

Plex likes a certain format. For TV-shows, it will be SXXEYY, XX being season and YY being episode. So, taking episode 5 of season 3 of The Rookie, the title might look something like;
The Rookie S03E05. Most of the times, your files will already be sorted in that format.

For specials, this gets thrown in the wind a little. While main series episodes will use a reasonable format, specials, at least for anime which is what I primarily host, is a mangled mess.

Plex uses Thetvdb.com as its primary "map" for metadata. Taking a look at the OVAs for Attack On Titan for instance, the episode numbers are a mess and a half. But, we have the resources, so we can work with this mess.

In the same folder as the seasons of the show, create a new folder called "Specials". Within this folder, add the files you intend to use.
Next, we'll have to re-label them. Thetvdb will allow you to sort by TV-order, DVD order or absolute order. My recommendation would be sticking to the TV-order, as this one is the most complete in most cases.

Start re-naming your episodes according to the true labels found in the TheTVDB-listing. The first OVA is in other words named S00E07.

But, you might encounter Plex not identifying it correctly even after this is done. Episode names and thumbnails might be listed incorrectly for instance. To resolve this, in the media overview of Plex, press the pencil icon when hovering over the show. From there, move to Advanced, and scroll down until you find Episode Ordering. Click on the drop-down, and select "TheTVDB (Aired)" (Or DVD/Absolute, if you picked the list from one of those for some dumb reason). Save changes, and your files should immediately re-label themselves.

In addition, the media will play in the correct order according to release, so any specials will be placed in the correct order according to the release order.
I'm available on Discord!
Feel free to message me if you want to chat
Lynnpai#4726

My O/O     My guide to set up a home server and Plex
My request thread