Skip to content
BorjaIPPublic

Latest commit

Β 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Homelab

A fully automated, themed homelab built with Proxmox, Terraform, and Docker.


This homelab infrastructure is centered on Proxmox VE using Terraform and Docker to provision VMs and Dockers (names based in the Angels from Neon Genesis Evangelion). Each VM serves a specific purpose like media, storage, or network automation.

Homelab Stack

πŸ”§ System Configuration

Refer to the table below for an at-a-glance view of each configured and planned virtual machine and its corresponding role.

These steps are tailored specifically to my homelab infrastructure. Some assumptions are made (like Proxmox being pre-installed), and tools are selected based on personal preference and workflow. Your configuration may vary depending on your hardware, network design, and requirements.

  • Proxmox VE is already installed and fully configured in this environment.
  • Create new SSH Key for setup conectivity.
  • Use Proxmox VE Helper Scripts for community-contributed helper scripts for VM management, backups, and more.
  • Setup Traefik as a reverse proxy to handle and redirect HTTP/S traffic.

πŸ”‘ SSH Key & Certificate Generation

Generate an SSH key for your vm's or other services:

ssh-keygen -t ed25519 -C "server"

Use the generated public key in user-data for automatic authentication setup.

🌐 Proxy Configuration (Traefik)

Traefik runs as a single instance on the gaghiel VM (206) and routes every *.home domain to the services running on the other VMs. Since each service lives on a different Docker host, Traefik's docker label provider can't see them (it only discovers containers on its own daemon), so routing is configured through the file provider instead: one static YAML file per VM under terraform/docker/gaghiel/routers/, each defining a router + service pair pointing at the target VM's IP:port.

Pi-hole (running on the Raspberry Pi) resolves every *.home hostname to gaghiel's IP, and is set as the DNS server on the router so LAN devices go through it automatically.

Traffic Flow & Observability

Future option: traefik-kop lets each VM run a small agent that publishes standard Docker-label routing config to a shared Redis, so Traefik could pick up services automatically instead of the manual YAML files β€” worth revisiting if the number of services/VMs grows enough to justify the extra containers.

πŸ“ NFS Configuration

Optional - Share Storage

Note

⚠️ NTFS support is functional but comes with performance and permission caveatsβ€”consider ext4/ZFS for native setups.

To consolidate data across VMs, I export a shared storage path via NFS, backed by an NTFS-formatted disk. While not typical in Linux-first setups, this suits my personal needs.

sudo apt install -y ntfs-3g

List all the devices and select which one you need to mount.

sudo fdisk -l
sudo lsblk -f
ls -l /dev/disk/by-uuid/

Copy the UUID in /etc/fstab

# edit fstab
vim /etc/fstab
UUID="" /mnt/storage ntfs-3g defaults,auto 0 0
mkdir /mnt/storage
# mount disc
mount -a
  • Add disk to VM.
ls -l /dev/disk/by-id/
qm set 103 -virtio2 /dev/disk/by-id/<disk-id>

1. Install NFS Server

sudo apt install -y nfs-kernel-server
sudo vim /etc/exports

Example export entry:

/mnt/storage 192.168.1.0/24(rw,sync,no_subtree_check)
  • Replace 192.168.1.0/24 with the subnet of your Proxmox server (e.g., 192.168.1.0/24 allows all IPs in the 192.168.1.x range).
  • rw: Allows read and write access.
  • sync: Ensures changes are written to disk before the client is notified.
  • no_subtree_check: Prevents subtree checking for better performance.

2. Add NFS Storage to Proxmox

  1. Login to Proxmox Web UI

  2. Navigate to Datacenter > Storage > Add > NFS

  3. Fill in:

    • ID: Enter a name for the storage (e.g., nfs-storage).
    • Server: Enter the IP address of the NFS server (e.g., 192.168.1.111).
    • Export: Click Query to list available NFS exports, and select /mnt/storage.
    • Content: Select the types of content you want to store (e.g., Disk image, ISO image, Backup).
    • Nodes: Select the Proxmox nodes that can access this storage.

