ida learns how to do server stuff part 1 - Linux Mint, Samba & SSH, Ubuntu Server, and Docker
written by ida deerz on May 17, 2024
in cohost, technology, linux, computer, server
this post was previously published on cohost.org!
alright! i've spent so much time around computer trans girls and i am SICK!! i am SICK of it!! i keep hearing all this stuff about server racks and using a terminal and which Linux distro is better than the other and i have no clue what the heck people are on about!! i've been a Windows user for life. Linux makes no sense to me because none of the software i need to use is on it. i don't get why people swear by using a terminal, how the heck do you memorize all those commands? what if you make a typo somewhere?? how would that ever be more convenient than a file explorer with an actual GUI??? i don't get it... but so many people swear by all of this stuff, so there must be something good about it! i wanna know what it is!!! and i'm already a huge nerd + i literally wanna work in tech, so not knowing any of this stuff honestly makes me feel very left out sometimes. it might be a good idea to start learning now!
i built my own desktop PC in 2022 so ever since then, my laptop has been collecting dust. i still used it whenever i'd travel anywhere (like when i visited the US in 2023 — fun fact, 'the CONE ZONE!' was fully produced on it while we were in Colorado). but those moments are very rare for me! the SSD inside of it started showing a lot of wear over time, presumably because i barely used the laptop. it'd take several minutes to boot into Windows. the SSD appeared to be fine, but i decided to not risk it and just order a new SSD to replace it with.
then at the end of March, i finally got fiber internet in my house after months of waiting for my new ISP to ship me the installation package for it. i already thought before about learning how to operate a server, but now that i had to swap out my router for a new one and redo the ethernet connections to my desktop PC, i figured i might as well use that opportunity to experiment with adding a server PC to the network.
installing Linux Mint
while i did initially reinstall Windows 10 onto my laptop, i wasn't using it anyways so i decided i wanted to try out Linux to see what all the hype was about. the one thing i know about Linux is that there's a million different distributions of it, which seems very overwhelming to me, so the first thing i did was ask around to see which one i should try out — i think i even made a post about it on here, too! most of the votes went to Linux Mint.
i gotta admit, visiting the Linux Mint website and immediately seeing it marketed as a "friendly operating system" where "most of the users come from Windows" did make me feel like i was being babied a bit. like ah, you're not ready for REAL Linux yet, try this Dumb Baby version of Linux first. but you know what? i shouldn't really blame my friends or anyone else giving me advice for going that route; they're probably right considering i never even touched a terminal before this, and having a more user-friendly version of Linux certainly can't hurt when you're learning.
as per the install instructions, i installed the OS image onto a USB stick with Etcher, and then installed it onto my laptop. i don't remember the exact details (who'd remember something mundane like that, honestly) but i do remember it being pretty easy to install. certainly completely bloat-free as opposed to the Windows installation process. i really like how you can just throw any distro you want onto a USB stick and run and install it. now i guess you can also do the same thing with Windows, but hey! i have to imagine that those big mainframe computers from the 70s didn't allow for any end user to just plop any new OS onto a drive and install it within 15 minutes, at no cost whatsoever. that level of modernity and user-friendliness seems like a huge leap in technology to me.
Linux Mint is... alright. it's an OS. it runs. it has software. i don't really know what to say about it! since i very quickly realized i wanted to do server stuff with it anyways, the actual usability of the operating system itself didn't seem to matter as much to me. having the graphical interface did help with troubleshooting and learning how everything worked a lot!
learning how SSH works and setting up a fileshare with Samba
i figured the one thing people do with servers is put files on them. and even though from a logistical standpoint it makes no sense to put my whole music library on my laptop (it has a slower drive with less capacity and it requires to be on all the time), i wanted to do it as a test anyways!
the first thing i had to learn was how to SSH into the laptop. as far as i remember, this went... really easy. the scary part was not knowing what all the commands do, since i didn't accidentally want to mess anything up. having Linux Mint's GUI available to me was definitely very helpful, because it meant that i could just run some commands that would create a text file on the desktop and then see if it worked or not.
i remember some of my friends trying to teach me how to use SSH months ago, and it was like... ah oh god terminal?? commands??? what?? what do i do. what is this useful for??? ahhh????? and it's funny because now i actually know what it does and it's honestly just simple. being able to remotely control my laptop on my desktop PC is fun! at this point i didn't have a lot of use for this, but it was still very neat to see that it just works like that.
i set up a filesharing folder with Samba after my friend linked me a tutorial on it. man okay it is neat that you can just download software by typing a command in the terminal and you can update everything with that. i didn't really get that at first but now that i've used it i do have to say it's pretty fancy that it can do that. Linux Mint is very user friendly and it has a software manager app but i do like that it gives you the option of doing everything via command line if you want to. getting the fileshare to work was a bit fucky since it wasn't super clear to me how to write out the file path on my Windows PC but after some trial and error i figured it out!
my music library lives on my laptop server now. it's worse than before! sometimes loading music in foobar2000 lags for a few seconds. and VLC on my phone can't access the fileshare for some reason. would like to do something about that in the future (advice is appreciated). but yeah!! i don't care if this sucks shit!! it's fun!!!
learning how to use Docker and running a Minecraft server
a while ago i was at a tgirl sleepover hosted by this one older woman who worked in tech. she had more experience than me in all of that so i told her about my struggles in finding employment in web development. she said something along the lines of "all you gotta do these days is say that you know how to Docker and Kubernetes and they'll want to hire you on the spot"
this is not directly what motivated me to learn Docker but from talking to all my computer people friends i do get the impression that it's just unavoidable and kind of a must, so i figured i should check it out.
i'm not a big nerd (yet) when it comes to running servers and such, but i have now seen plenty of YouTube tutorials that talk about virtualization and how businesses used to run virtual machines with OS'es on them and now they can just run Docker to virtualize applications through that. or something. sounds very neat though!! i dreaded having to interact with it via the terminal, so i ended up installing Portainer so i could more easily control things over on my desktop PC. having full control over Docker from the comfort of my desktop PC is honestly pretty neat. it really does make me feel like a hacker lmao. Linux Mint's user interface has become kinda obsolete to me now.
i haven't really figured out what software i'd actually want to try and run through Docker yet, so as a test, i decided to just set up a Minecraft server for my close friends. there's a Docker image that will run a Minecraft server out of the box, so i spent the next few days getting it to run and troubleshooting it together with my friends. after some trial and error with portforwarding my router, i managed to make it publicly accessible!
after doing some testing to see if people could easily connect, i took the server down again to start experimenting with mods. i honestly really quite like how simple it is to change any of the server settings; you just go into the container's environment variables and change whatever you want to change. i also found out that there's a setting that allows you to give it a Modrinth modpack file, and it will automatically download the latest versions of all the mods linked within it and run the server with those. seriously this is so cool to me!! all i have to do is restart the server and it will automatically update every single mod that runs on it. i used to play modded Minecraft with my previous polycule, but for that we all had to manually update all the mods on the server. now i can just give everyone the same modpack file and it ensures we're all using the same mods.
i also pointed the Docker container to a location within the fileshare folder i previously set up. this means that i can access it in my desktop's file explorer whenever i want. this is super neat because i can just copypaste any of my existing Minecraft worlds or other files into it, or back up the current server world whenever i want to.
i tried setting up some DNS records with my domain name registrar to have some of my domain names link directly to the server IP. however, very sporadically i can't connect to one of them and it gives me a timeout. some of the other users have experienced the same issue, so i've just had to give them my direct IP address so they can connect to the server at all. i have no idea what this issue is and it's still here after a whole month of the server being up. if anyone knows how to fix this, please let me know!!
what's next?
i'm playing a few festivals this summer so i will need my laptop for that! i gotta have something to run Ableton Live on, after all. this means that before then i'll have to get some other hardware that i can run the server on, so i can install Windows 10 on the laptop again and use it for music purposes. i'll have to replace it with a computer that's more suited for server usage. i'd want to use it for file storage and my laptop provides no upgradability for that anyways.
since i already have some knowledge on how to run server stuff now, i'm thinking it might be more useful to try out a different OS than Linux Mint. my laptop has been relegated to a storage closet now and i control the whole thing using my desktop PC, so i'm guessing it might make more sense to actually install an OS on it that is meant for that.
now that i've bought a used Optiplex to replace my laptop with, the next step will probably be inspecting the hardware once it arrives, figuring out what disks to use with it and ordering those, installing everything, and then moving all the files from my laptop over to the server.
and then... i don't know!! learning how RAID works? throwing even more apps into Docker? gay sex??? maybe!!!!