Go Back

Most Recent Post

Administrating My OWN Server! VPS/Linux for Beginners

Hello all:

So in this post I am going to go through the surprisingly fun process of starting and running my own web server in 2024.  For a very long time, this was not possible unless you configured a computer to run as a web server yourself or you bought very expensive dedicated hosting.

Most traditional hosting was shared hosting, which meant that larger servers were partitioned to individual customers and individual customers had limited control over their little sections of the server.  This became troublesome when you wanted to host anything other than a PHP website, though.

Some hosting companies would even give you shell access; however, you would never get root access and sometimes be bound by the server’s overall configuration and environment set up to provide the general needs for many users on that server.  This changed though with the rise of Virtual Private Servers (VPS).

Providing root access on a fresh Linux installation, I bought a VPS (Virtual Private Server) in order to run a couple Django (Python) projects I had been working on, which I could not do on my shared hosting.  At the time, I barely understood the language of servers and blindly copied and pasted Linux commands until I made the thing work.

Though frustrating, it did send me down the Linux rabbit hole and today I feel confident enough to run my own server for all of my web projects (including this website) that hopefully will not get hacked and held for ransom.

Why VPS?

Okay, so unmanaged VPS is much, much cheaper than traditional hosting.  I am paying 75% less for  hosting on a machine that has more throughput and triple the amount of storage.  Keep in mind this is unmanaged… so when you buy this you are given a basic installation, some credentials and then can SSH to a blank terminal.  That’s it!

Managed VPS price-wise will be much more like traditional hosting in that you pay more to have someone do the server updates for you and provide support.  Also, normally you will be setup with an e-mail server and have access to WHM/cPanel, which requires a paid license.  Managed VPS should still offer the same technical flexibility as unmanaged VPS options, though.

For me, with confidence in Linux up, I’ve decided to ditch the safety net, save the money, and run all my websites (including this one) myself!

RHEL vs Debian

Okay, so when you first buy a Virtual Private Server (VPS), you will likely get asked which Linux Distribution you would like to install.  As an aside, I think a blocker for many people getting into Linux is that there are so many distros that things get real confusing real quick.  Seriously people stop making new Linux Distros, we have enough!  But basically, there are two families of Linux Distros, RHEL and Debian.

Debian (including Ubuntu, AlmaLinux)

In my opinion, if you are doing a personal project or anything that is non-commerical or doesn’t involve a bunch of investor money, use Debian.  I find it more intuitive and am simply more used to it having started my Linux journey in Ubuntu.  Also, it has a commitment to staying free for all uses.

In terms of which one in particular to use, I just use Debian.  I’m by no means a power user, but having used Debian, Ubuntu, and AlmaLinux… I’ve been the least frustrated using Debian.  AlmaLinux, I’ve noticed, is a bit slow to get patches to critical libraries, whereas Ubuntu sometimes has the opposite issue of updating repos quickly with libraries that are later-on discovered to need patching.

Debian is the flagship and finds a good balance between the two, so I just use it.

RHEL (Red Hat Enterprise Linux)

So maybe it’s because I hate the thought of spending money, but the word “Enterprise” in RHEL’s acronym scares me.  I must say, I know RHEL RHEL-atively well (lol) as I use it for my day job.  However, I just don’t really like its syntax.  Also, RHEL sometimes costs money (I’m not sure the exact conditions when you have to pay).  There are several RHEL-based free distributions like Fedora and many others I’m unfamiliar with.  CentOS is another very popular commercially-used RHEL-based distro.

But yeah, Red Hat basically provides enterprise-level support.  For big projects with many users, investors, etc… organizations love the warm, comforting feeling of having a big, soulless corporation say that everything will be all right in case things go awry.  So yeah, RHEL is widely-adopted for this reason, so it’s good to know it at least a little.

Summary

Please note that the Linux commands used in RHEL are the same in all RHEL-based distros (CentOS, Fedora, etc) and that is also true for Debian and its distros (Ubuntu, etc).  However, Debian-based Linux can’t be used in RHEL-based Linux and vice versa.  This is why I recommend specializing in one or the other or its easy to get things mixed up.  Then, google like hell if you need to use the other.  Again, for my server, I’m using Debian 12.

Apache vs nginx

Umm… Apache.  When I first set up my server, I went through the very complicated nginx set-up process and it worked for a while, but then it went out and I couldn’t get it to restart, so I ended up using Apache.

If the performance benefit is actually needed go for nginx.  nginx is undoubtedly more performative and better in pretty much every metric; however, Apache is much more widely-adopted and works right out of the box in virtually any Linux distro.  Also, if you are going through tutorials and such, most of the time the assumption is that you’re running Apache.

My philosophy is, by the time you need nginx, your project probably has enough money around it where you can hire someone to do nginx.  I’d rather not bother for now.

Now what?

Okay, so in the next few posts I will go over what was included in my VPS and the critical first steps to take a fresh new installation.