This repository contains the IaC (Infrastructure as Code) configuration for my homelab.
My homelab runs on Proxmox across three physical hosts, with VMs managed and maintained using Terraform. All VMs are provisioned from templates created with Packer.
As of now, all services are containerized using Docker Compose. I plan to migrate them all to a Kubernetes (K3S) cluster for orchestration. The infrastructure is managed through Ansible playbooks for configuration management and automation.
All environment variables and secrets and stored in HashiCorp's Vault, and is hosted on an external server that is manually managed as of now. An Ansible playbook fetches the required environment variables and sets them in .env
files for Docker Compose. Refer to external/
for further details.
- Terraform - Infrastructure provisioning
- Packer - VM template creation
- Ansible - Configuration management and automation
- Docker - Container orchestration
- Kubernetes (K3s) - Container orchestration platform
- Vault - Environment variables and secrets management
Purpose | Service |
---|---|
Smart Home Monitoring | HomeAssistant |
Backups | Borgmatic |
Tailscale VPN Server | Headscale |
Photo Management | Immich |
Password Manager | Vaultwarden |
Reverse Proxy | Traefik |
Automation | n8n |
Note-taking | Flatnotes + Syncthing |
Document Storage | Paperless-ngx |
DAV Server | Baïkal |
File Sharing | Balti |
URL Shortener | Chota |
Pastebin | Kachra |
.
├── ansible/ # Ansible playbooks and configurations
├── docker/ # Docker Compose files and configurations
├── external/ # External service configurations that require uptime
├── packer/ # VM template definitions
└── terraform/ # Terraform infrastructure code
Each directory contains its own README with detailed information about the configurations and usage.
Physical Hosts
Host | CPU | Threads | RAM | Storage |
---|---|---|---|---|
Vyria | AMD Ryzen 5 5600X | 12 | 16 GB | 480 GB NVMe |
Alpha | Intel i5-6200U | 4 | 8 GB | 128 GB SATA SSD |
Beta | Intel i5-7300U | 4 | 8 GB | 256 GB SATA SSD |
Virtual Machines
VM | Cores | RAM | Storage | Purpose |
---|---|---|---|---|
Vyria | 4 | 8 GB | 260 GB | Main services |
Kubernetes1 | 2 | 2 GB | 10 GB | K3s cluster node |
VM | Cores | RAM | Storage | Purpose |
---|---|---|---|---|
Kubernetes2 (TODO) | 2 | 2 GB | 10 GB | K3s cluster node |
Home Assistant | 2 | 2 GB | 32 GB | Home automation |
VM | Cores | RAM | Storage | Purpose |
---|---|---|---|---|
Kubernetes3 (TODO) | 2 | 2 GB | 10 GB | K3s cluster node |
Networking
Device | Purpose | Notes |
---|---|---|
ISP Router | Internet gateway | Default configuration |
TP Link WR840N v6 | Network access | Access Point mode, DHCP disabled, WiFi disabled |
- Readme
- Setup basic o11y
- Add metrics to Proxmox
- Make Terraform and Packer fetch secrets from Vault
- Setup a CI/CD pipeline
- Migrate services to k3s
- Inspired by mafyuh