how to build a Raspberry Pi NAS (it’s AWESOME!!)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Okay, I'm excited for this one. We're going to turn this a raspberry PI a credit card size computer into a Nass, a network attached storage device. What? Yes. I actually needed a small NASA to take with me on my family road trip and the raspberry PI. It's perfect. And shout out to bid defender, total security for sponsoring this video. If you don't want to get hacked, they are what I recommend you use to protect yourself. We'll talk more about them here at later in the video. So this will be my travel nest. Something that can hold a ton of movies and Plex media server, and also be a place where I can offload my vlog footage for my camera and sink back into my house, which this will do all of that. It's amazing. So get your coffee ready. And this video, I'm going to show you how to build a raspberry PI Nass Nass that you can take with you as you travel, or it could be your main Nass at your house. And I know what you're thinking. Do I actually need a Nass? Yes. Yes. You need a Nass. This video will have two parts part number one, setting up your raspberry PI as a Nass. I'll walk you through every step part. Number two, I'll walk you through how to set up a Plex media server on that same raspberry PI, which is awesome. So now that begs the question. What do you need to do this? I do recommend you getting a raspberry PI four and the more Ram the better. So four or eight gigs ramp, like all raspberry PI projects, you'll need the essentials like a power adapter SD card, SD card reader, and a case which is optional, but that's what you need. I've got links below for a kit that includes all of this. And then finally you'll need some sort of USB hard drive for this. It could be anything. It could be one of these massive Seagate hard drives, or it could be a small T five Samsung SSD, which I do recommend these they're wicked fast and last, but certainly not least. You're going to need some coffee network, chuck.coffee. Now, if you want to go crazy like me, you can get this really cool kit from geek worm. It comes with a raspberry PI hat to that'll let you install an internal state of hard drive and then put it into a nice little case. It's awesome. So if you want to do that by that, but as far as following along this video, it's the same instructions. Whether you're using an external hard drive or you're buying that geek or I'm kit anyways, enough of theory and talking, get your coffee ready. Oh, and also in case you're wondering what's in NASA and why do I need one? I already answered that question in this video, wherever it is up here. And just so you know, normally getting a Nass, it's kind of pricey. It'll set you back a pretty penny, but dude, this where my raspberry PI go raspberry PI. Here he is. But this is relatively cheap and awesome and fun. So why not? So here we go. Raspberry PI ness right now. So step one, let's go ahead and bake our pie or prepare our SD card and get the operating system on there. So what we'll do is get your micro SD card, plug it into your USB adapter. I have one right here and then plug that into your computer. Boom. From here, we're going to prep our SD card by using the raspberry PI imager it's everywhere, windows, Mac, Linux, check the link below and download that sucker and we'll go and get started. So first we get to choose our operating system, go and click on that. And from here, we're going to choose raspberry PI O S other, and then we'll select the raspberry PI iOS light, which basically means no desktop, no goofy. All we care about right now is having a command line and then choose your storage, click that and select your SD card that you just plugged in and make sure you select that sucker. And don't overwrite something important, like your hard drive. And then here's a little hack. It's so cool. I just found it hit control, shift X on your keyboard. Bam. What just happened a little head and shortcut that allows us to prep our operating system. Before we actually throw it into our a raspberry PI things like, Hey, I want to enable SSH and we can set the password for the PI user. So go ahead and select that. I'm gonna put the password in for my guy. Now you can also set up wifi, but I highly recommend you use Ethan net for this project. In fact, I tried to do wifi and something broke. It didn't work. So go hardwire on this one. Now that's all I care about. I'm going to click save. And what this enables me to do is not have to plug it into a monitor and put a keyboard and mouse on this guy. It's going to be a headless install, which means I plugged into my network. It comes up and I can just simply access it. So once you change your settings, go ahead and click on a right and it's going to format it. Yeah, I am sure let's do this. Here we go. Coffee break. Okay. My pie is done baking. We can pull that sucker out of the computer and get that in the PI. So pull the micro SD card out. Slide that into your raspberry PI. And now we're ready to booth a sucker up. Ethan, that cable. Oh yeah. Love that sound and power. And that's it. He's booting up. Now. We're going to access and log into this raspberry PI via SSH, but to do that, and we have to first know his IP address, but how do we find his IP address? Well, the easiest way is to check with your home router. Your home router will give out an IP address to your raspberry PI via DHCP. And if you log into it, just look at the last device that signed in and got an IP address for me. I'm using unify and boom. I know this is the guy right here and yeah, I do have a ton of raspberry PI. So leave me alone. So find the IP address, launch your command prompts or terminal, whatever OS you're using and now to SSH into our PI the command will be S S H space pi@theipaddressofyourpiten.seven.one dot 1 0 8 for me, and then hit enter. Yes, I accept it type in. Yes. And then the password you set when you set up your PI, if you did not do that, it'll be raspberry. All lowercase and bam. We are in quick coffee break just for fuel. Here we go. All right. First things first, we need to make sure this raspberry pie is up to date. So we're going to do sudo apt update and then do ampersand ampersand and ant space. Pseudo apt upgrade. This command is doing two things. First. We're updating all repositories and they're actually installing all the available updates. If you want to learn more about how that works, check out my Linux series right here, somewhere over here. Anyway, let's keep going. So go ahead and hit enter. And this is going to take a little bit, so coffee break. Yes. I want you to install everything. Thank you. And mine is done. He'll know yours is done. When you see the matrix stop scrolling, then you're good. Now to install our Nast software, to turn our raspberry PI into a Nass, the best solution I found for the raspberry PI is called open media vault. It's amazing. And we can install it with just one command. Check this out by the way, I'll have all these commands below. If you want to follow along and copy and paste, because that's what I do anyways. Here's our command. I'm going to type in sudo. I'm going to paste it in there. And what we're doing here is using the w get command or downloading a script from GitHub. This is from open media vault, and then we're running that script using bash. And the script is going to do a ton of things. This will actually take a bit of time, a super long coffee break, but anyways, all we have to do now is hit enter. It's so simple, man, here we go. Real quick. Let's talk about cyber security. Why? Well, because you're about to install a Plex media server on your raspberry PI, and often when you're downloading movies, you might be downloading those movies from sites that maybe are thieves most secure, meaning you could end up downloading a virus, malware, ransomware, things that can bridge your computer. Things that could destroy your data. You've got to have something to protect yourself, and that's why I recommend it. But defender, total security. They are the sponsor of this video and they legit are the most intense protection I've seen on a computer as far as antivirus, which if you want anything to be intense, you want your security to be intense, calm. Quietly, or there will be. Trouble, right? Yes. Right. There are three reasons why I can recommend a bit defender. The first and most obvious reason is their protection here in my total security dashboard. If I click on protection, we've got antivirus, advanced threat defense, online threat prevention, vulnerability scans, and something really cool that I love ransomware remediation, which I don't have enabled. Hold on. Let me click that. Okay. It reverses damage done by ransomware, by restoring encrypted files. That's killer. Now what's cool is a lot of this protection right here involves scanning your, your network traffic. It's constantly looking at the things that your computer is connecting to and things that are connecting to your computer and going, Hey, is that good? If it's not get out of here, it's also constantly checking the web pages you visit to see if they are dangerous, like phishing websites. COVID defender does all of this without hurting your performance of your computer, which is the main reason people normally disabled their antivirus because it slows down their computer. You don't want that slow down. So this'll actually be fine for you. And the third man, it has some full privacy features. If I go over here and click on the privacy tab, they've got a lot of cool stuff here, but the thing I love the most is the video and audio protection. I mean, we're all paranoid, right? That our webcam might be a gateway to some hacker. And you're always covering up with tape or something. The defender protects against that. It doesn't let just random programs access your, your webcam and your in your microphone and stuff. So if you care about protection, performance, and privacy, which I mean, why wouldn't you care about that? Then check out bit defender, total security. So check my link below in the description. You'll get five devices for free for 120 days. So yeah, dudes try it out because it's no fun to get hacked. You want to be the one doing the hacking. You don't want to get hacked. So protect yourself. Okay. I think mine is done. And I say, think because you may get disconnected from the raspberry PI, as it's doing its thing, it also may change its IP address. So you may want to go back to your router and double check to see and mind to change. Actually it was 1 0 8 before now it's one 11. So I'm gonna get logged back into it real quick. SSH PI at that new IP address, it just randomly got that's. It opened media ball is installed. Let's go log into it. So we're gonna actually going to go to the, uh, web gooey. So open up your favorite web browser and let's navigate to ten.seven.one.one, one, one for me, whatever it is for you. Aha. Look at bits. Okay. Let's get logged in default. Username is admin. Default password is open media volts. Yes. Whoo. Here we go. We're in now. Yeah, there is a lot going on here. Don't worry. I'm going to walk you through a few steps. Get you up and running with your Nass. Step one. Let's change that default password. You want to get hacked here? So on the left here, we'll click on general settings, general settings and then click on web administrator password and just type in that new password. Click on save. And it's going to kick you out. I think we're good. Me refresh the page real quick. Reload. Oh yeah. We're solid. We're good. Password changed. Okay. Next step. We are ready to plug in our USB external hard drive. So let's go ahead and do that. And it's really that simple mine is coming up and now let's make sure that the open media vault can actually see it. So under storage, we're going to click on discs, click on that fingers crossed. Yeah, there it is. Awesome. So you should see something like this. You'll have your SD card that your OS is installed on. And then that USB hard drive that you plugged in. Hopefully now you could get a massive SD card and simply run your Nass off of that store. Everything on there, but it's going to be more economical for you to have a USB hard drive. So now let's actually start using it a few steps here. Now we're going to navigate to a file systems over here, underneath storage, going click on that from here, select your USB hard drive, select, and then at the top select Mount and boom, give it a second. It's thinking let's do it with stuff. Yeah. Notice when we did that, two things happen first is like, Hey, I can see things. It's mounted second. It's like, Hey, do you want to apply these changes? Not quite yet. We want to make a few more changes, but just know that nothing will actually take place until we click apply. Next step. Now that we have this file system mounted, we now need to create a shared folder, which will be right over here under access rights management. Bam. There she is shared folders. Go ahead and click on that. And here it should be blank. Nothing. There let's change that. Let's go ahead and click on, add at the top left. Kind of yeah. Click on, add couple of things. First let's name, our shared folder. I'll name mine. Nasty. It's minus uh, next select device here. I've got one choice. My USB hard drive. The one I just mounted that has already filled out for you based on the name you put in permissions for most of us whatever's already there by default is fine and that's pretty much it. Go ahead and click on save. Boom. Not for me. It looks like it had a bit of trouble with permissions. Uh, I'm going to go fix that right now actually. So if you've got the same thing, let's cover it. So go and click on. Okay. And here we can actually just close this out. Uh, cause it's already there. There it is. So let's fix our permissions. Um, go ahead. Make sure you have nasty selected and then click on privileges right here at the top for our user pie. I want to make sure he does have read, write access. I'll go ahead and do that. I'll do it for as user and group just for fun and click on safe. Cool. That's good. Now at this point, I do want to go ahead and click on apply cause uh, I'm getting nervous. I wanna make sure my changes are actually going to take effect. So go ahead and click on apply to have all these things do it and yeah, I do really want to do it. So click on yes and quick coffee break. Good stuff. Okay. I think that means we're solid. Amazing. Yes. Okay. So at this point, our raspberry pie, it's a mass man. It's got some hard drive. It's got the share setup, but now we have to configure how we can actually access it. How we can use it for this. We really have two options. Well not only two, but the main two ways are through NFS or SMB. Those are services that we can enable right over here under well services. Now, which one should you enable? Well, SMB, that's going to be windows. That's what windows uses as default for file sharing. And then for Lennox, that's going to use NFS and this will also be Mac as well. Um, do both. You can do both. No worries. We're going to do that right now. So first I'll click on SMB, go and click on that. And it's super easy to do this. Stupid, easy. Just click on that little dot or check bubble. Just click that. Please. I'll have to call it and click on save. That was easy. And then one more thing. Click on shares right here and we'll need to add the share we already created. So just click on, add and we'll select our shared folder. We already have created nasty. There you are buddy. We've got some options down here, which you could very well change. If you want to like setting it to read only or enabling time machine support, you can always go back and change this. I'm just going to click on save. Let's go ahead and do NFS as well. So under services, once more click on in Fs, that's a horrible arrow. What am I doing? Anyways? Click on NFS. Same story here. Click on. Enable hoo. So hard. Click on, save and then under shares, click on that shares button right there. Let's go and add him. We'll add nasty. There you are nasty and click on safe again. We have some options. You can always go back and change. We'll click on save just for fun right now. And then finally to make sure all these changes take effect the very top, right? We're going to click on apply to make sure this stuff does it stack so click on apply. Yup. And coffee break. Fingers crossed. Oh no, I curse that. I got an error. Let's go it on. It looks like it's NFS related now. I'm not sure right now what's going on. I'll just click on. Okay. And uh, I'm gonna try it one more time just to see what happens. Yeah. Let's give it one more chance here. Same issue, time to troubleshoot. Okay. I found a solution. So for those of you who want to use NFS, you got to do this. This basically involves deleting and reformatting your hard drive. So if you have anything on there, you want to keep yeah, you're going to lose it anyways. So what I did is I first stopped my SMB service. I then deleted my shared folder. So it's not here anymore. So it's gone. And then under file systems, what you don't see anymore is my USB flash drive because when I, or not flash a hard drive, because when I selected it, I selected unmount and it unmounted it. And then finally I went over to discs. I selected this bad boy and I said, wipe, which erases everything. So now we're at the point where I can go over here to file systems and create a new file share, click on, create here at the top, right. And select our device, which is right there. My Samsung there I'll label it. My drive and file system. Ext four is what we want click on. Okay. And it's going to delete everything, create a new partition for us, and this should solve any issues with NFS. Again, if you didn't have that issue, you could just skip the head. Anyways, I'm going to go in and re enable NFS and SMB and see if this using the exact same steps as we previously went through. Anyways, coffee break while this does it stay. All right. Cool. My file system is ready. Then take too long, going click on close. Pretty much the same steps as before I'll click on him to mountain. He has been mounted. Okay, next I'm going to blow through this by the way. Cause we've already done it. Shared folder create a shared folder privileges like in my PI guy, the rights save. I'm going to go into apply this just to make sure it all works well. And then we'll do SMB and NFS and see if we get the error message, which is what we doubt. And then very quickly the same steps as before enable SMB, add the share, enable NFS the share. And now let's click on apply and dang fingers crossed. Yes. Come on. Come on, come on, come on. Come on. No error message. Yes, problem sod. Easy enough. Here we go. So now let's just make sure this thing works. So I'm going to actually connect to the share in windows. So here in windows and launch my, uh, file Explorer, go over here to new this PC and just right. Click here and click on, add a network location, click on next, next. And then right here, two backsplashes ten.seven. That one.one oh one, my raspberry PI IP. And then the name of my share, which was nasty. Here we go. Prompting me for a login and put in PI and then the password for PI. Huh? Didn't like that. Hmm. Let's go take a look at our users real quick. So scrolling on the left here under access rights management, I'm going to click on user and there's Mr. Pie, but uh, he's not working. So let's go ahead and edit him real quick. I'm going to select Mr. Pie, select and edit and I'm just gonna change his passwords. I'll put a new password in here. I guess I assumed it would use the same login as the, uh, system. Maybe it doesn't I'll click on. Save interesting error. Try it again. Okay, cool. That worked apply. Okay, cool. We successfully changed the password of Mr. Pie here. Let's get back to our file share and that same password in once more. This should work now. Yes. Okay. I want to name this nasty and it's done. So now if I look at my file Explorer, there he is. Click on him. That's my raspberry PI. That's the Nass. I can just drag crap over there. Like let me just, uh, find something real quick. I'll just drag the raspberry pie imager download from earlier, which I'll just copy that jump bins and nasty and paste. Boom. Let's find it. Let's get a larger file. I want to see all the transfer is like a video. Yeah. Let's throw a video in there. Let's paste that video. Not too bad. Not too bad at all. Now that's pretty much it. My raspberry PI Nass is ready. He's done open media vault installed. I got my share. I can access it remotely. That's amazing. Now I didn't cover how to set up a NFS share on Linux or Mac. I'll leave a link below on how to do that. And of course, open media vault has a ton of other stuff like look here. I mean, we, you can do some things like our sync FTP. You can install plugins, add some extra functionality to your open media vault, but that's for you to play with tinker and figure out we're going to move on to talking about Plex. Let's install Plex on this same Nass so we can watch stuff so I can watch stuff. And my kids can watch things and not drive me crazy on my road trip. Let's do that right now. And actually it's not too bad at all. It's really easy. Watch this. Here we go. So first we're going to relaunch our terminal and get logged back into our raspberry PI SSH PI at our PI's IP address, ten.seven.one dot one-on-one for me now. And come on, jump in there and I'm in here we go. Now this will involve a few steps. I'll have all the commands below. So make sure you check that out. Copy and paste as we go along or you can type it in that's good muscle memory for typing stuff in the terminal. But anyways, here we go. First command pseudo apt. We're going to install something install. And this package is called apt dash transport dash HTTPS. Go ahead and, and enter once you have that type dinner pasted out quick coffee break. Not too long though, and it's already done. Cool. Next step. Now the next few steps involve us getting Plex installed and that involves us getting the repositories added to our raspberry PI here again, if you wanna learn more about repositories and ABT and installing stuff on Linux, check out the video up here somewhere or the series that cover the whole thing, but we have to add the Plex repository to our raspberry PI so we can reach out to it and download Plex. Let's go ahead and do that first. We're going to start with adding the keys to make sure we're actually going to the right place and it's verified. So again, paste this command copy and paste is curling out to Plex done. Then we'll paste the next command. This command will actually add the Plex repositories to our repository list done. And now that we've added this new repository to our list of repositories, we need to update our list of available packages. So we'll do the command pseudo apt update that simple hit enter and quick off the break. And now for our final step, we're going to install Plex. Here we go. Sudo apt, install, Plex media server, all one word. And if you're wondering what Plex is, it's amazing. It's like Netflix that you had yourself. You host it. Hoo. So cool. Anyways, that's our command. Go ahead and hit, enter and relaxed and out about 40%. You get a question, just go ahead and type an end for no, this is fine. And then let it keep going. And mine is ready. I love seeing this installation successful errors zero. Oh, isn't that the most? It's just the best feeling in the world anyways. What do we do now? Now we just go access Plex. And how do we do that? Let's launch our web browser real quick. It has a beautiful. Now when you see something like this and open media vault, don't worry. It just means you got logged out. Session expired. It feels very scary. Anyways, opened up a new tab. We'll navigate out to ten.seven.one.one, one, one. Uh, this is the, the IP address of your raspberry PI. We'll do colon 30 to 400. This is the port that Plex uses and then Ford slash web had enter. Yes. Look, there goes ah, Plex on our raspberry PI. That's already a Nass. Okay. Now you will need a free flex account. No big deal. I already have one. I'm going to sign in and it's going to sit here for a bit. Don't worry. It will get to a menu here in a second. It's going to walk us through the setup. Okay, here we go. I'm going to click on. Got it. Cause I got it. I was going to ask you to pay. You don't have to. So just click on X, let's name, your PI on their mind. Nasty actually lowercase, nasties better. There we go. I don't want to access outside my house. I'll uncheck that click on next. And then you select your library and we'll click on add library. I'm going to select movies. I'll name it, movies. That's fine. And then I'll browse through my media folder. It's actually going to scan the drives in your raspberry PI Nass. So let's do that browse for media folder actually real quick. Before I do this, I'm gonna click cancel. Um, I want to make sure I have a folder. So I'm gonna jump back into my windows Explorer here. Jump into nasty, create a new folder and videos or hot shall name it and movies. And I'll put my one video downloaded inside there. Perfect. Now it's fine. I'll scroll down and there is there's nasty. Hey buddy. And let's go to the top here. There it is movies. And I'll just click on, add to add that folder and then click on add library. I could add more here if I want to, but for now, that's all I care about. I'll click on next and done. So now let's see if it worked over here on the left. I've got my movies folder on my nasty pie. Let's click on that. There's one. My one video let's play that. You need to learn Python right now. Hold up. Why? What, why do you need to learn Python? You do. Do you realize what just happened here? Hold my gosh. Raspberry PI with a Nass on it. It's a network attached storage pool. That's already cool. Right? But then we also installed Plex media server. So now, I mean I can watch it on my phone. Check this out. I have the Plex app on my phone, which is also free. And then right here watching it off of Mr. Nasty here right now. How cool is that? That real quick. If you do want to go crazy, let's talk about that. I'm going to make mine go crazy real quick. Okay. I'm gonna go crazy. You ready? 1, 2, 3, boom. I hope that works out. My raspberry PI NASA got an upgrade. Now this is the case in the, in the, say the hat from geek worm. Super cool inside this, I've got an internal two terabyte SSD. It's got a nice power button and just looks slick, built like a tank. This thing's awesome. Now again, if you do want to go crazy like this, the instructions are the same. In fact that same raspberry PI was demoing with. I just took it, threw it in here, attach the drive and it just showed up in open media vault. So same thing. It's awesome. It's easy. Now. I'm not going to show you how to put this all together. There's a great video from geek worm. So all the links are below the link to how to build this and the parts and everything all below. But yeah, this little tiny package is running a mass and Plex. It's just a raspberry PI, but it's so cool. But yeah, that's all I got. I can't wait to take this on the road and see how it performs. This will be my Nass away from home on the road. This will be my Plex media server for my kids in the car. And I will have my file sinking back and forth between my massive Nass, my big Nass here at home. Oh, and by the way, have you hacked the YouTube algorithm today? Let's make sure you do hit that like button notification, bell comment, subscribe. Yeah. All that stuff hack you today. Ethically of course. And of course, let me know what you think of the video in the comments below. Let me know if you do this. It could be crazy. Like desert could be as simple as just having a raspberry PI and a hard drive and external hard drive, which totally works. Yeah. Um, three cups of coffee in today. I'm going to have more, but yeah, that's honestly all I have. I'll get you guys next time.
Info
Channel: NetworkChuck
Views: 451,900
Rating: undefined out of 5
Keywords: raspberry pi 4 nas project, raspberry pi, raspberry pi 4, raspberry pi nas, network attached storage, open media vault, raspberry pi 4 nas, pi 4 nas, nas server, raspberry pi nas server, raspberry nas, nas with pi, hard drive, raspberry pi network attached storage, cloud server, samba server with raspberry, openmediavault setup, pi 4, raspberry pi 4 projects, raspberry pi 4 setup, raspberry pi server, raspberry pi 4 nas build, raspberry pi 4 nas ssd
Id: gyMpI8csWis
Channel Id: undefined
Length: 24min 12sec (1452 seconds)
Published: Sat Oct 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.