Posts for: #Homelab

CODEX-001: Decommissioning Socket-Mounted Web UIs & Enforcing Terminal-Native Ops

Classification: Ingress Hardening & Attack Surface Reduction
Status: Implemented & Verified


Executive Summary

This report documents the architectural lifecycle of container management on Bastion: from initially deploying a web-based GUI (Portainer) to overcome early CLI friction, to identifying the inherent security risks of host-socket mounting, and finally decommissioning the interface in favor of key-authenticated, terminal-native tooling (lazydocker).


Phase 1: Initial Deployment & Context

Why Portainer Was Introduced

When initially transitioning to Docker and container orchestration, early CLI management presented significant friction. Debugging multi-container networks, diagnosing container start failures, and managing persistent volume paths purely through raw shell commands often led to silent errors and operational overhead.

[]

CODEX-002: Hardening the Domain Mail Perimeter (SPF, DKIM, DMARC)

Classification: Perimeter Defense & Mail Authentication
Status: Implemented & Verified


Executive Summary

This report covers auditing, remediating, and enforcing cryptographic and domain-level email authentication records (SPF, DKIM, and DMARC) across a multi-service custom domain. The objective was resolving silent delivery failures for automated application notifications, aligning third-party transactional mail providers, and enforcing a strict quarantine policy to protect domain reputation against spoofing and phishing attempts.


Threat Model & Problem Statement

When operating self-hosted services alongside third-party transactional email relays and professional mail routing, misaligned authentication headers lead to two major failure modes:

[]

CODEX-003: Container Lifecycle, Layer Drift & Database Migrations

Classification: Operational Lifecycle & Database Resilience
Status: Implemented & Verified


Executive Summary

This report documents the failure modes, triage, and safe maintenance patterns discovered while updating multi-container microservice stacks with tightly coupled database dependencies. It analyzes race conditions during parallel image layer pulls, container recreations vs. image caching, and ensuring zero data loss during automated backend schema migrations.


The Problem Statement & Failure Modes

Updating production-grade container stacks (such as Firefly III, its importer, cron sidecar, and MariaDB/MySQL backend) presents subtle operational risks if treated like simple stateless containers:

[]

CODEX-004: Validated Backups & Disaster Recovery Drills

Classification: Business Continuity & Disaster Recovery (BC/DR)
Status: Implemented & Verified


Executive Summary

This report details the implementation, cryptographic architecture, and verification lifecycle of Bastion’s automated disaster recovery pipeline. Moving beyond passive snapshots, the architecture enforces client-side AES-256 encryption, offsite repository replication, and regular cold-restore validation drills to guarantee deterministic recovery in the event of catastrophic storage or hardware loss.


Threat Model & Failure Scenarios

A backup strategy that has not been restored is merely a hypothesis. The backup architecture was designed to mitigate four specific failure modes:

[]