Skip to content

aaronearles/home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

107 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HOME 2.0 - Modern Self-Hosted Infrastructure

A comprehensive Infrastructure as Code (IaC) homelab implementation featuring containerized services, automated provisioning, and security-first architecture. This repository serves as a complete blueprint for deploying production-ready self-hosted infrastructure across multi-tier environments.

πŸ—οΈ Architecture Overview

This homelab implements a multi-tier containerized architecture with:

  • Three segregated Docker environments: DMZ, Internal, and Lab tiers
  • Multi-cloud infrastructure: Proxmox (on-premises) + Linode + Cloudflare integration
  • Comprehensive service mesh: 50+ self-hosted applications and services
  • Security-first design: WAF, SSO, network segmentation, and automated certificate management
  • Full automation: Infrastructure provisioning (Terraform) + Configuration management (Ansible)

🎯 Design Principles

  • Infrastructure as Code: Git serves as the single source of truth for all infrastructure
  • Environment Agnostic: Variable-driven configurations supporting lab/staging/production deployments
  • Security by Design: Public repository encouraging secure secret management and best practices
  • Simplicity Over Complexity: Preference for straightforward solutions over complex templating
  • Self-Hosted First: Emphasis on data sovereignty and privacy

πŸ“‹ Service Catalog

πŸ” Authentication & Security

  • Authentik - Enterprise SSO/OIDC provider
  • Vaultwarden - Self-hosted password manager
  • HashiCorp Vault - Secrets management
  • Wazuh - SIEM/security monitoring platform

🌐 Reverse Proxy & Networking

  • Traefik (Multi-instance) - Load balancing with WAF capabilities
  • Cloudflared - Secure tunnel management
  • Squid - Caching proxy server

πŸ“Š Monitoring & Observability

  • Gatus - Service health monitoring
  • Grafana - Data visualization
  • Uptime Kuma - Uptime monitoring
  • Beszel - Infrastructure monitoring
  • Dozzle - Docker log aggregation

πŸ’» Development & Productivity

  • Code Server - Web-based VS Code IDE
  • Forgejo - Self-hosted Git service
  • Nextcloud AIO - Collaboration platform
  • Hedgedoc - Collaborative markdown editor
  • IT Tools - Developer utilities collection

🎡 Media & Entertainment

  • Jellyfin - Media server with GPU transcoding
  • Immich - Self-hosted photo management

🏠 Home Automation & Communication

  • Home Assistant - Home automation platform
  • Synapse - Matrix homeserver
  • LibreChat/OpenWebUI - AI chat interfaces

πŸ’Ό Business & Finance

  • Actual - Personal finance management
  • Firefly III - Financial management
  • Vikunja - Task management
  • Paperless-NGX - Document management

πŸ€– AI & Machine Learning

  • AnythingLLM - Document chat with LLM
  • OpenAI Proxy - API proxy services

πŸ›οΈ Infrastructure Components

πŸ–₯️ Compute & Virtualization

  • Proxmox VE: Primary virtualization platform with VM/LXC management
  • Docker: Container orchestration across multiple environments
  • Kubernetes: K3s cluster for container orchestration (testing)

☁️ Cloud Integration

  • Linode: External proxy instances and public-facing services
  • Cloudflare: DNS management, CDN, and secure tunnel services
  • AWS/Azure: Multi-cloud deployment configurations

πŸ”§ Automation & Management

  • Terraform: Infrastructure provisioning across multiple providers
  • Ansible: Configuration management and system hardening
  • Watchtower: Automated container updates
  • Dockge: Docker Compose stack management

πŸ“ Repository Structure

β”œβ”€β”€ ansible/              # Configuration management & automation
β”‚   β”œβ”€β”€ playbook/         # Ansible playbooks for system configuration
β”‚   └── inventory/        # Environment-specific inventory files
β”œβ”€β”€ dockerdmz01/          # DMZ tier - External-facing services
β”œβ”€β”€ dockerint01/          # Internal tier - Private services  
β”œβ”€β”€ dockerlab01/          # Lab tier - Development & testing
β”œβ”€β”€ terraform/            # Infrastructure provisioning
β”‚   β”œβ”€β”€ aws/              # AWS resources
β”‚   β”œβ”€β”€ azure/            # Azure resources  
β”‚   β”œβ”€β”€ cloudflare/       # DNS & CDN management
β”‚   β”œβ”€β”€ linode/           # Linode instances
β”‚   └── proxmox/          # VM/LXC provisioning
β”œβ”€β”€ scripts/              # Automation scripts
β”‚   β”œβ”€β”€ bash/             # System setup & maintenance
β”‚   β”œβ”€β”€ cloudflare_ddns/  # Dynamic DNS management
β”‚   └── proxmox/          # VM template management
└── docs/                 # Documentation & reference materials

πŸš€ Quick Start

Prerequisites

  • Proxmox VE cluster (primary compute)
  • Cloudflare account (DNS management)
  • Terraform >= 1.0
  • Ansible >= 2.9
  • Docker & Docker Compose

Deployment Steps

  1. Clone Repository

    git clone <repository-url>
    cd home
  2. Configure Variables

    # Copy and edit terraform variables
    cp terraform/proxmox/sample.tfvars terraform/proxmox/terraform.tfvars
    
    # Update Ansible inventory
    vim ansible/inventory/lab.yml
  3. Provision Infrastructure

    # Deploy VMs/LXC containers
    cd terraform/proxmox
    terraform init && terraform apply
  4. Configure Systems

    # Run Ansible playbooks
    cd ansible
    ansible-playbook -i inventory/lab.yml playbook/terminal-setup.yml
  5. Deploy Services

    # Start core services
    cd dockerint01/traefik
    docker-compose up -d
    
    # Deploy additional services as needed

πŸ”’ Security Features

  • Network Segmentation: Isolated Docker networks and VLANs
  • Web Application Firewall: Coraza-powered WAF with OWASP rule sets
  • Single Sign-On: Centralized authentication via Authentik
  • Certificate Management: Automated Let's Encrypt via DNS challenges
  • Secret Management: HashiCorp Vault integration
  • Access Control: Cloudflare Access for external services
  • SIEM: Comprehensive logging and monitoring via Wazuh

πŸ”§ Management & Operations

Monitoring Dashboards

Key Management Commands

# View service status
docker-compose ps

# Update all containers
docker-compose pull && docker-compose up -d

# Check Traefik routing
docker logs traefik

# Backup Vaultwarden
./scripts/backup-vaultwarden.sh

🀝 Contributing

This repository is designed to be publicly shareable and educational. When contributing:

  • Follow Infrastructure as Code best practices
  • Use variables for environment-specific configurations
  • Document any new services or significant changes
  • Ensure secrets are properly externalized
  • Test changes in lab environment first

πŸ“š Additional Resources

  • Documentation: See /docs directory for detailed guides
  • Configuration Examples: Check /zz_Examples for reference configurations
  • Terraform Modules: Reusable infrastructure components in /terraform
  • Scripts: Automation utilities in /scripts

This homelab represents a sophisticated, production-ready infrastructure that balances security, functionality, and ease of management while maintaining strong self-hosting principles.

About

Collection of IaC, configs, scripts, and notes used within my home prod and lab environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors