Back

Restarting the Homelab

Homelab: A New Beginning with a Pi

UPLOADED ON

July 21, 2024

INFRASTRUCTURE TECHNOLOGY
/_astro/server.Bp7Pgepf.jpg

Introduction

I've never had a proper homelab before, only some Ubuntu server running on an old laptop that had its battery removed. I never did proper documentation and didn't have the infrastructure automated.

I recently bought a used Raspberry PI 4B (4gb) from a friend and thought it would be a good time to start making a proper homelab.

I used Ansible to automate the setup and deployment of services while using markdown as the documentation. They are available at this Gitlab repository: jeiya/homelab.

Infrastructure

  • I used Ansible for the setup automation because I was most familiar with it
  • I wanted to use Debian ARM64 for the operating system but decided against it because Raspberry Pi OS is Debian-based and includes utilities specifically designed for Raspberry Pi, such as firmware updates.
  • I had used docker because most self-hosted software supports it. However, most also don't use rootless Docker images. I wanted to use Podman but didn't have the time to convert the services into rootless Podman containers and test them.
  • Nginx Reverse Proxy Manager tutorials are readily available, making it ideal. In the future though, I plan to move to Traefik because it can be configured through the configuration file.
  • I like Adguard and their products, so I chose Adguard Home over Pi-hole.
  • Heimdall fits my needs, but I will probably replace it with something else in the future.

Diagram

/_astro/diagram.bqoBjZia.png

Physical Server

The switch I am using here is a TP-Link sg108E which is a managed (WebUI) switch. It's a budget switch that doesn't offer PoE but it's enough for my current use case.
/_astro/server.Bp7Pgepf.jpg

Troubles

Backup and Restoration Challenges:

Difficulty in emulating a Raspberry Pi OS for testing led to using dd with zstd compression for creating and restoring backups:

Backup Command:

sudo dd if=/dev/sdX | zstd > ~/mount/src/rpi_snapshot1.img.zst
					

Restore Command:

zstd -d --stdout ~/mount/src/rpi_snapshot1.img.zst | sudo dd of=/dev/sdX bs=4M
					

Port Configuration Issues:

Nginx Reverse Proxy Manager would not work for me if I didn't use their default ports.

Adguard Home also had the same issue when trying to move the dashboard port to something other than 8080.

Future Plans

  • Use vlans for better network security
  • Use the gpio of the SBC servers for a physical poweroff dp switch
  • Setup libre computer SBC for Zerotier or Tailscale, Gitea, Samba file sharing, SSH jump server