Self-Hosting "Prerequisites"

Self-hosting is something I’m intrested in doing in the future. As in, maybe a few years from now. But whenever I read guides on how to self-host - so that I can begin learning now instead of rushing to later - I easily find myself overwhelmed.

Apologies if this ends up being a broader and more vauge question than I realize, but beyond general terminal navigation what could I focus on trying to learn to help ease myself into learning how to self-host?

2 Likes

It can definitely feel overwhelming. Are you able to run a virtual machine locally? One of the best things you can do to learn is play around on a system that’s not connected to the internet.

Without getting too specific about individual commands, I think the main things that people commonly need to know to self-host are:

Connecting and navigating

How do you access a remote server? How do you figure out where you are on the filesystem? How do you move around the filesystem?

File management

How do you create and delete files? How do you edit a file from the terminal? How do you download a file from the terminal? How do you unzip a file or create a zip file? How do you find a file? How do you copy a file to/from a remote system?

Process management

How do you know what programs are running? How do you stop, start, or restart a program? How do you stop a program gracefully or kill it if it’s unresponsive? What’s the difference? What’s the difference between an application and a service? How do you manage a service? How do you find and change the configuration of a program or service?

Basic networking

What’s an interface? What’s a port? How do you configure an application or service to listen on a port? What’s the difference between a privileged port and an unprivileged port? What’s an IP address? A hostname? A fully-qualified domain name (FQDN)? A URL? How are they related?

Securing

What’s a firewall? How does it work? How do you make sure that you’re only allowing access to the things you intend? How do you identify suspicious traffic? How will you respond to it (ignore it, block it, rate limit it)? What are file and directory permissions? How do you define them? How do you prevent other users from redefining them?

Auditing

Where are the system logs? Where are application logs? How can you learn where an application writes its logs? How do you monitor logs in real-time? How do you search them for single events? How do you search for patterns? How do you interpret what they say?

I probably just made another overwhelming list, but please don’t be put off by it. You don’t have to know all this to get started self-hosting, but if you do end up self-hosting for a while, then you’ll need to do all of these things at some point.

But if you have a local VM that you can set up a hobby project on, that can be a great way to learn. You’ll end up needing to do most of this stuff as part of that project. It feels overwhelming when it’s presented like I just did. But if you start building something, then you’ll just learn each of these things naturally at the moment when you need to know it. That makes it less overwhelming and I find things stick better when I learn them that way.

5 Likes

No, this is PERFECT. Exactly what I was looking for: a lesson plan, more or less. A list of things to research and learn as I find the time.

I have an old laptop tuning Kbuntu that I have no plans for currently, so I could easily use it to practice these things if I’m understanding correctly? Otherwise, I don’t have a local VM to play with :(

2 Likes

Great! An old laptop is perfect, I just didn’t want to assume you had physical hardware handy. Anything you can run an OS and a couple services on will let you experiment.

2 Likes

Seconding @greg that an old laptop is perfect for practicing and experimenting. It is good that Linux is already installed in your old laptop too. I don’t have an extra physical hardware to install an operating system on, so I started learning to use Linux through dual booting Windows and Linux, then Windows Subsystem for Linux, which is still my main method of using Linux outside my VPS.

3 Likes

Noted! In that case, I’ll start practicing with it once I’ve learned enough to know how to practice with it :joy:

I predict that this’ll be slow, but absolutely worth it to have (or more accurately, rent) my own server.

3 Likes

keep in mind: some ISPs are little bitches about hosting anything via their network, if you’re a residential customer, so its always a better idea to check it with them first, before ever doing anything @greg recommended if you actually plan to host your own stuff from your bedroom

1 Like

Also noted! Though, when the time comes, I do plan on renting a server elsewhere for a number of reasons, including not knowing if my ISP is chill with me “truly” self-hosting (but I do know they have awful customer service, so finding out will be a pain :D )

But I assume that playing/testing on a system, so long as it’s not actually connected to the internet, is fair game and they can’t come complaining about it?

2 Likes

That’s correct, and renting a VPS is definitely the better beginner-friendly option, since you just have to worry about the server’s security and not the security of the entire network.

4 Likes

i second this. especially since most people, myself included, only have the ISP provided router/modem combo. with such routers its impossible to set up vLANs in most cases, and if you’re gonna expose an entire machine or just a VM to the internet, you’d want to make sure it can’t communicate with the rest of your network.

but yes, VPS is way better deal. some key things if you do get a VPS @Grubdog .

  • disable remote root login entirely
  • generate, configure and save sshkeys
  • disable remote password login completely

ideally, you never want to use a password shh session, as its significantly less safe than a keyfile.

3 Likes

The things @rina just mentioned are an ideal “Thing 1” project once you’re ready to get started. Set your laptop up and then figure out how to connect to it from your main computer and configure SSH to only allow key-based authentication from non-root users. Then try to work with the laptop by connecting to it from your main computer as much as possible.

You can always use the laptop directly in a pinch, but the more you connect to it from your main computer, the more practice you’ll get doing the same things you’ll be doing with a VPS.

4 Likes

All of this has been noted down! Will needto find myself a resource where I can learn to do all of this, of course, but I’ll be sure to do all of these as the practical side of learning.

Thank you all so much! :D

4 Likes

Reviving this thread for just a breif moment to say that, thanks to The Reccomended Guides Thread, I was able to find two resources I’ll be making heavy use of for this.

Just wanted to share these links in particular here as well, in case anyone digging through these forums has the same questions/concerns as I do. At least, I’d appreciate having everything in one place lol.

The Missing Semester of Your CS Education – goes over stuff such as the command line environment, version control, security, etc. Baby’s first steps.

Linux Upskill Challenge – how to set up and control a remote server from a Linux command line. So… How to self-host with Linux, basically :3

I might edit this post to include more resources as I find them, but I don’t anticipate that I will find more. At least, I won’t be actively looking for them.

4 Likes