docs: migrate to semantic HTML documentation v1

- Replaced all Markdown files in docs/ with structured HTML5.
- Implemented a shared docs/style.css for consistent branding.
- Added semantic sections, service cards, and status badges.
- Updated footer with copyright and link to roadtotech.me.
- Updated README to point to new HTML documentation.
This commit is contained in:
kiskaadee committed 2026-05-13 23:54:23 -05:00
1 parent d9013cca0a
commit ecedf018f9
12 files changed
+506 -439

No files matched your search

+6 -5
View File
@@ -99,9 +99,10 @@ This policy is currently enabled on core infrastructure and is recommended for a
For more in-depth information, please refer to the following guides:
- **[Server Architecture](docs/architecture.md)**: Deep dive into the layered model, networking, and security posture.
- **[Usability & Operations](docs/usability.md)**: How to use the hub, add new apps, and manage updates.
- **[Troubleshooting](docs/troubleshooting.md)**: Solutions for common connectivity, SSL, and authentication issues.
- **[Project Roadmap](docs/roadmap.md)**: Current status and future planned features.
- **[Dynu IP Protocol](docs/dynu-ip-update-protocol.md)**: Technical details on the DDNS synchronization mechanism.
- **[Server Architecture](docs/architecture.html)**: Deep dive into the layered model, networking, and security posture.
- **[Usability & Operations](docs/usability.html)**: How to use the hub, add new apps, and manage updates.
- **[Troubleshooting](docs/troubleshooting.html)**: Solutions for common connectivity, SSL, and authentication issues.
- **[Project Roadmap](docs/roadmap.html)**: Current status and future planned features.
- **[Dynu IP Protocol](docs/dynu-ip-update-protocol.html)**: Technical details on the DDNS synchronization mechanism.
+104
View File
@@ -0,0 +1,104 @@
<!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 like <code>gitea.*</code>.</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 provides a unified portal.</li>
<li><strong>SSO Integration:</strong> Critical apps (Gitea, Dozzle) utilize Authelia Forward Auth.</li>
<li><strong>Isolation:</strong> Services have no direct host access and communicate over 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>
-45
View File
@@ -1,45 +0,0 @@
# 🏗️ Server Architecture: Hardened Hub Model
The homeserver follows a **Layered Architecture** designed for security, observability, and modularity. It is split into two logical tiers: the **Control Plane** (Infrastructure) and the **Data Plane** (Applications).
## 1. Physical & Host Layer
- **OS**: Linux (Generic).
- **IP Sync**: A host-level systemd service (`scripts/dynu/`) monitors the public IP and updates Dynu DDNS records. This ensures that the external domain always points to the correct gateway.
- **Docker Engine**: Orchestrates all containerized services.
## 2. Infrastructure Layer (`infra/`)
The "Control Plane" manages the lifecycle and security of the entire stack.
### 🌐 Edge Gateway (`infra/core`)
- **Traefik v3**: Acts as the Reverse Proxy and SSL terminator.
- Handles **DNS-01 Challenges** via Dynu for wildcard SSL certificates.
- Routes traffic based on subdomains (e.g., `gitea.*`).
- **Socket-Proxy**: A secure bridge that protects the Docker socket. Services needing Docker access (Portainer, Watchtower) talk to this proxy instead of the raw socket, preventing container-escape vulnerabilities.
### 🔐 Identity & Access (`infra/authelia`)
- **Authelia**: Provides Single Sign-On (SSO) and Two-Factor Authentication (2FA).
- **Forward Auth**: Traefik delegates authentication to Authelia before allowing traffic to sensitive applications.
### 🛠️ Management & Maintenance
- **Portainer**: Graphical UI for managing Docker stacks and containers.
- **Watchtower**: Automatically pulls new images and restarts containers when updates are available.
- **Diun**: Notifies the administrator of new image tags.
## 3. Application Layer (`apps/`)
The "Data Plane" contains the services used by end-users. These are isolated on the `proxy-net` network and have no direct access to host resources unless explicitly defined.
- **Service Discovery**: 'Homepage' (the dashboard) provides a unified portal.
- **SSO Integration**: Apps like Gitea and Dozzle are integrated with Authelia for secure, authenticated access.
## 4. Networking Model
- **`proxy-net`**: Shared internal network for Traefik and all exposed applications.
- **`socket-net`**: Isolated network for communication between the Socket-Proxy and management tools.
- **External Exposure**: Only ports 80 and 443 are exposed to the internet. All other management (SSH, API) is restricted or handled via the reverse proxy.
---
## 🛡️ Security Posture
1. **No Root Docker**: Most containers are encouraged to run with specific PUID/PGID.
2. **Wildcard Certificates**: Wildcard SSL prevents domain enumeration by malicious scanners.
3. **Internal-Only Services**: Some tools (like Portainer) are reachable only via the local network or authenticated proxy.
4. **Log Rotation**: Global policy ensures container logs don't consume all disk space.
+58
View File
@@ -0,0 +1,58 @@
<!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>
<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>
-213
View File
@@ -1,213 +0,0 @@
# Dynu IP Monitor & Updater (Design / Architecture)
## Problem Definition
Maintain accurate DNS A records in Dynu despite:
* dynamic public IPs
* unreliable external IP providers
* transient network failures
### Success Criteria
* Correct IP is eventually reflected in Dynu
* No invalid or private IPs are ever persisted
* No redundant updates (avoid Dynu abuse flags)
* Safe under concurrent or repeated execution
### Non-Goals
* IPv6 support
* complex DNS record management
* real-time updates (polling only)
---
## Core Design Decisions
### 1. Probe Model (Not a Daemon)
The system runs periodically instead of continuously.
**Why:**
* simpler lifecycle (systemd handles scheduling)
* naturally idempotent
* avoids long-lived state bugs
---
### 2. Dual-Source Discovery
* Primary: DNS (`dig`)
* Fallback: HTTP providers
**Why:**
* DNS is faster and lightweight
* HTTP provides redundancy when DNS fails
---
### 3. Explicit Degradation Model
Failures are classified:
* `degraded` → fallback used, system still functional
* `error` → no valid IP, abort
**Why:**
* improves observability
* avoids silent failure modes
---
### 4. Strict Validation Pipeline
Every candidate IP must pass:
1. format validation (regex + bounds)
2. public IP validation (no RFC1918 / CGNAT)
Validation is applied:
* per-provider
* after discovery (final gate)
**Why:**
* prevents poisoning state with invalid data
* enforces invariant: *state must always be valid*
---
### 5. State as a Consistency Contract
`last_ip` represents:
> “The last IP successfully synchronized with Dynu”
It is updated **only after**:
* HTTP 200
* valid Dynu semantic response (`good` / `nochg`)
**Why:**
* avoids divergence between local state and remote DNS
---
### 6. Atomic Writes
State updates use:
```
write → temp file → mv
```
**Why:**
* guarantees consistency even on crash/interruption
* `mv` is atomic on same filesystem
---
### 7. Concurrency Strategy
Non-blocking lock via `flock`.
If locked:
```
skip execution
```
**Why:**
* prevents overlapping runs
* avoids queue buildup from timers
* ensures last execution “wins”
---
### 8. Deferred Credential Processing
Password hashing happens only when update is needed.
**Why:**
* avoids unnecessary computation
* keeps fast-path (no-change) minimal
---
### 9. Transport vs Semantic Validation
Two layers:
1. Transport → HTTP status must be `200`
2. Semantic → response must start with `good` or `nochg`
**Why:**
* separates network failures from API logic failures
* improves debugging clarity
---
### 10. Structured Logging
All logs follow:
```
event=... reason=... cause=...
```
**Why:**
* machine-filterable via journald
* consistent debugging surface
---
## Trade-offs
### Bash vs Higher-Level Language
**Chosen:** Bash
**Pros:**
* zero runtime dependency
* native systemd integration
* simple deployment
**Cons:**
* limited abstractions
* harder error composition
* more manual validation
Given the scope (I/O-bound, small state machine), Bash remains appropriate.
---
## Failure Modes Considered
* DNS unavailable → fallback to HTTP
* HTTP provider failure → rotate providers
* invalid IP returned → rejected
* API failure → no state mutation
* concurrent execution → skipped
* partial execution → no persistent side effects
---
## Key Invariants
* No invalid IP is ever persisted
* State reflects only successful external sync
* Script is safe to run repeatedly
* System is eventually consistent, not instantly consistent
+77
View File
@@ -0,0 +1,77 @@
<!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.</p>
</header>
<nav>
<h4>Phases</h4>
<ul>
<li><a href="#phase1">Phase 1: Core</a></li>
<li><a href="#phase2">Phase 2: Apps</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> Reliable IP synchronization via systemd-based Dynu updater.</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> Clear separation between <code>infra/</code> and <code>apps/</code>.</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: Application Ecosystem & Observability</h2>
<p><span class="badge badge-warning">IN PROGRESS</span> Expand utility and improve 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>[x]</span> <strong>Visual Tools:</strong> Excalidraw and Mermaid deployment.</li>
<li class="status-item"><span>[x]</span> <strong>Development:</strong> Self-hosted Gitea with SSO.</li>
<li class="status-item"><span>[x]</span> <strong>AI/ML:</strong> Scalable Ollama cluster with model management.</li>
<li class="status-item"><span>[ ]</span> <strong>Unified Health:</strong> Integrate Traefik/Docker health checks into Homepage.</li>
<li class="status-item"><span>[ ]</span> <strong>Resource Monitoring:</strong> Add lightweight metrics (Glances/Netdata).</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 volumes.</li>
<li class="status-item"><span>[ ]</span> <strong>Infrastructure as Code:</strong> Further modularization of deployment scripts.</li>
<li class="status-item"><span>[ ]</span> <strong>Alerting:</strong> Push notifications (Gotify/Ntfy) for 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 traffic.</li>
<li class="status-item"><span>[ ]</span> <strong>VPN Integration:</strong> WireGuard-based remote access.</li>
</ul>
</section>
<footer>
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
</footer>
</main>
</body>
</html>
-55
View File
@@ -1,55 +0,0 @@
# 🗺️ Project Roadmap: Hardened Private Cloud Hub
This roadmap reflects the current system maturity and future priorities.
---
## ✅ Phase 1: Core Gateway & Infrastructure (Complete)
*Objective: Stable external access, identity management, and core security.*
- [x] **Dynamic DNS:** Reliable IP synchronization via systemd-based Dynu updater.
- [x] **Edge Routing:** Traefik v3 with Let's Encrypt (DNS-01) automation.
- [x] **Layered Architecture:** Clear separation between `infra/` (control plane) and `apps/` (data plane).
- [x] **Identity & SSO:** Authelia integration with 2FA/OIDC support.
- [x] **Security Hardening:** Docker socket proxy, internal network segmentation, and non-root users where possible.
- [x] **Centralized Logging:** Real-time log streaming via Dozzle.
---
## 🏗️ Phase 2: Application Ecosystem & Observability (In Progress)
*Objective: Expand utility and improve "Single Pane of Glass" monitoring.*
- [x] **Service Discovery:** 'Homepage' dashboard integration.
- [x] **Visual Tools:** Excalidraw and Mermaid deployment.
- [x] **Development:** Self-hosted Gitea with SSO.
- [x] **AI/ML:** Scalable Ollama cluster with model management.
- [ ] **Unified Health:** Integrate Traefik/Docker health checks into the Homepage dashboard.
- [ ] **Resource Monitoring:** Add lightweight metrics (e.g., Glances or Netdata) with dashboard widgets.
---
## 🚀 Phase 3: Automation & Resilience
*Objective: Move from "manual maintenance" to "autonomous operations".*
- [x] **Automated Updates:** Watchtower and Diun for image lifecycle management.
- [ ] **Backup Strategy:** Automated, encrypted off-site backups for persistent volumes (Gitea, DBs).
- [ ] **Infrastructure as Code:** Further modularization of the `up.sh` script into a more robust CLI or Ansible-based setup.
- [ ] **Alerting:** Push notifications (via Gotify/Ntfy) for system failures, auth breaches, or IP update issues.
---
## 🌐 Phase 4: Network Optimization
*Objective: Reduce latency and external dependencies.*
- [ ] **Local DNS:** Ad-blocking DNS (Pi-hole/AdGuard Home) for LAN clients.
- [ ] **Hairpin NAT:** Validation and optimization for internal traffic routing.
- [ ] **VPN Integration:** WireGuard-based remote access for private management without public exposure.
---
## 📜 Engineering Principles
1. **Idempotency:** All deployment scripts (`up.sh`, `down.sh`) must be safe to run repeatedly.
2. **Layered Security:** No single point of failure. If the gateway is breached, apps are still behind SSO.
3. **Auditability:** Every change is reflected in documentation and Git history.
4. **Resilience:** Infrastructure must survive reboots and network outages automatically.
+103
View File
@@ -0,0 +1,103 @@
: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; }
+69
View File
@@ -0,0 +1,69 @@
<!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":</p>
<pre><code># Check Traefik ACME logs
docker compose -f infra/core/docker-compose.yml logs -f traefik</code></pre>
</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>
-54
View File
@@ -1,54 +0,0 @@
# 🩺 Troubleshooting Guide
Common issues and their resolutions for the Hardened Hub.
## 🌐 Connectivity Issues
### 1. Site is unreachable (General)
- **Check External IP**: Verify if your public IP matches the DNS record at Dynu.
- Run `scripts/dynu/run-once.sh` to force an update.
- **Check Traefik Status**:
- `docker compose -f infra/core/docker-compose.yml ps`
- Ensure Traefik is running and port 80/443 are mapped.
### 2. "Bad Gateway" (502) or "Service Unavailable" (503)
- This usually means the application container is down or not connected to the `proxy-net`.
- **Action**: Verify the app container is running:
```bash
docker ps | grep <app_name>
```
- **Action**: Check container logs via Dozzle or `docker logs`.
## 🔒 SSL & Certificate Issues
### 1. "Your connection is not private"
- Traefik might be struggling with the Let's Encrypt challenge.
- **Action**: Check Traefik logs for "ACME" or "LE" errors:
```bash
docker compose -f infra/core/docker-compose.yml logs -f traefik
```
- **Common Cause**: Dynu API key is incorrect or API rate limits were hit.
### 2. Certificate is not valid for the subdomain
- Ensure the Traefik `Host` rule in your `docker-compose.yml` labels is correct.
## 🔐 Authentication (Authelia) Issues
### 1. Stuck in a Login Loop
- This often happens if the browser clock or server clock is out of sync.
- **Action**: Sync the server time (`sudo ntpdate pool.ntp.org`).
- **Action**: Clear browser cookies for your domain.
### 2. Forbidden (403) after login
- Your user may not have the required permissions in `infra/authelia/config/configuration.yml`.
- **Action**: Check the `access_control` section in the Authelia config.
## 🐳 Docker & Performance
### 1. Disk is full
- **Cause**: Usually excessive logs or orphaned volumes.
- **Action**: Run the cleanup command:
```bash
docker system prune -a --volumes
```
- **Action**: Check `apps/homepage/config/logs/` and other app-specific log paths.
### 2. High CPU/RAM Usage
- Check the Homepage dashboard or run `docker stats` to identify the culprit.
- **Common Culprit**: Ollama during model inference or Gitea indexing large repos.
+89
View File
@@ -0,0 +1,89 @@
<!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 once deployed.</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">Adding Apps</a></li>
<li><a href="#ollama">Ollama API</a></li>
</ul>
</nav>
<section id="auth">
<h2>🔑 Authentication (SSO)</h2>
<p>Most services are protected by <strong>Authelia</strong>.</p>
<ol>
<li>Access a protected service (e.g., <code>gitea.*</code>).</li>
<li>You will be redirected to the Auth Portal (<code>auth.*</code>).</li>
<li>Log in with your credentials.</li>
<li>Once authenticated, you have global access to all SSO-enabled 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>URL:</strong> <a href="https://arch-services.mywire.org">https://arch-services.mywire.org</a></li>
<li><strong>Widgets:</strong> View container health, system resources, and service links.</li>
</ul>
</section>
<section id="mgmt">
<h2>🛠️ Service Management</h2>
<h3>Deployment Scripts</h3>
<pre><code># Start everything
./up.sh
# Start ONLY the Control Plane
./up.sh --infra-only
# Stop all services
./down.sh</code></pre>
</section>
<section id="add">
<h2>➕ Adding a New Application</h2>
<ol>
<li>Create <code>apps/your-app/docker-compose.yml</code>.</li>
<li>Connect to <code>proxy-net</code>.</li>
<li>Add Traefik labels for routing and Authelia protection.</li>
<li>Update <code>apps/homepage/config/services.yaml</code>.</li>
</ol>
</section>
<section id="ollama">
<h2>🤖 Ollama API & Automation</h2>
<p>Uses a hybrid security model for browser and CLI access.</p>
<div class="layer-box">
<h4>API Key / Trusted Payload</h4>
<p><strong>Header:</strong> <code>X-Ollama-Key: sk-ollama-hardened-hub-2026</code></p>
<pre><code>curl https://ollama.arch-services.mywire.org/api/generate \
-H "X-Ollama-Key: sk-ollama-hardened-hub-2026" \
-d '{"model": "llama3", "prompt": "hi"}'</code></pre>
</div>
</section>
<footer>
<p>(c) 2026 | <a href="https://roadtotech.me">Kiskaadee</a></p>
</footer>
</main>
</body>
</html>
-67
View File
@@ -1,67 +0,0 @@
# 🖱️ Usability & Operational Notes
This guide explains how to interact with the Hardened Hub once it is deployed.
## 🔑 Authentication (SSO)
Most services are protected by **Authelia**.
1. When you access a protected service (e.g., `gitea.*`), you will be redirected to the Auth Portal (`auth.*`).
2. Log in with your credentials.
3. Once authenticated, you will have access to all SSO-enabled services for the duration of your session.
## 🧭 Navigating the Hub
The **Homepage** dashboard is your central entry point:
- **URL**: `https://arch-services.mywire.org`
- **Widgets**: View the health of Docker containers, system resources, and quick links to all deployed applications.
## 🛠️ Service Management
### Deployment Commands
Use the provided scripts for lifecycle management:
- `./up.sh`: Starts everything.
- `./up.sh --infra-only`: Starts only the control plane (routing, auth, monitoring).
- `./down.sh`: Stops and removes all containers gracefully.
### Managing a Specific Service
To restart or view logs for a single service (e.g., Gitea):
```bash
cd apps/gitea
docker compose restart
docker compose logs -f
```
## ➕ Adding a New Application
To add a new service to the Hub:
1. Create a directory in `apps/your-app`.
2. Add a `docker-compose.yml`.
3. Ensure it connects to the `proxy-net` network:
```yaml
networks:
proxy-net:
external: true
```
4. Add Traefik labels for routing and (optional) Authelia labels for SSO.
5. Add the service to `apps/homepage/config/services.yaml` to see it on the dashboard.
## 📦 Container Updates
- **Automated**: Watchtower checks for updates every few hours.
- **Manual**: Use Portainer (`portainer.*`) to manually pull new images and recreate containers with a single click.
## 📝 Logging
Real-time logs can be viewed via **Dozzle** at `https://logs.arch-services.mywire.org`. This is preferred over `docker logs` for quick debugging across multiple containers.
## 🤖 Ollama API & Automation (Trusted Payload)
Ollama uses a hybrid security model to allow both browser use and automated tools:
### Browser Use
Accessing `https://ollama.arch-services.mywire.org` directly will prompt for **Authelia SSO** login.
### API & CLI Bypass
For scripts, cron jobs, or terminal use, you can bypass SSO by including the `X-Ollama-Key` header.
- **Header**: `X-Ollama-Key: sk-ollama-hardened-hub-2026`
**Example (curl):**
```bash
curl https://ollama.arch-services.mywire.org/api/generate \
-H "X-Ollama-Key: sk-ollama-hardened-hub-2026" \
-d '{"model": "llama3", "prompt": "hi"}'
```