Home Server Setup - Turn your old PC into a useful home server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i know why you're here you have one of those dusty old pcs sitting in the corner of your bedroom next to the pile of your ex-girlfriend's stuff that she swears she'll send her new boyfriend over to come get you swear you're gonna do something with it but you just don't know what that was until you watched a video on a budget home server build and you thought yes that'll winner over yes that'll be useful now you're wondering how do i even get started well luckily today that's what we're going to talk about how to turn your dusty old pc into a competent home server [Music] okay now let me set the mood for this video this is for people who have never set up a home server don't know where to start don't know what os to run don't know what software they want to use so if you're sitting there monitoring your 32 core epic base system on your secondary monitor while watching this video then just consider this entertainment so step one of setting up a home server is to determine what you're going to use it for is this going to be a nas device is it going to be used for plex is it a file server is it a sacrifice to the tech gods is it all the above or maybe you just don't know yet and you just want a home server to play around with and that is okay too the next step is to determine what your hardware is even capable of how many cores does your cpu have how much ram do you have how much storage space do you have does your cpu have integrated graphics do you have a dedicated graphics card your hardware will ultimately play a major role in determining what operating system you eventually go with now some of these things are easier to upgrade than others you can easily add more ram you can easily add more storage and assuming you have both of your kidneys you can possibly put a down payment down on a graphics card but we're going into this guide assuming you have an older desktop system and that's because that's what most people are looking to repurpose now let's talk about how that hardware determines which operating system you're going to run and this is probably the most important aspect of your home server but let me make one thing clear before we even start this for 99 of people looking to build their first home server it does not matter which operating system you go with pretty much all of the basic home server softwares will run on windows mac os and whatever weird distribution of linux your awkward cousin told you about at thanksgiving if you're comfortable with windows and it's already installed on the machine and that's what you want to run then go for it my recommendation though is going with a linux based hypervisor operating system simply because that's what they're specifically designed to do but if you don't want to go with that it's fine it's your system tell me to kick rocks and i said before that hardware will determine what operating system you go with so what did i mean by that well taking os out of the picture there are two ways you can go about setting up a home server you can go with a desktop environment like windows or mac os or linux ubuntu and have a familiar desktop gui experience to work with or you can play with the big boys and go with a hypervisor os a hypervisor os is essentially an operating system that is designed to run on a server to support multiple virtual machines and multiple services at the same time you won't get the desktop experience out of them because most of them use a web gui to interact with so don't expect to run proxmox and also be able to have your familiar desktop environment so i still haven't told you how the hardware affects which operating system you go with so let's do that a desktop operating system is designed to run on a single machine running a single interface for a single user and while you can install multiple services on it as you add more things to it and build up a large collection of services it does get less efficient hypervisor os on the other hand is designed to run on a server it takes all the desktop services that were there to provide you a desktop gui strips them out and allocates those resources somewhere else some popular hypervisor os's are proxmox truenas gorge now scale unraid open media vault esxi and if i didn't list your favorite hypervisor then get over it nerd now you can run these on pretty much any hardware but i would follow this kind of loose guide to minimum requirements first being probably the most important is to make sure that your cpu supports virtualization and to check this just google your cpu model number followed by virtualization and it should tell you whether or not it supports it second i wouldn't suggest running a hypervisor os on anything less than eight gigabytes of ram because when you're running a hypervisor os you're probably going to be spinning up multiple virtual machines multiple containers and you want a decent amount of ram to allocate to each of those things and the same thing goes for cpu threads i would recommend eight of them now notice i didn't say cpu cores that is because some cpus support hyper threading while others don't so one person can have four core four thread cpu while another person can have a four quart eight thread cpu so again for the same reason as ram i would recommend eight cpu threads now these are just general guidelines they are not written in stone so if you want to try hypervisor os with one vm and you want to do it on four threads and four gigabytes of ram then do it i don't care hopefully at this point in the video you have an idea of which path you want to go down so what i'm gonna do is show you how to set up services from both perspectives from the desktop experience or the hypervisor experience the cool thing about this is that we will essentially be using the same service to set it up on both scenarios docker if you haven't heard of docker it's essentially a service that containerizes services and softwares and allows you to deploy them in a consistent environment across multiple platforms and the community is extremely active so if there's a software out there you want to run chances are there is an official docker image supported so let's go ahead and get this plugged in now in this machine i have an i5 4590t which is just a four core four threaded cpu i have eight gigabytes of ram i have a 64 gigabyte ssd as my boot drive and a one terabyte or maybe two terabyte i can't remember hard drive to act as my data drive so based on the guidelines i listed before this would be more well suited for a desktop environment system but we're going to do both because again you can run whatever os you want and those guidelines i gave earlier don't really mean anything so let's plug it in now we're going to dive into the desktop environment first and for this we will be using windows 10. this is because it's the most popular operating system and i'm not going to cater to you linux nerds on this one you guys get everything else so chill now i'm briefly going to touch on storage because it's important and honestly deserving of an entire video but i don't want this video to be brave heart level length if you have multiple hard drives in your system i would strongly recommend setting up a raid configuration or as it's called in windows storage spaces this will allow you to combine multiple physical hard drives into a single volume which will allow you better performance or better redundancy or in some cases both if you want to learn more about this just google raid configurations or windows storage spaces it's not too difficult to set up and will benefit you in the long run so here we are in our windows 10 machine and while you can install certain softwares directly to windows like i mentioned before we will be using docker just to give us a consistent environment across both platforms so the first step is to install docker on windows 10 and luckily it's extremely easy just google docker install windows go to the first page i know it's defaulted to using bing gross and follow the steps listed here all you have to do is download docker desktop for windows and make sure that you have this wsl2 backend installed which is windows subsystem for linux which allows docker to run so once you get that installed you will have this nice little docker desktop environment and while it is useful for the basics i wouldn't consider it that useful compared to some other orchestrators like portainer we'll get to that in a minute the first thing we're going to do is download a popular service called next cloud next cloud is essentially your own personally hosted dropbox which allows you to share files across devices and across the cloud and from wherever you are in the world so if you find the software you want like i mentioned before just google the name of the software and docker and there will probably be a supported image so that's what we're gonna do here so we googled next cloud docker we see that there is a next cloud official image on docker hub when we go to that it is showing official image and here is all the resources for that image and if you scroll through here it will give you tons of information on how to get it set up what volumes or variables you might need to set up along the way and a lot of other information about the software itself so luckily it's extremely easy to get set up if you want a completely basic installation it's literally one line right here docker run d port 8080 exposed to port 80 internally and next cloud is the image you'll use you can simply take that command copy it and run it in windows powershell or the command line when we run that it's going to download all the files it needs i've already run this before so it already has the image but once it downloads that it will spin up a container so if we go to our docker desktop you'll see that we now have a container running and it gave it a random name distracted galileo and you can see it is exposed to port 8080 so if i go to localhost 8080 next cloud that easy and it's asking us to set up an admin account so we will do that very weak password that's because it's password come hack me and just like that next cloud is configured and ready to go here you can see our dashboard which we're already on i guess it wants to reload it if we go to files you'll see our file system it comes with a bunch of default files and default folders here but here's where you can store a bunch of files that you may want to share with others across your lan and if you want to get this set up to where it's exposed to the outside world i have a video for that link is up here if you want to check it out but yeah now you have a basic installation of nexcloud running as a container in docker on windows now the windows docker desktop environment isn't the greatest to use and i mentioned something called portainer before which i think is a much better docker orchestrator so let's go ahead and get that set up so again like most things just google install portainer docker on the official page they give you instructions and luckily they're extremely easy the first thing we have to do is create a docker volume and we will do that here then once that's complete we are going to run the next line which is much bigger and scarier but again just copy and paste okay it's going to do the same thing before with next cloud it's going to download all the required packages the entire image and get that installed so wait a second for that to download and it is already done and started so now let's go back into our docker desktop and you will see we have another container running portainer and that is exposed to port 8000 and you can see in the command we ran we exposed port 8000 as well as 9443 now 8000 is for http 9443 is for https so if you go to localhost 8000 and it doesn't like it then consider trying 9443 and in some cases 9000. and like i said see how it's saying not found it is wanting us to use https so we are going to use 9443 and it's saying whoa http requested http server that's because we actually have to enter https colon double backslash it's going to give you this warning because there's a self-signed certificate that's perfectly normal and okay continue and here we have portainer we're gonna create our password again hit getting started and here we are in portainer a docker orchestrator that is running in docker it's kind of like an inception thing but i strongly recommend going with this if you don't have much docker experience this will make it easier to get things spun up and monitored so you can go to your local environment and over here you can see your stacks your containers your images similar to the docker desktop for windows we can go look at our containers and you'll see it is exactly the same as we see in the windows desktop and that is because it's just keying off the host docker instance same thing the windows desktop is doing docker is running on your host these things are just looking at it and reporting back to the user so the cool thing about this is that it makes it extremely easy to create custom templates or use the ones that exist here so if we go to app templates you can see a whole bunch of stuff is here already for us so if we want to spin up a wordpress site we can simply click on this give it a name our database root password we specify that here hit deploy stack it's going to do its thing in the background downloading the images and spinning up the containers so you can see we have a wordpress wordpress container in a wordpress db container that houses the mysql database and both of those work in tandem to create the overall wordpress service so if we look here you'll see that wordpress is exposed to port 50609 so if we go to that five zero six zero here is our wordpress site and we are just going to set up a default one and here you go we have a wordpress site running and if we visit it i'm sure it's nothing too exciting but there you go host your own website running through docker on windows so windows still running you have access to your basic windows 10 machine if you want to use it like that but you also have docker running in the background that is hosting other containers and other services that are providing more of a use as a home server than a regular windows 10 machine so yeah that's it for windows 10 now i'm going to show you how we can do this in a hypervisor os which up to a certain point will be different but once you get docker installed same exact steps and that is the beauty of docker how you install something in docker in windows will be the same as how you install it in docker in linux and whatever flavor of linux and even in mac os so it's pretty great okay now let's do the same thing with a hypervisor os so the one i'm going to be going with is proxmox that's because personally that's what i use now i have videos on me trying out and using other hypervisor os's like media vault trueness core trueness scale and unraid i will link all of those videos down below if you want to check them out but today we are going with proxmox so i'm not going to go over the entire installation process of getting these set up they're pretty straightforward no matter which one you go with just go to the website and follow the documentation it's essentially going to be flashing the iso image to a usb drive and then booting from that once you get that set up you will access the web gui using the ip address of the machine followed by the port number specified depending on which one you're going with proxmox uses 8006 by default and it uses https so once you're in you will see something like this now i've gone ahead and set up a container to run docker just to make sure this video isn't like 10 hours long i think it's already pretty long but when you log in you'll basically see your data center and your node which is essentially your machine and then in your machine you will have maybe different storages different virtual machines different containers and there are different ways you can set up docker and proxmox proxmox is debian linux based so same way you'd set it up on a ubuntu desktop or an ubuntu server very similar in proxmox but what we're going to do is set up a linux container so the beautiful thing about a hypervisor os is that it makes it easy to take a single system and create multiple virtual machines or multiple containers that way you can allocate resources directly where you want them so if you want a small container or small virtual machine with very limited resources maybe two gigabytes of ram and two cores to run some really low power services you can do that and then save a lot of your resources for a maybe bigger container or bigger virtual machine and that's honestly one of the biggest appeals of running a hypervisor os so you can do this with a virtual machine or a container a container is more efficient it uses less resources it runs off the host's kernel so it makes it a little bit easier and more efficient so that's what we're going to do and it's super streamlined super easy to do so first thing you're going to do is go into your local storage and under here you'll see something called ct templates and by default you won't have anything here but just click on templates and this will give you a nice list of default templates for different services you might want to deploy using the linux containers so we're just going to use a standard ubuntu server container and you can pick whichever one you want i went with 20.0.4 and then click download once you do that the template will be available right here you can see oh i went with 21.0.4 and then it's extremely easy to create the container you simply go up here to create ct or if you're doing this for a vm you'd have to download the iso image first and then upload that so that you have something to boot from but we're just going to create a container so click create give it a name we will call this ubuntu server 2 because we already have one i'll leave everything default give it a password to access it next here's where you'd pick your template now remember we did our local storage if you downloaded it somewhere else you would select that here but we only have one destination for containers so then pick that ubuntu 21.0.4 click next disks now this is just how much space you want to allocate it for the root file system so we're using our lvm storage on our local 64 gigabyte ssd or in this case my regular ssd and we are going to give it i don't know 64 gigs next cpu how many cores and proxmox uses the term cores when it really means threads so how many threads do you want to get it we'll give it four next how much ram we're gonna do four gigs how much of a swap disk do you want here in network if you want to assign a static ip address you would specify that here and that's what it's configured to by default so if you end up just clicking next here and wonder why your container can't connect to the internet that's because you said it's a static and didn't give it an ip address so we're just going to use dhcp so it'll get one by default and you can set it on the router side if you want a static one click next dns domains just gonna use our host one confirm and start after created and the beautiful thing about containers is that they spin up extremely quickly so just like that it's done it took probably 10 seconds and then you can go in here and use the root user as well as the password you provided and we are in our ubuntu server container and this will act as a simple ubuntu server machine and you can use it as such so if you want to install docker same thing as we did before docker install ubuntu server and we'll go to the official docker docs it's going to give you a whole bunch of stuff here and it's going to ask us to do this to uninstall old versions we don't have any old versions and it's going to want us to set up the repository so we're going to have to run an apt-get update so let's do that the next step is the prerequisite so it's going to want us to install some of these things there's that in yes we want to install it all and then once that's installed we will use the curl command to install the docker official gbg key so we're gonna go ahead and run that that was quick and this will set up the repository for us so we're going to run this command boom and now finally we can install docker now we're going to run app update get again or apt-get update it's going to pull all the updates from the docker repository you can see that's now listed here and finally we can install docker it's not finally it was really quick it's a pretty big install 488 megabytes but you'll be alright and just like that we have docker running and we can use it the same way we used it on the windows machine we can install next cloud the way we did it before or we can get portainer installed and that's what we'll do i'll show you again just how we can install portainer cortainerinstall docker we'll do this again oh look the same instructions again follow these create the volume run the command it's going to do its same old stuff pull it blah blah blah and now we have portaner ready to go so i'll show you my instance that i have running pertainer up and running using a nice dark mode and you'll see that i have sync thing running i don't have next cloud running i'm using this to run sync thing and i'm running this through a template using docker compose so now remember how i showed you all those app templates from before now sometimes the thing you want isn't going to be listed there so you can create a custom template and here you can see one i have for sync things so let's go in here edit and i will show you this is an example of a docker compose yaml or a docker compose command that it'll use so for example for sync thing i just googled sync thing docker again on docker hub and when you scroll down you'll see sometimes that they provide a docker compose yaml file and you will simply just take this copy it and paste it into this location right here and this makes it much easier to specify different volumes different environment variables or different networks you want to use for that container so i personally like using docker compose i think it's much easier to work with the syntax for running it is a little different in portainer you would just update or create and then deploy it so when i go to custom i can click here and then click deploy the stack it'll deploy it in the same way it did for the regular app templates and just like that i have sync thing up and running so yeah from here you can just use docker the same way used on windows and like i mentioned before using docker makes it easy to take applications that you're running on one system and deploy them across multiple platforms so it doesn't matter which operating system you go with as long as you're using docker it'll be the same across every single machine so that is the reason i'm going with docker and you don't have to do it but that is just what i suggest this is pretty much everything i want to cover for taking an old system and converting it into a home server i know there's way more advanced things you can do but i didn't want this video to be longer than a kardashian relationship so we kept it brief and to the point that's all i have for you today i hope you enjoyed it i hope you learned something if you have any questions feel free to ask them down below or for a more intimate experience please join the discord and ask there we have a bunch of nerds over there willing to help out if you feel like supporting the channel then head over to my patreon where i will gladly take your money in exchange for my body in exchange for one-on-one conversations and behind the scenes footage but if you made it this far in the video i sincerely appreciate it please consider subscribing if you enjoyed content like this thank you so much for watching i will see you in the next one [Music] you
Info
Channel: Raid Owl
Views: 582,628
Rating: undefined out of 5
Keywords:
Id: rmVCtZrtvgA
Channel Id: undefined
Length: 23min 55sec (1435 seconds)
Published: Tue Jan 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.