🧱 Base VMs with Packer

Warning

⚠️ To be able to run packer from WSL2 you need to change the network mode.

All virtual machines are built from a cloud-init Ubuntu 24.04 image using Packer. This ensures consistency across deployments.

Configure variables.auto.pkrvars.hcl file for custom values.

cd packer/ubuntu-2404
packer validate .
packer build .
  • The resulting image is uploaded to Proxmox as a VM template.
  • Cloud-init is enabled in the build to support dynamic configuration.
  • Include Docker installation an other tools.
  • This template is later used by Terraform to deploy actual VMs.

πŸš€ VM Deployment with Terraform

Deploy or destroy VMs using Terraform's targeted apply.

Ensure that your terraform.tfvars and modules are configured per Proxmox Provider standards.

cd terraform
terraform plan
terraform apply
# or 
terraform apply -target='module.vms["ramiel"]'
terraform destroy -target='module.vms["ramiel"]'

πŸ“¦ VMs

Thumbnail VM Name ID Category Services/Tools
Adam 201 Proxmox Host Proxmox VE
Lilith 202 Assistant Hermes Agent
Sachiel 203 Media Server Jellyfin / Calibre-Web
Shamshel 204 Arr Stack Sonarr / Radarr / Lidarr / Prowlarr / Seerr
Ramiel 205 Downloaders Transmission
Gaghiel 206 Reverse Proxy and Tunnels Traefik
Israfel 207 NFS Server NFS*
Sandalphon 208 Network tools Gluetun / Flaresolverr / Tailscale
Matarael 209 Dashboards Homepage
Sahaquiel 210 Monitoring Uptimekuma / Dozzle
Ireul 211 Utilities Immich / Open WebUI
Leliel 212 Home Automation Home Assistant OS
Tabris 217 Storage tools Samba / Nextcloud

[*]: Future changes or upgrades.

βš™οΈ Configuration

Transmission and OpenVPN

  • For testing Transmission with OpenVPN add this torrent from TorGuard.

Home Assistant

Jellyfin

Seerr

  • Requests manager connected to Jellyfin, Radarr and Sonarr
  • Setup, reset procedure and pending items: docs/seerr.md

Windows Share (Samba)

  • Windows reaches the NAS disk through the samba container on tabris (\\192.168.1.217\Storage).
  • Map it once as Z: with a stored credential (run in a normal PowerShell or CMD).
  • Container configuration, verification and troubleshooting: docs/samba.md

πŸ“š Documentation

Doc Use it for
backup-3-2-1.md 3-2-1 backup scheme for the NAS folders that matter
glances-host.md Glances web server on the Proxmox host, read by the dashboard
home-assistant.md Home Assistant OS VM (leliel): update, rollback, MCP, troubleshooting
israfel-nfs.md NFS server and USB disk passthrough on israfel
jellyfin.md Jellyfin media server setup
lilith.md Lilith, the Hermes assistant VM
mcps.md MCP servers Claude Code uses to operate the homelab
oci-vs-docker-vms.md Proxmox native OCI containers compared with Docker inside VMs
pkm-unification.md PKM shared by Obsidian, Hermes and iOS
proxmox-backups.md Backups of hand-made VMs and the Proxmox host
proxmox-ssh-access.md Dedicated SSH key for Proxmox automation
proxmox-upgrade.md Proxmox VE 8.4 to 9 upgrade
samba.md Windows access to the NAS
seerr.md Seerr media request manager
syncthing-israfel.md Syncthing hub on israfel
terraform-to-opentofu.md Terraform to OpenTofu and the Proxmox 9 provider
vm-config-backups.md Backup and automatic restore of each VM's ~/config/

πŸ”— References


✦ Inspired by Evangelion. Built for learning, automation, and chaos. ✦

Contributors

Languages