The World's Smallest Home Server - Raspberry Pi Zero 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay you ready i guess so boom check it out that's tiny well i mean yeah it's what everyone says when they first see but it can actually do a lot i don't know about that are you kidding me this thing's got a quad-core arm-based processor clocked at one gigahertz 512 megabytes of ram full wi-fi old gpio 40-pin layout and it only pulls like one watt it's freaking crazy oh i think it's cool so yeah [Music] so like the title of the video states we're going to be turning this raspberry pi zero two into a server effectively making it the world's smallest home server totally verified by guinness 100 don't fact check me now before we get started let me make one thing clear if you're expecting me to pull some kind of magic out of my ass that's going to make this thing go head-to-head with a full-fledged amd epic bass system with 64 cores and a terabyte of ram then i'll have some of whatever you're smoking the idea here is to have a cheap low power device and turn it into a quick portable capable way to run or test some of your home lab services now to get started we will be flashing our sd card with raspberry pi lite as we won't be needing a desktop environment there have been some major upgrades to the official raspberry pi imager that make this experience much better by letting us set up wi-fi ssh and credentials all from within the imager neat this way we don't have to worry about modifying config files manually or even worse hooking up a keyboard monitor and mouse of course you can choose to install the desktop environment if you have services that require it or if you know you just want to do it it's your hardware in my case we'll be using docker for everything which doesn't really require us to have a desktop environment so we don't have to allocate any resources to it and resources are pretty slim pickings on the raspberry pi zeros the pi zero two has a micro usb input that you could use for whatever expansion you see fit note that it is limited to usb 2.0 speed so don't expect a ton of bandwidth for my little server i purchased a micro usb to usb type a adapter which will let me connect an equally tiny external storage solution i'll leave it to you to decide how you want to use this port whether that's for storage networking foreplay peripherals whatever so obviously the first step in getting our pi zero to start pulling its weight is to get docker installed well first step is actually to ssh into our tiny boys so let's do that all right here i am in windows 10 and we will be using powershell to ssh in if you're using mac or linux then you can just use the terminal we're going to go ssh we will be using the default pi user and the hostname that we provided when we were installing linux to our sd card was pi0.local let's ask for a password you'll never guess it and boom we are in now once you're in the first step is to get docker installed now i've done this so many times on all my other videos and honestly it's already running but i will show you these steps you have to run through it's literally like five lines and it will be linked down in the description so it's on the official docker website first thing you do is run an update install some prerequisites add the official gpg key set the repository and then literally update and install docker it's what one two three four six lines so you can do it now i'm using portainer to run all my stuff it's very common on a lot of my systems you don't have to use partainer you can stick to vanilla docker cli if you're a hardcore beast but i'm just a baby bag so i'm using portainer like i'm joking i don't think people who use poor tanner it was just a joke chill and portainer getting that set up is equally as easy uh go to the official portinger website and it will give you deployment instructions just create a volume and then run one simple command you can literally copy and paste both of those run it and portainer will be set up and good to go so to access portainer just go to your host name followed by the port that you specified for most recent builds it uses 9443 and https so make sure that you are following those steps or whatever you specified when you set up portainer and immediately you'll see that i'm running quite a few things over here let's go into my containers so excluding portainer we have jellyfin and nginx self-hosted website nginx proxy manager uh file browser and pi hole so we have quite a decent amount of things running on here now again this is all about perspective this isn't a massive home server that costs thousands of dollars and sucks up hundreds and hundreds of watts this thing is using just under five watts when fully ramped up and at idle sits around one so yeah this is a very low powered machine so these are the services i'm running and honestly it runs them fairly well so if you're not familiar with portainer a reason why i like using it is because it uses docker compose by default and i'm a fan of docker compose i think it's easy to spin up stacks using docker compose and the implementation in portainer i just think is very user friendly so the way you go about that is you go into app templates and in here they already have some preloaded templates you can choose from now keep in mind that some of these don't natively support arm-based systems right out of the box so you may need to create your own custom templates and make sure that all the components are supported by arm you can check this by looking at the tags in the docker image so pretty much for all of mine i have custom templates created let's start with jellyfin so we'll go in here to edit and you can see my jellyfin instance and one thing you'll notice is down here in volumes i have it mounted to a local mount which is tied directly to my external storage so i am using a really tiny little usb external storage ssd just to give me more than the 16 gigabytes on the sd card you are free to add multiple terabytes if you want but for this example i wanted to keep it low power and small footprint i'll just go back into my server and actually show you so if we do an lsblk you can see that we have this sda1 partition it is 120 gigabytes and you can see the mount point is slash mnt slash portable and if we go back to my docker compose yaml you will see that the volumes i am passing through for jellyfin to use as its media folder and config folder are in that same location mount portable data jellyfin config and then data jellyfin jellyfin jellyfig jellyfin data so that simply means all i have to do is put any media into this data jellyfin data folder and it will be picked up by jellyfin and i can watch it on whatever device i want so let's see in action so if we go back into the server we'll just take a look at what's in there it was in mnt portable data and jellyfin and then data you can see we have two movies inception and the rock rest in peace sean connery so we should have two movies on jellyfin to watch now i have gone through and deployed this obviously you saw that the container was running you can see it is exposed to port 80 96 so again pi0.local port 8096 and you'll see here's our jellyfin instance and there's our movies and jellyfin is just like plex and that it's used as a central media server to host your media so that you can watch it locally or remotely or wherever on whatever device you want but jellyfin is obviously free and it is a bit more customizable you can modify the entire gui if you would like i know there's a lot of templates out there for that but i am just using the default one because again i'm a basic so yeah let's pull it up on the phone and see how it works now again this is a quad core arm based one gigahertz processor on a device that's using about 2 watts of power keep that in mind so obviously you're not going to want this thing real time transcoding your 1080p you know 50 megabit footage but over local network it's perfectly fine okay here we are in jellyfin and let's go ahead and pick up where we left off with inception boom it's playing and while that is playing let's go back into our server hit uh top so we can see how this is running and how it's handling it and yeah you can see we're using a good bit of our ram which isn't a big deal we're using all of our swap and our processes let's look down here it's not too bad you can see jellyfin is using about 23-24 of the cpu and that's just one stream now obviously this is over the local network it's not doing any real transcoding on it but again tiny cpu low power very impressive all right let's move up the list nginx so if you want to host your own nginx website or service or whatever you can simply spin up a nginx docker compose yaml which i don't have meaning that i used the default one so let's go into our app templates go into engine x show advanced options and here is where you can specify which ports you want to map to by default it uses 80 and 443 you can map those to whatever you want it will pick them at random if you don't specify here for your nginx container i would suggest leaving this as its default and for your container that contains your website information you can change this to whatever location your website is stored on so in my case i just throw an html file on my portable ssd let's go back there and you can see an example of that remember we are in mount portable data and here you can see i have a file browser a jellyfin an nginx and a photo prism that was for testing purposes that's a future video but here we have our engine x folder so let's go into there and see what's in there an html folder let's dive into there and there's one file index.html let's take a look at it wow what an amazing website you can make it as elaborate as you want if you have more experience with nginx but just to show you as an example let's go back to our containers nginx it is hosted let's see it is so some 49176 wow beautiful self-hosted website put this on your resume you'll be a google in no time moving on staying in the nginx family nginx reverse proxy one of the most popular services that a lot of people run to run a reverse proxy on their system meaning that it's going to stand as a middleman between your services and the outside world so that you can bring in all your traffic and have it navigate through your reverse proxy and point to whatever services you want on your lan so yeah for this i again did my own custom template let's go take a look at it and here you can see again very simple very easy to implement so the only things i really changed were the default ports everything else is kind of left static we can go take a look at our example it is hosted on 40 000.80 we gotta go to the admin panel which is apparently not on this one is it just that i forget which one the admin panel is on it must be on 4081. found it so here we are in nginx proxy manager i have an entire video dedicated to getting this set up i will link that up here i recommend checking that out if you want an easy to set up reverse proxy in your network and honestly it's really cool so i recommend checking that out but here you can see it runs on a raspberry pi zero two with no problems we can go in here and add a proxy host if we want taco.potato.com [Music] uh maybe we want that forwarding to a local uh ip of this over port 80 sure why not save ah you have to press enter save just like that we have a reverse proxy set up for taco potato.com forwarding directly to uh my local ip of 10 desert desert.26 over port 80. now there's no ssl on this yet uh if you want to learn how to do that again check out that video but this just goes to show you how versatile this pi zero two actually is all right file browser it is another service that i strongly recommend it is easy to set up it's a lightweight it is convenient and it is what it says it is it's a web-based file browser where you can store all the files you want and you can share them remotely with whoever you want so again go into your app templates and down to file browser which is a default option you can name it whatever you want by going to advanced options and for data just like with jellyfin and others changes to a binding mount and then specify a host location so going back to our server you will see that we have a file browser location and let's take a look at what is in there data so what is in there a database.db which houses all of the files so this is going to be the location that we want to use now obviously i've set this up before and if we go into our container you will see that my data path is mounted directly to what we were just looking at mount portable data file browser slash data so all right let's check it out and just like that we're in file browser like i've said before it's not the sexiest service or gui that you've ever seen but it gets the job done and it's extremely straightforward to use so you can create folders in here and we can call this new folder boom it puts you right into that folder you can add a file new file dot text and just like that it puts you in here i can say hello guys subscribe to your favorite owl read owl save boom there's a file you can also upload files you can upload entire folders directly from your local machine you can download whatever files and a really cool feature is that you can share so click on this little share icon you can specify a time if you only want to share it for five seconds if you want to share it for a thousand days you can specify that here you can also specify a password on that and then when you hit share it's going to give you a link you can copy that link is copied you can now send that link out to whoever you want assuming that you've opened this up to your wan and you are using nginx proxy manager or whatever reverse proxy you can now share this with whoever in the world and they can download and see whatever files you have shared in file browser and all of this is being stored on that tiny little portable external drive so again you can set up terabytes worth of data you're not limited to a tiny 120 gigabyte ssd so keep that in mind all right back to the last thing and no pi would be complete without setting up pie hole right everybody and their mom the first thing they do when they get a raspberry pi is set up pie hole and if you haven't heard of pie hole it's basically just a dns server that you use to block incoming ads and set up custom dns rules so it's extremely lightweight that's why it's so popular on the raspberry pi and i don't have a dedicated video on this but you can literally find thousands of videos on youtube for setting up high holes so i have it running on here i'm not gonna walk through the entire setup process i will show you the template that i used here it is um i didn't change hardly anything here the only thing i changed was the password which obviously is not a real password or is it and then the ports you'd like to use so again this raspberry pi zero is hosting quite a few things and you are not limited to just this as you saw when i ran the top command we are not pinning this cpu by any stretch of the imagination we still have a lot of headroom on this thing so again really powerful for what it is so that was a tour of my raspberry pi zero two world's smallest home server what do you guys think let me know down in the comments i think it handles everything pretty well it's a decent amount of services obviously i could throw more at it but with the amount of computers i have around here i don't quite need to throw more at it but hey you never know now i know raspberry pi zeros are extremely hard to get both the original and the two now the two is much more powerful and you still can do this with the original this one is actually an original right here i tested it on this and it handled everything but it just handled it much worse and slower now it did run jellyfin but it was using quite a lot of cpu just for running that one service so again i know they're hard to get so if this is all you can find then feel free to go with that if you can get your hands on a raspberry pi zero two by all means go for it they are retailing at fifteen dollars unless you find them at a retailer you'll probably have to spend upwards of 30 maybe even 50 to snag one but for what they are and the low power they consume and how versatile they are they might be worth it depending on your budget obviously so let's jump into comment of the week this one comes on my chromebook to home server conversion video so very similar to what i'm doing here so if you have a chromebook lying around that you want to turn into a home server check that video out but this comment comes from gabe who says i like portainer i personally prefer the graphical screen because i know all the settings with command lines i sometimes miss certain things i agree gabe i like gooeys as well i also like using the command line it's not really an either or you can pick whichever one you want now so there's the stigma that if you're using the command line that's the only way to get all the features you want and if you're using a gui then you're a noob who doesn't know what they're doing and is kneecapping the software but honestly a lot of services put a lot of work into creating really functional guise that are extremely user friendly and you don't have to be some kind of crazy basement dwelling linux nerd to want to spin up awesome services on your home server so if you have to resort to using the gui you don't have the time to learn cli then go for it but that is it i hope you found the video entertaining maybe somewhat informative i'd be interested to know what your lowest power home server device is in your entire setup can you beat the three ish watts on a raspberry pi zero two let me know down in the comments but if you like this video be sure to drop a like if you like content like this please consider subscribing it helps a ton we are almost at 15 000 subscribers which is absolutely freaking bananas i can't believe it and i want to give a huge shout out to all my youtube channel supporters and patreons our members youtube members and patreons you guys are awesome you are all listed right here-ish somewhere you guys are the freaking best but that is it if you got this far in the video i sincerely appreciate it thank you so much for watching and i will see you in the next one [Music] you
Info
Channel: Raid Owl
Views: 42,792
Rating: undefined out of 5
Keywords:
Id: kaZkQeVKe1E
Channel Id: undefined
Length: 21min 50sec (1310 seconds)
Published: Wed Mar 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.