docs(legacy): remove obsolete legacy documentation and update structural invariants
Core Architecture & Invariant CI / validate (push) Successful in 9m41s
Core Architecture & Invariant CI / validate (push) Successful in 9m41s
This commit is contained in:
1 parent
abf8d8d7e0
commit
fabdacb274
11 files changed
+1
-712
No files matched your search
@@ -136,9 +136,6 @@ unless the architecture itself has intentionally changed.
|
|||||||
Use the repository's current architecture and operational documentation as the
|
Use the repository's current architecture and operational documentation as the
|
||||||
source of truth for ownership, protocols, and system behavior.
|
source of truth for ownership, protocols, and system behavior.
|
||||||
|
|
||||||
Historical material under `docs/legacy/` is archival and must not be treated as
|
|
||||||
current system behavior.
|
|
||||||
|
|
||||||
Record significant architectural decisions in the appropriate ADR or Brain
|
Record significant architectural decisions in the appropriate ADR or Brain
|
||||||
documentation rather than expanding this file into an architecture manual.
|
documentation rather than expanding this file into an architecture manual.
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
# ADR 001: Removal of Localhost Routers for Development Freedom
|
|
||||||
|
|
||||||
* **Status**: Accepted & Implemented
|
|
||||||
* **Date**: 2026-05-17
|
|
||||||
* **Decider**: User & Gemini CLI
|
|
||||||
|
|
||||||
## Context
|
|
||||||
Initially, we implemented `*.localhost` routers in Traefik to allow local access to services (e.g., `jellyfin.localhost`) without traversing the public internet. The goal was to provide a "fast lane" for local management.
|
|
||||||
|
|
||||||
However, two major technical hurdles were encountered:
|
|
||||||
1. **SSL/TLS Restrictions**: Public Certificate Authorities (like Let's Encrypt) cannot issue certificates for the `.localhost` TLD. This resulted in "Insecure" warnings in browsers and the need to manage a local CA (like `mkcert`) or accept self-signed certificates.
|
|
||||||
2. **SSO (Cookie) Limitations**: Browsers enforce strict domain matching for cookies. Our Authelia instance is configured for `arch-services.mywire.org`. Browsers refuse to send these session cookies to `*.localhost` domains. This caused an infinite redirect loop or authentication errors when accessing services locally.
|
|
||||||
3. **Namespace Pollution**: Using `*.localhost` in Traefik intercepts traffic that might be needed for other developer workflows (e.g., running undeployed apps, Vite dev servers, or testing environments that default to `localhost`).
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
We decided to **deprecate and remove all `*.localhost` routers** from the Traefik configuration across all services.
|
|
||||||
|
|
||||||
Instead of dedicated local hostnames, we will use the **Public Domain + Local IP** strategy for local access.
|
|
||||||
|
|
||||||
## Consequences
|
|
||||||
|
|
||||||
### Positive
|
|
||||||
* **Seamless SSO**: Authelia SSO works perfectly because the browser sees the public domain (`*.arch-services.mywire.org`) and sends the correct cookies.
|
|
||||||
* **Valid SSL**: Traefik serves the real Let's Encrypt wildcard certificate, providing "Green Lock" security in browsers without manual certificate management.
|
|
||||||
* **Clean Namespace**: The `.localhost` TLD is now entirely free for other developer-specific tools and testing.
|
|
||||||
* **Local Speed**: When configured correctly via `/etc/hosts`, traffic never leaves the local machine, maintaining the speed benefits of the previous implementation.
|
|
||||||
|
|
||||||
### Negative / Required Actions
|
|
||||||
* **Manual Configuration**: Users must manually update their machine's `/etc/hosts` file to point the public subdomains to `127.0.0.1`.
|
|
||||||
* **SSO Requirement**: Local access now requires the same Authelia authentication as public access (unless explicitly bypassed in the public router, which is not recommended for security).
|
|
||||||
|
|
||||||
## Implementation Detail
|
|
||||||
To access services locally with this architecture, add the following to your `/etc/hosts`:
|
|
||||||
```text
|
|
||||||
127.0.0.1 traefik.arch-services.mywire.org auth.arch-services.mywire.org jellyfin.arch-services.mywire.org gitea.arch-services.mywire.org excalidraw.arch-services.mywire.org homepage.arch-services.mywire.org mermaid.arch-services.mywire.org ollama.arch-services.mywire.org learning.arch-services.mywire.org logs.arch-services.mywire.org portainer.arch-services.mywire.org
|
|
||||||
```
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# ADR 002: Migrate Dynu DDNS IP Discovery to Host NixOS Configuration
|
|
||||||
|
|
||||||
* **Status**: Accepted & Implemented
|
|
||||||
* **Date**: 2026-06-24
|
|
||||||
* **Decider**: User & Antigravity
|
|
||||||
|
|
||||||
## Context
|
|
||||||
Previously, we managed dynamic DNS IP synchronization using custom bash scripts (`ip-monitor.sh`) and systemd unit configurations in the `homeserver` scripts directory. The service checked the WAN IP and pushed updates to Dynu every 5 minutes.
|
|
||||||
|
|
||||||
However, this design introduced several structural problems:
|
|
||||||
1. **Imperative Secrets Leakage**: Credentials were stored in a cleartext out-of-band environment file (`/etc/conf.d/dynu-environment`). This required manual setup on target hosts and broke the declarative reproducibility goal.
|
|
||||||
2. **Redundant Logic**: The desktop machine (`desktop`) and server machine shared the same router (external public IP), but operated separate, duplicated cron/timer implementations.
|
|
||||||
3. **Inefficient Polling**: Checking the external IP and calling the Dynu APIs every 5 minutes from multiple endpoints generated unnecessary network traffic and risked API bans.
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
We decided to **deprecate and remove all native Dynu IP updater scripts and systemd definitions** from the `homeserver` codebase.
|
|
||||||
|
|
||||||
Instead, the Dynu IP monitoring and DDNS update lifecycle is now managed directly by the host operating system's configuration repository ([nixos-config](https://github.com/kiskaadee/nixos-config)).
|
|
||||||
|
|
||||||
## Consequences
|
|
||||||
|
|
||||||
### Positive
|
|
||||||
* **Single Source of Truth**: All WAN IP discovery, validation, and update logic is handled declaratively in the [nixos-config](https://github.com/kiskaadee/nixos-config) repository.
|
|
||||||
* **Cryptographic Secrets**: Credentials are encrypted inside Git using `sops-nix` and `age`, allowing safe storage in public dotfiles repositories.
|
|
||||||
* **Smart Change Detection**: A lightweight background Python script (`monitor.py`) checks the public IP every 30 minutes, keeping a local historical log (`ip_history.jsonl`) and triggering updates via `ddclient` *only* when a WAN IP rotation actually occurs.
|
|
||||||
* **Clean Repository**: Removed bloat and deprecated files from this service-level repo.
|
|
||||||
|
|
||||||
### Negative / Required Actions
|
|
||||||
* None. The deployment process is simplified as secrets and services are now handled automatically during the system-wide NixOS activation phase.
|
|
||||||
|
|
||||||
## References
|
|
||||||
* This decision was implemented in the [nixos-config commits](https://github.com/kiskaadee/nixos-config/commits/main/) under hash `c7acc2b0a3bb262dfd5577989d8d7f0218f2721e` (and subsequent hardening adjustments).
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
<!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>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Dynu IP Protocol | Hardened Hub</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<header style="background: #ffe6e6; border: 1px solid #ff9999; padding: 15px; border-radius: 5px; margin-bottom: 25px; color: #cc0000;">
|
|
||||||
<strong>⚠️ DEPRECATED</strong>
|
|
||||||
<p>This script-based DDNS implementation has been deprecated and removed from the homeserver repository. The Dynamic DNS update service and IP monitor are now handled declaratively by the host's NixOS configuration repository. See the nixos-config repository commit <a href="https://github.com/kiskaadee/nixos-config/commit/c7acc2b0a3bb262dfd5577989d8d7f0218f2721e" target="_blank">c7acc2b0a3b</a> for implementation details.</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
<h1>📡 Dynu IP Monitor & Updater</h1>
|
|
||||||
<p>Design and architecture of the DDNS synchronization mechanism.</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Problem Definition</h2>
|
|
||||||
<p>Maintain accurate DNS A records despite dynamic public IPs and unreliable providers.</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Core Design Decisions</h2>
|
|
||||||
<div class="grid">
|
|
||||||
<article class="card">
|
|
||||||
<h4>1. Probe Model</h4>
|
|
||||||
<p>Runs periodically via systemd instead of a long-lived daemon.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>2. Dual-Source</h4>
|
|
||||||
<p>Uses DNS (primary) and HTTP (fallback) for IP discovery.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>3. Validation</h4>
|
|
||||||
<p>Strict pipeline ensures no RFC1918 or private IPs are ever synced.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>4. Atomicity</h4>
|
|
||||||
<p>State updates use atomic file moves to prevent corruption.</p>
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Failure Model</h2>
|
|
||||||
<ul>
|
|
||||||
<li><strong>Degraded:</strong> Fallback used, system remains functional.</li>
|
|
||||||
<li><strong>Error:</strong> No valid IP found, abort mutation.</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
|
|
||||||
</footer>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Documentation | Hardened Hub</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<header>
|
|
||||||
<h1>📚 Documentation Hub</h1>
|
|
||||||
<p>Hardened Private Cloud Architecture & Operations</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Guides & Architecture</h2>
|
|
||||||
<div class="grid">
|
|
||||||
<article class="card">
|
|
||||||
<h4>🏗️ <a href="architecture.html">Server Architecture</a></h4>
|
|
||||||
<p>Deep dive into the layered model, networking, and security posture.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>🛠️ <a href="usability.html">Usability & Operations</a></h4>
|
|
||||||
<p>How to use the hub, add new apps, and manage updates.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>🩺 <a href="troubleshooting.html">Troubleshooting</a></h4>
|
|
||||||
<p>Solutions for common connectivity, SSL, and authentication issues.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>🗺️ <a href="roadmap.html">Project Roadmap</a></h4>
|
|
||||||
<p>Current status and future planned features.</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>📡 <a href="dynu-ip-update-protocol.html">Dynu IP Protocol</a></h4>
|
|
||||||
<p>Technical details on the DDNS synchronization mechanism.</p>
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
|
|
||||||
</footer>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Project Roadmap | Hardened Hub</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<header>
|
|
||||||
<h1>🗺️ Project Roadmap</h1>
|
|
||||||
<p>Current system maturity and future priorities for the core infrastructure.</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h4>Phases</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#phase1">Phase 1: Core</a></li>
|
|
||||||
<li><a href="#phase2">Phase 2: Observability</a></li>
|
|
||||||
<li><a href="#phase3">Phase 3: Automation</a></li>
|
|
||||||
<li><a href="#phase4">Phase 4: Optimization</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id="phase1">
|
|
||||||
<h2>✅ Phase 1: Core Gateway & Infrastructure</h2>
|
|
||||||
<p><span class="badge badge-success">COMPLETE</span> Stable external access, identity management, and core security.</p>
|
|
||||||
<ul class="status-list">
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Dynamic DNS:</strong> IP synchronization migrated to host NixOS configuration (<a href="https://github.com/kiskaadee/nixos-config">nixos-config</a>).</li>
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Edge Routing:</strong> Traefik v3 with Let's Encrypt (DNS-01) automation.</li>
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Layered Architecture:</strong> Separation of control plane and decoupled data plane folders.</li>
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Identity & SSO:</strong> Authelia integration with 2FA/OIDC support.</li>
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Security Hardening:</strong> Docker socket proxy and internal network segmentation.</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="phase2">
|
|
||||||
<h2>🏗️ Phase 2: Observability & Portal Layer</h2>
|
|
||||||
<p><span class="badge badge-warning">IN PROGRESS</span> Expand utility and improve system monitoring.</p>
|
|
||||||
<ul class="status-list">
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Service Discovery:</strong> 'Homepage' dashboard integration.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Unified Health:</strong> Integrate Traefik/Docker health checks into Homepage via socket-proxy.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Resource Monitoring:</strong> Add lightweight system metrics (Glances/Netdata) to the portal.</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="phase3">
|
|
||||||
<h2>🚀 Phase 3: Automation & Resilience</h2>
|
|
||||||
<ul class="status-list">
|
|
||||||
<li class="status-item"><span>[x]</span> <strong>Automated Updates:</strong> Watchtower and Diun for image lifecycle.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Backup Strategy:</strong> Automated, encrypted off-site backups for persistent core volumes.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Infrastructure as Code:</strong> NixOS declarative system module mapping.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Alerting:</strong> Push notifications (Gotify/Ntfy) for core system failures.</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="phase4">
|
|
||||||
<h2>🌐 Phase 4: Network Optimization</h2>
|
|
||||||
<ul class="status-list">
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Local DNS:</strong> Ad-blocking DNS (Pi-hole/AdGuard Home) for LAN.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>Hairpin NAT:</strong> Validation and optimization for internal LAN routing.</li>
|
|
||||||
<li class="status-item"><span>[ ]</span> <strong>VPN Integration:</strong> WireGuard-based secure remote access.</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
|
|
||||||
</footer>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
:root {
|
|
||||||
--primary: #2563eb;
|
|
||||||
--secondary: #475569;
|
|
||||||
--bg: #f8fafc;
|
|
||||||
--text: #1e293b;
|
|
||||||
--border: #e2e8f0;
|
|
||||||
--accent: #f1f5f9;
|
|
||||||
--success: #166534;
|
|
||||||
--success-bg: #dcfce7;
|
|
||||||
--warning: #9a3412;
|
|
||||||
--warning-bg: #ffedd5;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--text);
|
|
||||||
background: var(--bg);
|
|
||||||
margin: 0;
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
background: white;
|
|
||||||
padding: 3rem;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
border-bottom: 2px solid var(--border);
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
padding-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 { font-size: 2.5rem; color: var(--primary); margin: 0; }
|
|
||||||
h2 { font-size: 1.75rem; color: var(--secondary); margin-top: 2.5rem; border-left: 4px solid var(--primary); padding-left: 1rem; }
|
|
||||||
h3 { font-size: 1.25rem; color: var(--text); margin-top: 1.5rem; }
|
|
||||||
|
|
||||||
code {
|
|
||||||
background: var(--accent);
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
background: #1e293b;
|
|
||||||
color: #f8fafc;
|
|
||||||
padding: 1.5rem;
|
|
||||||
border-radius: 6px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
background: transparent;
|
|
||||||
padding: 0;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layer-box {
|
|
||||||
background: var(--accent);
|
|
||||||
padding: 1.5rem;
|
|
||||||
border-radius: 6px;
|
|
||||||
margin: 1rem 0;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
background: var(--accent);
|
|
||||||
padding: 1rem;
|
|
||||||
border-radius: 6px;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav h4 { margin: 0 0 0.5rem 0; font-size: 0.9rem; text-transform: uppercase; color: var(--secondary); }
|
|
||||||
nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; }
|
|
||||||
nav a { color: var(--primary); text-decoration: none; }
|
|
||||||
nav a:hover { text-decoration: underline; }
|
|
||||||
|
|
||||||
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
|
|
||||||
.card { border: 1px solid var(--border); padding: 1rem; border-radius: 4px; background: white; }
|
|
||||||
.card h4 { margin: 0 0 0.5rem 0; color: var(--primary); }
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
padding: 0.2rem 0.6rem;
|
|
||||||
border-radius: 9999px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
font-weight: bold;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge-success { background: var(--success-bg); color: var(--success); }
|
|
||||||
.badge-warning { background: var(--warning-bg); color: var(--warning); }
|
|
||||||
|
|
||||||
.status-list { list-style: none; padding: 0; }
|
|
||||||
.status-item { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
|
|
||||||
|
|
||||||
footer { margin-top: 4rem; font-size: 0.8rem; color: var(--secondary); text-align: center; border-top: 1px solid var(--border); padding-top: 2rem; }
|
|
||||||
footer a { color: var(--primary); text-decoration: none; }
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Troubleshooting | Hardened Hub</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<header>
|
|
||||||
<h1>🩺 Troubleshooting Guide</h1>
|
|
||||||
<p>Common issues and resolutions for the Hardened Hub.</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h4>Issues</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#connectivity">Connectivity</a></li>
|
|
||||||
<li><a href="#ssl">SSL & Certificates</a></li>
|
|
||||||
<li><a href="#auth">Authentication</a></li>
|
|
||||||
<li><a href="#docker">Docker & Perf</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id="connectivity">
|
|
||||||
<h2>🌐 Connectivity Issues</h2>
|
|
||||||
<div class="card">
|
|
||||||
<h4>Site is unreachable</h4>
|
|
||||||
<ul>
|
|
||||||
<li><strong>Check External IP:</strong> Verify your public IP matches Dynu.</li>
|
|
||||||
<li><strong>Check Traefik:</strong> <code>docker compose -f infra/core/docker-compose.yml ps</code></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="card">
|
|
||||||
<h4>Bad Gateway (502/503)</h4>
|
|
||||||
<p>The application is down or not on <code>proxy-net</code>.</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="ssl">
|
|
||||||
<h2>🔒 SSL & Certificate Issues</h2>
|
|
||||||
<p>If you see "Connection not private", Traefik may be failing the ACME challenge.</p>
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<h4>Dynu Quota Deadlock (Record Hoarding)</h4>
|
|
||||||
<p>On the Dynu free tier (4-record limit), failed challenges can leave stale <code>TXT</code> records that block new attempts with a <code>503: Quota Exception</code>.</p>
|
|
||||||
<p><strong>Fix:</strong> Run the automated purge script to clear stale records and restart the challenge:</p>
|
|
||||||
<pre><code>./scripts/purge-dynu.sh</code></pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layer-box">
|
|
||||||
<h4>Manual Inspection</h4>
|
|
||||||
<pre><code># Check Traefik ACME logs
|
|
||||||
docker compose -f infra/core/docker-compose.yml logs -f traefik
|
|
||||||
|
|
||||||
# Run automated SSL diagnostic
|
|
||||||
./scripts/check-ssl.sh</code></pre>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="auth">
|
|
||||||
<h2>🔐 Authentication (Authelia)</h2>
|
|
||||||
<div class="layer-box">
|
|
||||||
<h4>Stuck in Login Loop?</h4>
|
|
||||||
<p>Sync server time: <code>sudo ntpdate pool.ntp.org</code> and clear cookies.</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="docker">
|
|
||||||
<h2>🐳 Docker & Performance</h2>
|
|
||||||
<p>If disk is full, run cleanup:</p>
|
|
||||||
<pre><code>docker system prune -a --volumes</code></pre>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
|
|
||||||
</footer>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Usability & Operations | Hardened Hub</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<header>
|
|
||||||
<h1>🖱️ Usability & Operational Notes</h1>
|
|
||||||
<p>A guide for interacting with the Hardened Hub and exposing external services.</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h4>Topics</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#auth">Authentication</a></li>
|
|
||||||
<li><a href="#nav">Navigation</a></li>
|
|
||||||
<li><a href="#mgmt">Management</a></li>
|
|
||||||
<li><a href="#add">Exposing New Services</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id="auth">
|
|
||||||
<h2>🔑 Authentication (SSO)</h2>
|
|
||||||
<p>Critical core services and protected user applications are shielded by <strong>Authelia</strong>.</p>
|
|
||||||
<ol>
|
|
||||||
<li>Access a protected URL (e.g., <code>https://portainer.arch-services.mywire.org</code>).</li>
|
|
||||||
<li>You will be redirected to the Auth Portal (<code>https://auth.arch-services.mywire.org</code>).</li>
|
|
||||||
<li>Log in with your credentials.</li>
|
|
||||||
<li>Once authenticated, you obtain global session access to all SSO-protected services.</li>
|
|
||||||
</ol>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="nav">
|
|
||||||
<h2>🧭 Navigating the Hub</h2>
|
|
||||||
<p>The <strong>Homepage</strong> dashboard is your central entry point:</p>
|
|
||||||
<ul>
|
|
||||||
<li><strong>Access URL:</strong> <a href="https://arch-services.mywire.org">https://arch-services.mywire.org</a></li>
|
|
||||||
<li><strong>Widgets:</strong> View real-time Docker container statuses, system resources, and service links.</li>
|
|
||||||
</ul>
|
|
||||||
<div class="layer-box">
|
|
||||||
<h4>Local Access (Fast Lane)</h4>
|
|
||||||
<p>To bypass traversing the public internet when you are on the same local network as the server, we use a **Public Domain + Local IP** mapping strategy (see <a href="adr-001-remove-localhost-routers.md">ADR 001</a>).</p>
|
|
||||||
<p>Add the following mapping to your client machine's <code>/etc/hosts</code> file (using your server's local IP, e.g., <code>192.168.1.100</code> or <code>127.0.0.1</code> if testing locally):</p>
|
|
||||||
<pre><code>127.0.0.1 arch-services.mywire.org traefik.arch-services.mywire.org auth.arch-services.mywire.org logs.arch-services.mywire.org portainer.arch-services.mywire.org [your-app-subdomain].arch-services.mywire.org</code></pre>
|
|
||||||
<p><em>Note: This guarantees valid SSL handshakes and working SSO cookies for local LAN sessions.</em></p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="mgmt">
|
|
||||||
<h2>🛠️ Core Infrastructure Management</h2>
|
|
||||||
<p>Deploy the control plane stacks and homepage directly using the host scripts:</p>
|
|
||||||
<pre><code># Start the Control Plane + Homepage Portal
|
|
||||||
./up.sh
|
|
||||||
|
|
||||||
# Stop all Core services
|
|
||||||
./down.sh</code></pre>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="add">
|
|
||||||
<h2>➕ Exposing a New Service (Decoupled Model)</h2>
|
|
||||||
<p>User applications are fully decoupled from the core repository and managed in their own directories (e.g., <code>/home/kiskaadee/deployments/my-app</code>). We use Traefik labels to expose them under the <code>*.arch-services.mywire.org</code> wildcard domain.</p>
|
|
||||||
|
|
||||||
<p>Depending on your security and access needs, you can configure your stack for one of two scenarios:</p>
|
|
||||||
|
|
||||||
<div class="grid">
|
|
||||||
<article class="card">
|
|
||||||
<h4>🔓 Scenario A: Public / Direct Access</h4>
|
|
||||||
<p>Use this for applications that have their own built-in authentication (e.g., Jellyfin, Gitea) or public-facing projects (e.g., public web demos, portfolios).</p>
|
|
||||||
</article>
|
|
||||||
<article class="card">
|
|
||||||
<h4>🔒 Scenario B: SSO-Protected</h4>
|
|
||||||
<p>Use this for administrative tools, private databases, or custom internal apps that do not have native authentication and need to be secured behind Authelia.</p>
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<h3>Scenario A: Public / Direct Access (Bypassing Authelia)</h3>
|
|
||||||
<p>This configuration exposes your service directly to the internet. Authelia is bypassed, allowing anyone (or the app's own login manager) to handle access.</p>
|
|
||||||
|
|
||||||
<pre><code class="language-yaml">services:
|
|
||||||
my-public-app:
|
|
||||||
image: my-app-image:latest
|
|
||||||
container_name: my-public-app
|
|
||||||
networks:
|
|
||||||
- proxy-net
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
|
|
||||||
# 1. Main HTTPS Route Rule
|
|
||||||
- "traefik.http.routers.public-app.rule=Host(`demo.arch-services.mywire.org`)"
|
|
||||||
- "traefik.http.routers.public-app.entrypoints=websecure"
|
|
||||||
- "traefik.http.routers.public-app.tls=true"
|
|
||||||
- "traefik.http.routers.public-app.service=public-app-svc"
|
|
||||||
|
|
||||||
# 2. HTTP to HTTPS Redirection Route
|
|
||||||
- "traefik.http.routers.public-app-red.rule=Host(`demo.arch-services.mywire.org`)"
|
|
||||||
- "traefik.http.routers.public-app-red.entrypoints=web"
|
|
||||||
- "traefik.http.routers.public-app-red.middlewares=https-redirect@docker"
|
|
||||||
|
|
||||||
# 3. Port Mapping (Target port inside the container)
|
|
||||||
- "traefik.http.services.public-app-svc.loadbalancer.server.port=8080"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
proxy-net:
|
|
||||||
external: true</code></pre>
|
|
||||||
|
|
||||||
<h3>Scenario B: SSO-Protected (Secured by Authelia)</h3>
|
|
||||||
<p>This configuration intercepts all incoming requests and redirects unauthenticated users to the Authelia portal first. Once logged in, users are returned to the service.</p>
|
|
||||||
|
|
||||||
<pre><code class="language-yaml">services:
|
|
||||||
my-secure-app:
|
|
||||||
image: my-app-image:latest
|
|
||||||
container_name: my-secure-app
|
|
||||||
networks:
|
|
||||||
- proxy-net
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
|
|
||||||
# 1. Main HTTPS Route Rule
|
|
||||||
- "traefik.http.routers.secure-app.rule=Host(`admin.arch-services.mywire.org`)"
|
|
||||||
- "traefik.http.routers.secure-app.entrypoints=websecure"
|
|
||||||
- "traefik.http.routers.secure-app.tls=true"
|
|
||||||
- "traefik.http.routers.secure-app.service=secure-app-svc"
|
|
||||||
|
|
||||||
# 2. SSO Authentication Middleware (Crucial Line)
|
|
||||||
- "traefik.http.routers.secure-app.middlewares=authelia-auth@docker"
|
|
||||||
|
|
||||||
# 3. HTTP to HTTPS Redirection Route
|
|
||||||
- "traefik.http.routers.secure-app-red.rule=Host(`admin.arch-services.mywire.org`)"
|
|
||||||
- "traefik.http.routers.secure-app-red.entrypoints=web"
|
|
||||||
- "traefik.http.routers.secure-app-red.middlewares=https-redirect@docker"
|
|
||||||
|
|
||||||
# 4. Port Mapping (Target port inside the container)
|
|
||||||
- "traefik.http.services.secure-app-svc.loadbalancer.server.port=3000"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
proxy-net:
|
|
||||||
external: true</code></pre>
|
|
||||||
|
|
||||||
<h3>3. Register in Homepage Dashboard</h3>
|
|
||||||
<p>To list your new service on the central dashboard, update <code>homepage/config/services.yaml</code> inside the core repository:</p>
|
|
||||||
<pre><code class="language-yaml">- User Applications:
|
|
||||||
- My Application:
|
|
||||||
icon: custom-app-icon
|
|
||||||
href: https://my-app.arch-services.mywire.org
|
|
||||||
description: Custom exposed app description
|
|
||||||
server: my-docker
|
|
||||||
container: my-app # Must match container_name exactly</code></pre>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
|
|
||||||
</footer>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -48,6 +48,7 @@ def test_deprecated_legacy_structures_are_absent():
|
|||||||
"scripts/check-ssl.sh",
|
"scripts/check-ssl.sh",
|
||||||
"scripts/purge-dynu.sh",
|
"scripts/purge-dynu.sh",
|
||||||
"scripts/ip-monitor.sh",
|
"scripts/ip-monitor.sh",
|
||||||
|
"docs/legacy",
|
||||||
]
|
]
|
||||||
|
|
||||||
for p in prohibited_paths:
|
for p in prohibited_paths:
|
||||||
|
|||||||
Reference in new issue
Block a user