---
title: 'The Homelab Series: Part 2 - The First Steps'
url: 'https://thanhvokhac.com/blog/homelab-series-2'
markdown: 'https://thanhvokhac.com/blog/homelab-series-2.md'
date: '2026-10-29'
description: 'Warning: the addiction is real It did'
taxonomy:
  category:
    - Homelab
  tag:
    - Homelab
    - Self-hosting
    - DNS
    - 'Reverse Proxy'
    - Cloudflare
---

# The Homelab Series: Part 2 - The First Steps

Warning: the addiction is real

## It did not stop at Jenkins

Hosting Jenkins locally for my project was never the end, it was just the first success. Even though my project ended not long after the CI migration, my curiosity of DevOps grew quickly. Another colleague of mine yapped about how he bought a Raspberry Pico 2W and used it as a Wake-on-LAN host, so he can turn his PC on when he is away. It was the first time I heard about 'Raspberry', I did some searches, and wanted to have a Raspberry at home too.

My first intention was using the small Raspberry to be the Jenkins host, and maybe the Wake-on-LAN host too. Not long after that I came across [selfh.st](https://selfh.st/), a **huge** (to me) website of self-hostable applications. My neurons kicked in, and urged me to write a checklist of what I should host:

- Homepage
- DNS server
- Media server
- Metrics dashboard
- ...

The list went on, but the first goal was simple:

- Buy a second computer
- Migrate Jenkins

After that, I could expand my realm as much as I wanted.

## The first homelab server

In my country, it is not easy to find a Raspberry reseller, even if I found one, the price is... quite expensive. A barebone Raspberry Pi 5 with 8GB RAM is about 240$, adding the accesories like PoE+ Hat, a box, SD card,... would price it up to nearly 300$.

I wasn't ready for that, so I found cheaper alternatives, and I settled with an **old HP EliteDesk G3, 16GB RAM and 256GB SSD** for the same 240$. RAM and SSD prices are crazy these days, I couldn't ask for more.

> Use any piece of hardware that you already own, old PC, mini PC, or buy a cheap one. - I-don't-know-who

If you want to start a homelab, or your server at home, people will tell you that, and it is damn right. Unless you already planned everything, services, networking, data storage,... then you may want a powerful rig, otherwise start small.

My starting homelab hardwares were:

- Old HP EliteDesk G3
- Mercusys MS105GP 5-port switch
- A *shoe rack*

Yes, I am not wrong, and I'm still using that shoe rack to organize my lab today. I don't care if you judge, it works, that's it.

## The Infrastructure setup

It was hard to do and figure things out yourself. I had my server, moved Jenkins there, freed up my main PC, but I could only connect to my server and Jenkins with it's machine local IP, "I don't like that", said myself. This is where the learning curve started to be quadratic. Let me go through my entire history.

### The local DNS

 Note

I have never wanted to open a port on my router. It was my thought that opening port on my router will turn my home network to a target for cyber threats. Maybe it's not very true, but I haven't revisit this topic.

I installed [BIND9](https://www.isc.org/bind/) on my server. Soon after I realized what a DNS does, it maps the ***IP to a name***, but my PC cannot magically ask my server what the mapping is. Meaning that after configuring the names for my two machines, I had to set my server as the network DNS. It only covered the IP-to-name part, how about port? If my service lies on port 8080, how does my PC know?

That's not the question DNS meant to answer. I stumbled myself for several days to know there's something called *Reverse Proxy*.

![nginx_bind9.webp](https://thanhvokhac.com/images/3/c/8/c/c/3c8cc16073f3831b6f7ec13af2f758c5f431f87e-nginxbind9.webp)

*Nginx + BIND9: the first ever DNS + Reverse Proxy pair I used*

### The local Reverse Proxy

Yeah... I told you the curve was quadratic. I did never satisfy with my setup, so I always went for more. I picked up the first software that I know in the field, I have seen the NGINX error page here and there, so I started with it. I read the Jenkins' [NGINX](https://nginx.org/) configuration and wrote it again myself, then I even configured a local CA cert just to make HTTPS happen.

![jenkins_nginx.webp](https://thanhvokhac.com/user/pages/03.blog/homelab-series-2/jenkins_nginx.webp)

*Another wall of text of the Jenkins NGINX config*

I was happy when my first every infrastructure was running and I can use `jenkins.lckdg.home` to connect to it from my browser. However time passed by, I was tired of typing in too many places, BIND9 records, NGINX configs, manual copying and organizing them. Things changed when I yapped about my homelab with my lead programmer at work.

 Note

Even with all this, I did not use my purchased domain. Because I did not open any port, I could not point the domain to my machine's IP :)

### The yapping went right

I knew that I could start a VPS, using Wireguard to spin up my own VPN, and connect to my resources through the VPN tunnel. However that route will be a lot of effort, if I had more experience I might have done so. My lead told me I could try using [Cloudflare tunnel](https://developers.cloudflare.com/tunnel/), no rented VPS, no open port, just a service to connect to Cloudflare DNS and I can start using my own domain. Neat.

Another 3 days spent, I read many blogs, tutorials and watched some videos on how to setup Cloudflare tunnel. I tried and failed several times until I could finally move there. **It hurts every time you migrate something**.

The tunnel is configred and hosted on my mini PC, I redirect my domain from the registrar to Cloudflare and set the domain routing there. Then I can connect to my service again. The fear of being exposed to the internet was still there with me, so I added the authentication layer on Cloudflare dashboard. *Voila* I had my infrastructure ![1673-peepo-dab.webp](https://thanhvokhac.com/images/8/4/1/b/2/841b22d43160ca5013219729fb8eb1c3af3da617-1673-peepo-dab.webp)

![Early_routing.webp](https://thanhvokhac.com/images/4/d/c/e/c/4dcecefe74c13a575ce07084a84e76e08d68d9a5-earlyrouting.webp)

*How I can access my services from the internet*

## Conclusion

Hosting just Jenkins really expanded my knowledge. I learned quite a lot about internet components: domain, domain registrar, DNS, reverse proxy,... a long the way.

With just about 300$ I had my own server, running a simple infrastructure at home with Cloudflare tunnel, Google SSO and any service I would like to host.

As my very first experience in exposing my machines to the internet, I played safe by delegating most of the network handling to Cloudflare and Google. I never open a port, but it was the best choice for me: I stayed with my family, if anything happens, it stays in my side of the house.

---

## Navigation

- Parent: [Blog](https://thanhvokhac.com/blog.md)
- Next: [The Homelab Series: Part 1 - The Start of It All](https://thanhvokhac.com/blog/homelab-series-1.md)
