How to setup Turnkey Linux Fileserver on Proxmox VE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today i'm going to be going over how to install the turnkey linux file server container to make a lightweight file server on top of proxmox ve the nice thing about doing this compared to firing up a separate vm running something like truenas is it's much more lighter weight and allocates resources much better so only uses the resources it needs whereas with the vm or something it's a lot more resource heavy on your host and this way you can create the container that uses about 100 megs of ram very little cpu power and it's fairly easy to set up and get a basic smb share going on your network so let's look into how we can do this so on my screen right now i have a new setup proxmox system that's been fully updated and has nothing else on it and the first thing i'm going to want to do is download the container template so this contains all the data that it needs to set up the container and start running it so i'm going to have to find a volume here and it looks like by default it's the local one that has container templates and then i'm going to go to templates and download it one easy way to find it is to look for file server and you can see the turnkey file server so turnkey is a linux distro where they take a basic linux install and then put some utilities and a web management gui on it and that makes it super easy to manage it and access it so you don't have to use any command line stuff to set up samba which can kind of be a pain if you haven't used samba in the command line too much before and it is overall just a fairly smooth simple experience it does things like automatic updates for you and just kind of makes it work simply i'm going to be using the file server today but they have a lot of other cool little things like a domain controller some wikis that you can set up easily a little basic um web server a torrent server a tomcat server snipe it git lab and a few other ones and this is great if you want to just set up a super simple instances of all of these they're not the best for super advanced configurations but it's great if you want something simple and you want it set up fast now that the container template is finished downloading i can go and set up the container now so it's going to say it's so it looks like this container is about 360 megabytes and it took about four minutes for me to download not too bad but now i'm going to create the container by clicking the little create container button in the top right corner and unlike a vm because the container is a little bit more integrated and more is configured you get to set a few more things like the password and an ssh key so i'm going to set up a password it's going to randomly generate an ssh key which i don't even need to ssh into this box which is great so i can let it do that i'm going to call it like turn key file server fs um on this node everything else i can leave as the default here with the password turnkey is going to want you to change it upon first login so i'm setting something simple right now i'm going to select the container here if it doesn't show up make sure you select the correct storage there disks i can create one big disk or i can create multiple i'm going to create a second disk that i'm going to use for storing the actual files and i'm going to make this one let's say a hundred gigs and let's say it's like slash mmt slash my data and then i'm going to have a root fs that's going to store the root file system so i'm going to have a separate mount point just so it's on a separate share in case i want to move it between systems or something like that i find it simpler to have a separate os and a separate data storage but you can store it all in one if you want cpu i'm going to give it two cores but it really doesn't need much cpu at all memory the default 512 megs is fine for everything i've seen the nice thing is it also uses the proxmox host ram as a ram cache to help speed up some operations so it doesn't really need a ton of ram there for caching because it can just use the host os's free ram too when it comes to its ip address i'm going to set it to a static ip on my network it can also be set to dhcp but i just want to set it to something like 15 24 and then i also have to put in my gateway address by default it'll select your default bridge and network name that can be left the same with a basic install of proxmox but if you're doing more advanced stuff with networking you probably need to know how you want to set that up same with dns by default you use the same dns servers as your host system but you can change that if needed and i'm going to just click start after created and finish so it's going to take a little bit of time it's going to unzip that image it downloaded for the container and then it's going to actually just create the container so this is normally pretty quick on this system so now it says task ok and that means the container's been set up and it since i click start ring created it should have just started it right now and because containers are super small and simple it's going to be booted in just a few seconds so i can log into the console and it's almost done booting it looks like it's doing some initial setup generating ssl keys for its authentication and then the first thing i'm going to want to do is log into the user root on here with the password i created it's going to prompt me to create a new password and do some first time setup so i'm going to create a new more secure password here and type it in twice and then i can optionally put an api key in if i want to manage it from the turnkey management solution but i'm not going to do that here same with email that will give me notifications here which i don't need and then it will give me options to install updates on a daily basis so that's going to just use app to update and upgrade to automatically update my system so that way it's running the newest most secure version of debian under the hood and now once it's done updating it'll give me a little menu like this that says that it's ready to be accessed from a web ui so i don't have to go and look through this proxmox console anymore i can close this and i'll never have to touch the console or ssh again with this system so i'm going to now put that ip into my web browser which is 15 and it's going to give me a little prompt for webmin sama config via webman web shell so i'm just going to clock to log into webmin and because it's doing https with a self-signed certificate it's going to give me a warning but since i created this and trust this system i'm going to accept the risk i'm then going to log in with that root account and the updated password that i created earlier and it's going to sign me into webmin and now that i'm logged into webmin there's a few things i'm going to have to do to get this file show working and all the options i can see on the left that gives me a few things for like the system setup servers where this is the samba windows file sharing is a server that's going to be used to actually do the file sharing here and that's going to be the two main ones so the first thing i'm going to do is go into users and groups and create a few linux users that i want to use samba can be a bit interesting on linux because samba is designed around the windows user infrastructure which is a bit different and doesn't fully integrate with the linux one so you actually have to use samba to create passwords but you use the linux stuff to create the users so i'm just gonna make a few users here so create a new user and i'm just gonna leave everything else to default except the name so i'm gonna make one with my name in it and then maybe i'll make a few test users of like user one and user two right now so now that i've made user one and user two i can also create some groups right now so under local groups i can create a new group uh maybe i'm just gonna say like family or something like that here and then i can add the users that i created earlier and use this to set permissions the advantage of setting groups to set permissions is you can set file permissions and folder permissions on a group level so if you have let's say three people that you wanna have the same level of permissions you put them in a group and you set that group to have the same permissions instead of setting all three users three different times the next thing we're gonna do is go into tools and then file manager and this lets me see the share that i created earlier under slash mmt share data whatever it's my data and what i'm going to want to do with this my data folder is change permissions on it so that i have access so the way permissions work in samba is a bit interesting where it has share permissions and then it has file permissions and you need both to allow access for you to be able to access files so typically i use the file permissions to limit what i can access to and the share permissions to say all the authenticated users can access it so i'm going to say change ownership of this file to me and then we're going to call it make it like the family group i'm going to change it there and then i can also do the changing permissions here to say that on this data here the group has read write access everyone else can read it and we're going to change those permissions now so now all the data inside that folder will have those permissions so now that i've set up file permissions and users i can go set up the actual samba server to start doing file sharing so i'm going to collect under servers the samba windows file sharing server and the first thing i'm going to do is actually select all and delete these shares these shares by default are home so each user has a separate home folder and this user is separate to each user i don't typically use this in my use cases but if you want to use this you can cd-rom which i don't need at all if you put a cd-rom in the system it'll let all the users read it and then storage is just service storage which i'm using a different path so i'm going to want to create my own so i'm going to click delete all the selected chairs and we can start fresh the next thing we're going to do is do under samba users and set up our users as right now we only have the root user and we want to have all the users i've created so i'm going to say i want to use this user i'm going to look up users using a little person icon i'm going to select my name select and then i'm going to use a password here and this is where i'm going to set my user passwords so then this is going to take that linux user i created earlier and add a password so that it's now a samba user as well so i'm gonna have to do this manually for all three of my users that i want to set up and now if i click on my samba users i can see that i have my brand and my user one and my user two all in here so then they can actually have access to the samba shares too so now i'm going to actually want to create my file show so i'm going to click create new file share here i'm going to say it like home data call it that and this is the name that it appears when you look at the computer sharing it directory to share is what path you want it to share to so it's going to be slash mmt slash my data i'm going to be sharing and then i'm going to use the 755 let's do 775 so that means anyone in the correct user and the correct group has full read write access everyone else is full of read access available in browseable yes and then i'm going to actually select my user to be the root the owner of all the files and not root so i'm going to click create and then i'm going to actually go and edit this first thing and i'm going to make sure it is under security and access controls i'm going to say writable yes and that gives people right permission because i want to be able to read and write to this share so i'm going to return the share list and then i'm going to restart the sambus servers as restarting is required to apply any of the changes here and then i should be able to browse this share in windows so i opened a little windows explorer i can do slash and put the ip in here and it'll ask me for a username and password i'm going to put my username and password i created earlier in i can see the slash home data i can create a new folder if i want so i can call this guide test now one thing i would suggest is if you use the share a lot to map it as a network drive that gives it a drive letter and i find just makes it a lot easier to access so i'm just going to put this password the full path in here and then i can say reconnect at login finish and now it shows up as a drive letter here so under this pc i can see this new home data share that i've created and that's my super simple setup for setting up and turnkey linux on proxmox it's a pretty simple share i can over click it and open it if i want i can copy files from like my downloads here so i can copy like a large file to it and it should copy at essentially full speeds i've done a bit of speed testing and the speeds appear to easily fill a gigabit and i had prob easily getting 300 some megabytes per second which was limited by my network and not the samba share this is a bit of a slower system so i'm seeing slower speeds here but it is relatively fast for sharing it's also been fine stability wise i haven't really ran into any issues with it if you want more advanced features and know how to edit samba they can show you the full config file here so this is the full samba config file and you can edit this file as needed and then the other great thing with this is it's super low when it comes to resources so looking at cpu usage i'm seeing other two cores i'm seeing at like 11 when i'm copying files and i'm seeing about 170 megs of ram usage so it's very lightweight on the system and the other nice thing is it only uses the space it needs on disk so if i delete a file it actually instantly gives me more space on the host unlike with a virtual disk where you might allocate the whole disk or you have to deal with some file system overhead there's basically none because it's using the host file system not the file system in the container because it's just passing through that file system mount point let me know if you have any questions of how this can be done or if you have any better ways that you'd suggest to do it down below in the comments and thanks for watching this video
Info
Channel: ElectronicsWizardry
Views: 55,759
Rating: undefined out of 5
Keywords:
Id: UnXxJMjW4LE
Channel Id: undefined
Length: 13min 9sec (789 seconds)
Published: Sat Mar 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.