Skip to content

mradigen/selfhosted

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homelab

Baikal Balti Balti MinIO Borgmatic Chota Flatnotes Syncthing Headscale HomeAssistant Immich Kachra n8n Paperless NGX Traefik TUI Suite Vaultwarden

Hypervisor OS Tools Networking
Proxmox Debian Ansible Docker Kubernetes
Packer Terraform Vault
TP-Link

📐 Infra Diagram

Architecture

📖 Overview

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.

🛠 Infrastructure Stack

Tools & Automation

  • 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

Services

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

📁 Repository Structure

.
├── 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.

🖥️ Hardware

Setup

Setup

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

Vyria

VM Cores RAM Storage Purpose
Vyria 4 8 GB 260 GB Main services
Kubernetes1 2 2 GB 10 GB K3s cluster node

Beta

VM Cores RAM Storage Purpose
Kubernetes2 (TODO) 2 2 GB 10 GB K3s cluster node
Home Assistant 2 2 GB 32 GB Home automation

Alpha

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

📌 To-Do

  • 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

Credits

About

My homelab, defined in code

Topics

Resources

Stars

Watchers

Forks