Host NAS inside LXC Container | TurnKey FileServer LXC Template | Proxmox Home Server | Home Lab

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and thank you much for watching this is me Mr P and welcome back to another episode of proximo's Home Server series and one of the videos I was demonstrating how to virtualize truenas and use that as your Nas in another video we're showing you a set of process open media Vault but what if either these options are not good for you what if you can't actually use them because your prox mode runs on a machine which has a CPU that don't have virtualization feature so Alexi containers only one option for you to have a Nas the water that is the way to have a nice virtualized inside lxc container and what we're going to use is called file server lxc container created by very clever people behind the team called TurnKey Linux and here we go this is the one we're going to use if actually I'm going to delete this it should bring all the list of all the Lexi containers that the clever people created there is Alexa container for WordPress for own cloud for jellyfin for PHP for MySQL did I mention WordPress I probably did is that branch is I think is 100 plus Galaxy container templates created by that and the one we're going to use is called file server so let's go back and say PVE my my proxbox next thing what we need to do is get ourselves that lxc template downloaded I'll click on the storage where I keep all the stuff I click on a CT I click on a template and if I scroll down this is the list of all the turnkey containers I can use inside my box but I can have a Media Services which is like I said jellyfin game server Gallery there is a WordPress it is magenta this is a WordPress here Magento it was here a lot and a lot on a lot of things if you cannot see the turnkey showing up in this list you need to click on the proxbox host then shell and type pveam space update if you put that press enter you should see update successful that means that the repository for templates has been updated and now inside the template list you should be able to see TurnKey so if you search for file server more word file server Just put enough letters to filter down as you go see this is the one we're going to use I won't download that because I already had that done loaded and here it is 17.1-1 so that's the one we're going to use so let's start creating this and then we're going to create ZFS pool if I click on a create CT give it a name so I'm going to call it file survey YT so FS space dot yd I want this container to be privileged because I won't be able to pass through well with the privileged container with unprivileged container you still can pass through the data set from a Zippo but it's going to be a very complicated to set up the right permissions where if you're going to run this as a previous container the permissions will be sort of Auto magically sorted for you and because I'm like I said in my previous videos I'm running this is my inside my home lab no one else has access so I'm pretty safe by doing that password I'm going to give something simple like that click on a template make sure that the right one is selected and then I can look for this one here I can just can start typing the name and file server if I type that correctly would help and select the right one disks eight gigabytes are plenty because like I said we're going to use ZFS data set CFS boom so eight gigs to run all the files to function the file server to function is plenty because the ZFS book it can be terabytes and terabytes of data that's where the data will be stored and the CPU one is plenty memory 512 is plenty for this you can actually run this on 256. network I'm going to choose DHCP because I want to get IP address DNS I'll leave everything like this and confirm I'll leave everything like this I will not click Start after grade and press finish so Alexi container getting created and before we start that we need to do a couple of things number one we need to enable nesting and then without the nesting I won't be able to run file server as you can see task is done I'm going to close that select the container then select options features double click and then choose nesting press that so on privileged container no that means it's privilege and nesting is enabled equals one so that is the next thing let's go and create CFS pool I'll click on my node of proxbox node scroll down and to find ZFS under disks options if you can see obviously you can press this to expand and now I'm going to click create ZFS this is two hard drives that attached to this proxbox they're both 32 gigabytes and so I'm not sure why it's showing 34 36 but anyway we'll select both of them give us a name I'm going to call it tank I will untick add storage from single drive I will choose mirror and then from compression I will choose lz4 and press create so right now proxbox creating a CFS pull of two Drive mirror to mirror ZFS pool and if I'll double click on this I can see everything is great mirrored everything online everything is happy so right now back inside the proxbox and the shell if I type ZFS list I should be able to see my pool by the name of tank which is great now let's create a data set inside that pool to create data set you need to write ZF as space create space name of the pool slash name of the data set in my case I'm going to call it data so you can call whatever you want I'm going to call it data and the data is going to be that Master folder where I'm going to keep all messed up so now if I'm going to put ZFS list I can see that it's too created and one of them is called tank data 3D pool always going to be the first one and then all the data sets will follow down so tank data is my data set I need to pass through this data set into electricity container to do that I need to write Nano Etc PVE slash lxc slash an ID number of lxc content in my case it's 100 in your case just make sure you put the right ID number of the file server Galaxy container and press enter to do a mount point we need to mend the lxc container configuration file if I go just below net I need to make a space and type exactly like this mp0 that means I want to mount point to a index 0 a starting point one a zero if you already have a mount point for some reason that needs to be obviously one if one is not three two if two is not three three if three is not three four and so on my case because it's a fresh Alexa container nothing else has been done to it my mp0 will be available I know that so I'm going to use this then colon slash tank slash data so next I'm gonna put comma MP equals slash MNT slash data so what all this means that I want to mount point to a location one what first location which is mp0 location inside the host which is tank data so pool ZFS pull day tank and then the CFS pool data set data and our Mount Point inside lxc inside the location MNT slash data so we're just going to link these two locations automatically somewhere and it's gonna have basically whatever you do inside the host inside this location will be reflected inside here and vice versa so that is done I'm going to press Ctrl O2 right and to confirm Ctrl X to close and now I can start a container just by putting PCT stat and 100 or you can right click on this instead I'm just going to do PCT stat so right now we start in the container and let's go back in here continue starting everything looks great come on let's wait for a second for this to go through this actually is here okay so root and a password the one I created or it pulls up the password what I have to punch again here we go so right now this is the file server of TurnKey Linux teams created first initial setup process so it says that please enter new password for Samba root account so I'm gonna put something that I can remember so I'm going to do like this it needs to be eight characters and at least three of them following in the category so you just put something and it's it next one about AP I API I'm gonna skip that about the email stuff I'm going to skip that and I will run this this is a security patches upgrade I'm going to run this when this is done the message will pop up asking you to restart the container so you make sure that you restart the container I'll meet you when all this is done patches installed the container updated and upgraded and restarted so I can log in back in next thing to um get you into the configuration window you need to put con console one word press enter and here we go this is where I can find a p address that has been assigned to the system with a port correct port number they need to use to access weapon so I'm going to select this right click and choose copy and now if I'm going to open new tab press enter it's going to ask me about the SSL problem I'm going to say that's fine Advanced proceed and it's gonna ask me to login so default username is going to be root and a password being not the password during the installation process inside these windows but the one which you entered here while you were creating the city container so this is the one you need to enter and press sign in and here we go we inside this webmin interface web GUI setup for all the stuff you want to basically configure with this lxc container first thing I want to check if the mount Point successfully happened I'm going to click click on tools then file manager and if I click double click on MNT if I see a folded data that means it's automatically being created and that means that the ZFS data set has been successfully linked to this galaxy container so let's start setting up Samba first thing before setting up some actually we need to have the user I'm going to click on the system users and groups I'm going to click on the add a new user which is this button here and then user I'm going to give it a click my user for myself Mr P and it automatically adds user into users Group which is fine I'm going to scroll down press create so we have a user Mr P that's great next thing we need to go inside the tools back inside the file manager and make sure that this folder which is automatically created once once the ZFS dataset has been linked it doesn't belong to root and the group root needs to belong to Mr P and the group users so I'm going to right click choose properties right click and then on this arrow thing and then choose which says change ownership I'm going to click on that I'm going to say username it belongs to not root but actually me and it belongs to group users I'm still going to click recurs it even if there is no folders inside but still I'm gonna do even if there is any hidden folders just want to make sure that everything belongs to me for me everything belongs to me let's Click Change so ownership is being changed to MRP and as you can see users but this is right now set to 755 that means that user read and write group only read and everyone's on the read but what if tomorrow will add my friend let's see Jeff to access the same files I want him to access the same so instead of just changing ownership I will add the Jeff into group users that means I need to change the permission mode so right click again on the arrow and then change permissions and make sure that you press tick here that means it's going to change to from 755 to 775 apply to select all recursive change and now this folder belongs to me and everybody inside the group users can read and write as well so I can add bunch of stuff in here A bunch of people to this list and they all be able to access it so that is done now let's click on the servers and now click on the sample Windows file sharing by default file server will create three folders here as you can see you can access storage you can actually see the ROM if your proxbox system for some reason has a syndrome and it can has all home directors I'm going to select all and click delete we don't want any of that I'm going to click create a new file share give it a name I'm going to call it YouTube directory to share I'm going to click on this icon and choose mount okay and click too many times click on the mount and then click on the data or double click on the data click select so it's added this one in here J create with permissions I need to make sure that instead of 755 it says 775 you need to still do that even if you already done all the permissions but you need to still do that because this is a Samba side permissions we're done on a file file browser kind of thing permission site now we need to do this I'm going to click create as soon as you've done that click on the name and then go into security and access control and make sure writable is clicked yes and now we can say that and click save and now once all this done you need to scroll down and look for converted users select that and now I need to find the user click on this and find myself where is Mr P it's probably somewhere here so click Mr P click select and what that is does that once you create a Linux user it has a username and a password but if you want to access the Samba share you need to have additional password because Windows reasons Linux and windows doesn't use the same kind of hashing password algorithm kind of thing but anyway just you need to create a separate use separate password just for Samba so I'm going to select Mr P in this list use this password and then just I'm going to add something very simple obviously you add something more secure I'm going to add just one two three qw convert the user press that button click on the arrow and I'm back here and once you have everything done you have a folder you make sure the folder is writable you join all the permissions you made sure the use is converted restart the Samba server and this is Samba server has been restarted being some by its function now if I open the file browser click on the applications and choose the IP address which I think it was 86 86 press enter Mr P automatically fill them because my pop OS on this laptop uses username MRP so this is why it is but if in case if not you just need with Mr P here and put the password which you added as a new password just for Samba and click connect and here we go my YouTube folder if I'm going to double click on this and create a folder let's say subscribe and you go fold the Creator inside if I go back inside my proximox system inside the proximox system click on approxbox node then on the shell and in here if I put ZFS list this is there my my data sets and my pool and data set now if I'm going to navigate into the location tank data and do a list the space Dash all there you go subscribe showing up here because I always setup is done with with the privileged container if I done all these setup with unprivileged container I won't be able to see folders here and the users won't be able to properly write and read stuff inside the assemblies it's a mess so instead of going the more secure way I decide to go this easy way because more secure way is like 1000 extra steps I need to do and I tried that actually and it's not always worked for me actually I not even managed to get that work successfully so I went the easy way which is just run a privileged container make it sure at this and it's all runs perfectly so that's it I'm using a file server to get my stuff file file server sharing somebody sharing that and now as you can see it uses only 26 percent of the memory out of 112 So 135 cached and 130 is used so pretty much it's just very very very very good online resources not tanking my proximal system let's see how we're doing here so as you can see it's 120 megabytes been using I can even go here resources and from 2 to 512 I'm gonna say no no no no you only have two five six and right now is uses less just just less than uh than all the Rams with 120 out of two two five out of two five six I can't speak today it was a long day anyway so this is if your proxbox CPU or your if your machine that you has approx you have your proximals ready do not support virtualization you still can have a fully functioning Samba server running in it and you're using ZFS to get all this going thank you very much for watching I hope you enjoyed this video and I'll see you in the next one goodbye
Info
Channel: MRP
Views: 3,775
Rating: undefined out of 5
Keywords: NAS inside LXC container, proxmox home server, proxmox home lab server, proxmox tutorial, fileserver lxc container, turnkey linux, self host NAS, ZFS dataset, pass-through ZFS dataset to LXC, SMB share for ZFS Dataset
Id: I7nfSCNKeck
Channel Id: undefined
Length: 16min 56sec (1016 seconds)
Published: Thu Apr 06 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.