Pi-Hosted : Raspberry Pi 4 Server Setup, Docker Install, Portainer Install, Shell In A Box Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys what's going on it's don here from nova spare tech and welcome back to our channel and today we are gonna be starting a brand new series called pi hosted that's probably a pretty good name and we're gonna be turning a raspberry pi into a mini server so let's get started [Music] now this was totally inspired by a post i saw on reddit on self-hosted subreddit where this one guy turned two raspberry pi's into a server with all these services as you can see over here when i first saw this i decided that wow that's a lot of services that you can put on there between the two raspberry pi's but there's also a lot missing that i would also put on and that i would love to actually start installing everything he has listed and learn from it because i know most of the applications that are installed on there but there are some that i'm not familiar with like sonar and stuff like that and i would love to learn how to operate it or install those things so yeah this is going to be a full series of installing as much services or servers as i can on the raspberry pi either until i need another one or up until it breaks we'll see how that goes because this is going to be a fun little series as far as the raspberry pi goes i always love using the raspberry pi for mini server appliances more so than i would use for the gpio i love the fact that yes you can control like a stepper motor and stuff like that but i mainly use the raspberry pi more for server appliances itself home automation or you know stuff that he has listed now this video is gonna be a base video so this is part one where we're actually just gonna turn this guy into a server ready image which means i'm just gonna be installing the base installing docker and getting it ready so we could start installing server appliances yes i've been told many of times to start looking into dockers i've used dockers myself but we are finally going to start attempting to do everything we can with dockers on the raspberry pi now we're also going to be installing everything onto a one terabyte spindle hard drive you could get this on ssd if you want you could do it on a spindle and since the raspberry pi does not need an sd card to boot we are going to be relying on this hard drive itself which is great because if i do decide to switch over from like a one gig raspberry pi or four gigs or whatever it is and i want to swap over to another ram size i could just move the hard drive over and it should work just like that without having to reconfigure anything now we're gonna jump over to the desktop to begin here we're going to have to use imager and if you guys like the desktop i did a video on how to theme it just like the way i have it i'll leave a link on that right down in the description below and on the top left corner but over here we have choose your raspberry pi operating system now because this is going to be a server installation we are going to go with the minimal which is raspberry pi lite and remember to go into the settings which is ctrl shift x and this will enable the advanced settings now i know i need to disable overscan because it's going to have the black border i also am going to set the host name for this and i'm going to name this rpi server enable ssh because i'm not going to be looking at this thing at all it's just i'm going to plug it in plug it up to a network and hopefully i can ssh into it to set the password i'm just going to use the default which is raspberry uh you could configure wi-fi if you are planning to use this strictly on wi-fi the only difference is that you're limited by speed but that's up to you uh set local and keyboard layout i definitely need to fix that skip first run wizard and disable that eject meter when finished save and now i get to plug in my hard drive so i could choose the storage so let me pop this together pop it into the usb give it a second choose the storage there you go and i'm gonna write directly to it what's cool is because it's such a small image watch how fast this goes well it's preparing to write because it's mounting everything but look the writing is super fast just give it like maybe 10 seconds and if you want you can even have it verified it only takes like three or five seconds just to verify the whole system but yeah this is really really quick okay now that we're all set with everything i'm just going to take my hard drive out pop it into the raspberry pi and jump into it all right so here we go i was able to get in took a bit i guess i had to resize the hard drive and i wasn't even thinking that but we should be able to go in with our default password that we put in and there we have it we are in our server now the first thing you should definitely do is run an update because every time when you install an image from raspberry pi sometimes it's not as updated that it should be so we're gonna do sudo apt update make sure it's gonna grab the latest repositories then we do sudo apt-get upgrade to upgrade all the whatever it needs to upgrade the kernel the files everything we do okay so there are about 53 packages and we're going to do sudo app upgrade it only takes about need to download about 167 megabytes and about seven additional space but we are going to be updating a lot of the base files uh i believe there's a kernel system mod right here raspberry pi kernel which this means it is gonna take quite some time so give it about like 15 minutes for this to update because anytime it has to update the kernel you're going to need to reboot it takes time to update it takes time to install so i'm just going to let this go all right now that everything is done and updated we're just going to do a quick reboot so sudo reboot that's going to reboot that raspberry pi and i'll jump back into it and then start installing my stuff now we're going to be installing docker and portainer those are the two main uh software that we're going to be using docker while in itself is self-explanatory that's where all the containers go for all your server appliances where it keeps it separate from your main host system so you won't disrupt it so what i like about docker is mostly if you are running that something that requires an older version of python but your server or the raspberry pi has a newer version the docker will self-contain the older version in its own little area where it won't disrupt the main host systems python so just consider it like that that's only one of many examples of certain things that the docker can do when you're installing that specific version of software now it should be rebooted yep there you go and we're going to pop back into this and now what i'm going to do is make sure i have git so i don't sudo app install git now i made a little small github just for these installations because i don't always remember the long string that you need to use to install certain uh dockers especially pertainer because it's a longer configuration string well technically all configuration strings are very similar you have the port you have the actual docker name and you have the folders where you need everything but i just like to hold everything together so i don't forget now here i'm just going to make a new folder called downloads this is optional uh you don't have to but i am and i'm also gonna now do git clone https github.com nova spirit slash pi hosted that's what this new series is called so it's going to grab the few objects that i have in there so i'm going to change directory over to pi hosted and you see install docker install portainer and there's a readme file so the first thing you want to do is install docker and it is going to run the docker script and install everything you need from docker so okay just give this about like five to ten minutes it should finish installing and log you off that's the whole point of this installation because you need to be logged off before the new group takes place so if you look in here i actually have it where the script will actually add pi to the docker group and like i said you need to log off and log back in in order for that to take effect so we can move to step two so right now it's just gonna install the docker and uh oh yeah log out doesn't work okay i'll fix that script we're gonna exit and then we're just going to pop back into it just like if i logged off and logged back in to double check if you are in the group you could just type in groups and you should see docker here and if you do that means you are added to the group now we can move to the next step which is installing portainer and all we have to do is install portainer this should run the two commands that needs to download the portainer and get it configured to port 9000 again if you want to you always just check the script and you can see what i have typed in there so you can manually do it yourself if you want but we are done with this right now that is all set up and we are able to go into port 9000 and check out portaino which we need to set up so i'm going to head over to 192.168.105.112. port 9000 might need https nope i'm good so now this is my raspberry pi's ip and port 5000 the first time i'm logging in it's going to ask me to make a username you could use admin you could use whatever you want i'll just keep it admin and the password is going to be whatever you want right now i'm just keeping it default as raspberry and that's it create user now we are going to be using this installation which is docker don't worry about this we've already done this so we're good and all you have to do is just connect and there we have it this is our pertainer installation on our raspberry pi now pertainer is like a very nice gui version of docker you could say it's very easy for you to maintain manage change some stuff around if you want to change folder directories ports everything you want jumping into the local you can see i only have one container which is portainer which is it itself and if you want to add more containers you just have to go to app templates and start choosing whatever you need so if i want to install wordpress i could just click on here install wordpress or install whatever applications now this list is very very small compared to what we need to deal with in the future because according to that screenshot that you saw we have a lot more services that are not even in this list so we are going to have to change stuff around and in here we're going to have the template now the template only gives you the app templates that you see right over here which is very generic but there's this github from self-hosted reddit or self-hosted pro this guy has a good template for a lot more applications so i'm going to leave a link to his github as well if you want to check it out but all you really need is just to get the version 2 of this one which is no omd because we're not using open media vault copy this link self-hosted template you see that version two and head over to our portainer settings and swap out this url with the new one you can see now it's using self-hosted pro this one save settings now if i go to app template this is a lot more stuff we could go through and there are more this is not the only um host that you could use or the urls app template settings that you could use there are a lot more that you can find on the internet but this is the one that we're going to be basing off because it has all the applications that we need but that's how you would switch it over to download more applications than you really need now one of the things that i do want to install before logging off is um shell in a box so sudo app install shell in a box okay sheldon boxes are pretty cool applications if you guys never used it um it's not even in one of his the thumbnails like i said i'm going to be adding a lot more applications that i know of to put in and shell in a box is basically a web gui for ssh and because i don't want to always putty or ssh into the server to do some configurations i want to be able to just jump into a web interface and have my ssh prompt and this is the way to do it now shell in a box once you install it so i believe it's supposed to be 4200 the connection was reset so i think there is something there i think i have to use https there you go https 4200 pop over to advance accept the risk and there you go shell in a box and now we could just log in as pi raspberry and we have a web gui for our shell and this will be added into our installation later but well that is it for now for this setup we got the base setup we also got docker installed portainer installed and shell in a box so next time i don't have to just ssh and i could just jump into it and do my configurations and stuff now on the next video i'm actually gonna start installing stuff into pertainer uh first thing i think i'm going to be doing is the dashboard itself where you saw in the picture i believe he's using homer so i'm going to jump in and install that and show you guys how to configure it to make it look like the way he has it and because i have shell in the box now it's so much easier to jump in and configure stuff anyway if you guys have questions about this hit it down in the comments below if you guys are new to this channel consider subscribing and also hitting that bell notification icon so you know when the next video is going to be out and as i say my nerd cave hack till it hurts
Info
Channel: Novaspirit Tech
Views: 140,914
Rating: undefined out of 5
Keywords: novaspirit, tech, Raspberry Pi 4 Server Setup, Docker Install, Portainer Install, Shell In A Box., debian, raspberry pi os, arm, portainer, docker, self-hosted, shellinabox, ubuntu, linux, linux server, server, raspberry pi, raspberry pi home server, home server, home lab, portainer.io
Id: cO2-gQ09Jj0
Channel Id: undefined
Length: 13min 46sec (826 seconds)
Published: Fri Sep 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.