Files
nixos-core/docs/legacy/architecture.html
T
kiskaadee e832c83882 refactor(core): consolidate control plane into a single compose stack
This massive refactor transitions the project from a custom-scripted
multi-stack deployment into a unified, standard Docker Compose
architecture. This heavily simplifies GitOps workflows and native
NixOS systemd integration.

- Merge all infrastructure and portal compose files into a root docker-compose.yml
- Consolidate all service configurations and databases into a single ./config/ directory
- Remove brittle up.sh and down.sh orchestration scripts
- Fix Authelia templating by enabling X_AUTHELIA_CONFIG_FILTERS=template
- Replace all hardcoded domain names with dynamic ${DOMAIN} variables
- Archive legacy HTML documentation and architecture notes to docs/legacy/
- Introduce setup_guide.md as the single source of truth for SOPS secrets and NixOS deployment
2026-06-28 15:55:06 -05:00

107 lines
4.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Server Architecture | Hardened Hub</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<header>
<h1>🏗️ Server Architecture</h1>
<p><strong>Model:</strong> Hardened Hub v2.0</p>
</header>
<nav>
<h4>Contents</h4>
<ul>
<li><a href="#physical">Host Layer</a></li>
<li><a href="#infra">Infrastructure</a></li>
<li><a href="#apps">Applications</a></li>
<li><a href="#network">Networking</a></li>
<li><a href="#security">Security</a></li>
</ul>
</nav>
<p>The homeserver follows a <strong>Layered Architecture</strong> designed for security, observability, and modularity. It is split into two logical tiers: the <strong>Control Plane</strong> (Infrastructure) and the <strong>Data Plane</strong> (Applications).</p>
<section id="physical">
<h2>1. Physical & Host Layer</h2>
<p>The foundation of the system running directly on the host hardware or virtualized OS.</p>
<div class="layer-box">
<ul>
<li><strong>OS:</strong> Linux (Generic).</li>
<li><strong>IP Sync:</strong> <span style="color: #cc0000; font-weight: bold;">[DEPRECATED/MOVED]</span> Dynu DDNS updates are now handled declaratively by the host's NixOS configuration repository (<a href="https://github.com/kiskaadee/nixos-config">nixos-config</a>).</li>
<li><strong>Docker Engine:</strong> Orchestrates all containerized services.</li>
</ul>
</div>
</section>
<section id="infra">
<h2>2. Infrastructure Layer (Control Plane)</h2>
<p>The management tier that handles routing, identity, and system maintenance.</p>
<div class="grid">
<article class="card">
<h4>🌐 Edge Gateway</h4>
<p><strong>Traefik v3:</strong> Reverse Proxy & SSL (DNS-01 Challenges). Routes subdomains for all core and user-deployed services.</p>
</article>
<article class="card">
<h4>🔐 Identity</h4>
<p><strong>Authelia:</strong> SSO & 2FA provider. Forward Auth integration with Traefik.</p>
</article>
<article class="card">
<h4>🛡️ Socket Proxy</h4>
<p>Protects the Docker socket from container-escape vulnerabilities.</p>
</article>
<article class="card">
<h4>🛠️ Maintenance</h4>
<p>Portainer (Management), Watchtower (Updates), and Diun (Notifications).</p>
</article>
</div>
</section>
<section id="apps">
<h2>3. Application Layer (Data Plane)</h2>
<p>Consumer-facing services isolated from the core infrastructure.</p>
<div class="layer-box">
<ul>
<li><strong>Service Discovery:</strong> <em>Homepage</em> dashboard serves as a unified entry portal.</li>
<li><strong>SSO Protection:</strong> Critical administration pages and external services utilize Authelia Forward Auth.</li>
<li><strong>Decoupled Lifecycles:</strong> User applications run in separate containers outside this repository, keeping the core system clean and stable.</li>
<li><strong>Isolation:</strong> Services have no direct host access and communicate strictly over dynamic internal networks.</li>
</ul>
</div>
</section>
<section id="network">
<h2>4. Networking Model</h2>
<p>Traffic flow is segmented to minimize the blast radius of a potential breach.</p>
<ul>
<li><code>proxy-net</code>: Shared internal network for Traefik and all exposed applications.</li>
<li><code>socket-net</code>: Isolated network for Docker management tools.</li>
<li><strong>External:</strong> Only ports 80 and 443 are exposed.</li>
</ul>
</section>
<section id="security">
<h2>🛡️ Security Posture</h2>
<p>Current hardening measures enforced across the Hub:</p>
<ul>
<li><span class="badge badge-success">HARDENED</span> <strong>No Root Docker:</strong> Standardized PUID/PGID usage.</li>
<li><span class="badge badge-success">PRIVATE</span> <strong>Wildcard SSL:</strong> Prevents subdomain enumeration via certificate transparency logs.</li>
<li><span class="badge badge-success">ISO</span> <strong>Network Segmentation:</strong> Strict isolation of management traffic.</li>
</ul>
</section>
<footer>
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
</footer>
</main>
</body>
</html>