This commit restructures the homeserver repository to isolate the core gateway and management tools (Control Plane) from user applications (Data Plane). This allows applications to have independent lifecycles and CI/CD pipelines, preventing git history contamination.
- Relocated user applications (excalidraw, gitea, jellyfin, learning-hub, mermaid, ollama) to an external deployments directory.
- Moved homepage to the root directory as a core server component and removed the empty apps directory.
- Streamlined up.sh and down.sh to deploy and stop only core services and homepage, removing --infra-only parameters.
- Replaced all hardcoded domain names with a configurable global DOMAIN environment variable in docker-compose files.
- Used Authelia templating ({{ env "DOMAIN" }}) in configuration.yml to dynamically resolve SSO cookie domains and redirection URLs.
- Updated up.sh and down.sh helpers to explicitly pass env files via --env-file flags, resolving compose interpolation warnings.
- Created a declarative NixOS module (infra/nixos/dynu-ddns.nix) to orchestrate the Dynu DDNS update script.
- Created Authelia .env-example template for setup reproducibility.
- Refactored .gitignore to exclude obsolete app cache rules and keep it minimal to core secrets, volumes, and logs.
- Updated documentation (README, architecture, roadmap, usability) to document decoupled deployments and public/SSO service templates.
107 lines
4.7 KiB
HTML
107 lines
4.7 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> A host-level systemd service (<code>scripts/dynu/</code>) monitors the public IP and updates Dynu DDNS records.</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>
|