Coding, Crying, and Caffeine: The Story of My Self-Hosted Blog

Coding, Crying, and Caffeine: The Story of My Self-Hosted Blog

Yep, you read the title right, I'm starting a blog. Like most programmers, I'm reaching that point in my career where I'm hitting a peak in my learning curve after two long years – which basically means I know everything (but am also about to find out I know absolutely nothing).

So yes, I built a blog. Not just any blog, mind you. I went the scenic route – the one paved with server errors, frantic Google searches at 3 AM, and the constant, nagging fear that my entire digital existence could vanish with a single misplaced semicolon. Yes, I'm self-hosting. Because who needs easy when you can have character?

Instead of taking the well-trodden path (you know, the one where you click a button and poof – a rogue blog appears), I decided to become my own personal Amazon Web Services and Medium. Simultaneously. Because clearly, I wasn't busy enough. I'm basically a one-person internet conglomerate, except instead of billions in revenue, I have a rapidly depleting caffeine supply and a severe lack of sleep.

Why, you ask? Because learning is fun! (Or so I tell myself while wrestling with Apache configurations). And because I genuinely enjoy sharing the knowledge I've painstakingly acquired (mostly through trial and error, a lot of error). This blog is my outlet for both. Think of it as a digital diary of my self-hosting and programming adventures, complete with tutorials, witty observations (hopefully), and the occasional existential crisis.

Let's be real, if I'm going to subject myself to this much pain, something good has to come of it. And what better way to justify my suffering than by sharing it with you, dear reader? Maybe, just maybe, by teaching you, I'll finally understand what I'm doing myself. Consider this a collaborative learning experience, where we both emerge slightly more knowledgeable (and possibly slightly more insane).

Now that I've convinced you this is a terrible idea, let me show you exactly how I did it...

The Hardware Setup: My Janky Home Data Center

First things first – every self-respecting home server setup starts with some questionable hardware purchases. In my case, I went for an old but still reliable pair of systems:

Atlas (The main carry): An old enterprise Dell workstation with a server-grade CPU, 32GB of RAM, and a whopping 3TB of storage. It's the heavy hitter in this setup, and is super upgradable too (and yes I custom designed and 3D printed a drive cage for it)
Hermes (Smol but speedy): A surprisingly powerful Chatreey mini PC with an N100 processor, 8GB of RAM (upgradable), and 128GB of storage (also upgradable). Not as powerful as Atlas, but packs so much power in a size smaller than my coffee cup!

The Brain of the Operation: Enter Proxmox

Now, to make these machines play nice together, I needed something to manage them. Enter Proxmox – a fancy term for "the thing that lets me pretend I'm running a real data center in my spare room." Here's what it does:

  • Acts as a hypervisor (Basically lets me run a lot of little virtual computers in one computer!)
    • This includes resources like storage (pretty important one hahaha)
  • It allows me to create a cluster (Lets me share resources between machines, and even use them as backups incase one dies!)
Proxmox Server Solutions
Proxmox develops powerful and efficient open-source server solutions like the Proxmox VE platform, Proxmox Backup Server, and Proxmox Mail Gateway.

The Blog Itself: Ghost in the Machine

For the actual blog, I went with a service called Ghost CMS. (Yes I know they have a hosted version you can pay monthly for, but it's open-source and self-hostable, so I went for this due to its feature-set) Let me guide you through some of the steps I took to self-host this:

  1. Created a virtual machine (Thank you hypervisor!)
  2. Installed Docker (Makes it a lot easier to manage than running the whole service manually)
  3. Spun up Ghost CMS using Docker Compose (This is due to Ghost requiring a DB as well, I might eventually migrate it to a separate instance, but beggars can't be choosers!)

And surprisingly, it works! However, I'm still waiting to see what happens when more than three people try to read it at once 😅.

Ghost: The best open source blog & newsletter platform
Beautiful, modern publishing with email newsletters and paid subscriptions built-in. Used by Platformer, 404Media, Lever News, Tangle, The Browser, and thousands more.

Making It Actually Accessible: The Security Bit

Now comes the tricky part – getting this blog out into the wild without accidentally exposing my entire home network to the internet (because I'd rather not have my toaster hacked, thank you very much).

The solution? A pretty common one nowadays for self-hosters, Cloudflare tunnels! These things are absolute magic, and are so easy to set up it's insane (not to mention free! For the moment, at least), it allows me to open apps to my network without even doing any port-forwarding! That being said all my app's data now goes through their servers, so in true self-hosted fashion I'll have to find a way around that eventually (hahaha 🥲).

The concept of how a Cloudflare tunnel works could be another blog in itself, but I'll leave you with this nice infographic in the meantime from the Cloudflare docs!

A diagram showcasing in a basic sense how cloudflare tunnels work!
Cloudflare Tunnel · Cloudflare Zero Trust docs
Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP — instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare’s global network. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare.

Using this concept, I attached the local URL from my VM (with its port) to the DNS record you're visiting now!

Noah’s Ark Tech Tips
The tech diary of Noah Rijkaard, a Full-stack software engineer working out of Kuala Lumpur Malaysia, it comprises of tutorials, thoughts and existential crises

That's the technical side of things in a nutshell! I'll be diving deeper into each of these components in future posts, because there's nothing quite like documenting your mistakes to help others avoid them. Plus, writing about it helps me pretend I actually know what I'm doing.