Designing a Two-Tier Sovereign Cloud, Mail & Zero-JS Publishing Platform

How we built the Leander.Media sovereign platform: split-horizon WireGuard edge relays, GitLab CE 19.5, Stalwart Mail with DMARC-to-Grafana telemetry, Zitadel OIDC SSO, Stoat Chat, and an Obsidian-to-Zola pipeline shipping 0 KB of client-side JavaScript.

Modern self-hosted infrastructure often falls into one of two traps: either exposing heavy management planes directly to the public internet, or locking everything behind a VPN so tightly that collaborating and sharing public work becomes a chore.

In Project Smörgåsbord, we solved this by splitting our infrastructure into a Zero-Trust Public Edge Tier and an Encrypted Compute & Storage Core, paired with a zero-JavaScript static publishing pipeline driven directly from Obsidian.

LEANDER.MEDIA // SOVEREIGN CLOUD & ZERO-JS PUBLISHING ARCHITECTURE VECTOR SVG // 0 KB JS 1. AUTHORING & LOCAL WORKFLOW • Obsidian Mobile & Desktop Vaults • Encrypted Peer-to-Peer Syncthing • Camera Photos, Video & Audio Clips • Versioned via Obsidian Git to GitLab CE • Zero Browser CMS Attack Surface 2. SOVEREIGN COMPUTE & STORAGE CORE • Obsidian-to-Zola Media Preprocessor • Automated EXIF & GPS Metadata Scrubber • GitLab CE 19.5 (PostgreSQL 17) + CI/CD • Stalwart Mail + DMARC Telemetry Exporter • Stoat Chat Backend + Zitadel OIDC Bridge 3. ZERO-TRUST EDGE & RELAY TIER • Zola SSG (<50ms Build, 0 KB Client JS) • Strict CSP: script-src 'none' on Static • Dedicated Cloudflare Zero Trust Tunnels • Nordic WireGuard WebRTC & SMTP Relay • Outbound TLS Mail Deliverability Relay PUBLIC SOVEREIGN SERVICES (leander.media) • blog.leander.media & www.leander.media — Zero-JS Portfolio & Blog • chat.leander.media — Stoat Real-Time Messaging, Voice & Video • gitlab.leander.media — Self-Hosted GitLab CE 19.5 Code Forge • mail.leander.media & info.leander.media — Mail & Bilingual Legal Hub IDENTITY, OBSERVABILITY & R&D PIPELINES • auth.leander.media — Zitadel OIDC PKCE Single Sign-On & Passkeys • VictoriaMetrics + Loki + Grafana DMARC Security Dashboards • Autonomous KiCad ERC/DRC & 3D CAD Hardware Workbench • RekordRescue & Real-Time REAPER JSFX Audio DSP Tooling
Leander.Media Sovereign Cloud & Zero-JS Publishing Architecture (Vector SVG)

1. Two-Tier Split-Horizon Architecture

Rather than treating every workload the same, we enforce a strict boundary between public edge ingress and local stateful storage:

  1. Zero-Trust Public Edge (Cloudflare Tunnels + Dual Nordic WireGuard Relays):

    • HTTP/HTTPS services—including this blog (blog.leander.media / leander.media), our real-time communication suite (Stoat Chat (chat.leander.media)), our bilingual compliance portal (info.leander.media), webmail (mail.leander.media), and GitLab HTTPS/Registry (gitlab.leander.media / registry.leander.media)—are routed through isolated container networks and dedicated Cloudflare Zero Trust HTTP/2 Tunnels.
    • Latency-sensitive UDP WebRTC voice/video media, Matrix federation (matrix.leander.media / turn.leander.media), Git SSH (ssh.gitlab.leander.media), multiplayer game traffic (mc, swamp, ftb, vh.leander.media), and inbound/outbound mail protocols traverse dedicated Nordic cloud relays in Helsinki (hel1.leander.media) and Stockholm (mx.leander.media) over kernel WireGuard, keeping origin hardware completely unexposed to public port scanners.
    • Static properties are compiled ahead-of-time into pure HTML5 and CSS with fluid responsive typography (clamp(96%, 46% + 0.45vw, 126%)) and 0 KB of third-party JavaScript.
  2. Sovereign Compute & Storage Core:


2. Core Platform Pillars (leander.media)

A. Self-Hosted GitLab CE 19.5 (gitlab.leander.media)

Our self-hosted code forge runs GitLab Community Edition 19.5 backed by PostgreSQL 17. It hosts:

B. Sovereign Mail (mail.leander.media) & Real-Time DMARC Telemetry

Running a reliable self-hosted mail stack requires careful attention to IP reputation and cryptographic authentication:

  • Stalwart Mail Server + SnappyMail: Handles IMAP4/SMTP with dual 2048-bit RSA and Ed25519 DKIM signing, strict SPF, and DMARC policy enforcement, paired with a clean webmail interface at mail.leander.media where role addresses (admin@, contact@, abuse@, dmarc@) automatically sync into dedicated folders and Send-As identities.
  • Authenticated Outbound TLS Relay: Outbound external delivery routes through an authenticated European SMTP TLS relay so residential or cloud subnet blocks never impact deliverability.
  • Automated DMARC-to-Grafana Pipeline: A custom Python telemetry daemon parses incoming XML/ZIP aggregate DMARC reports (rua) in real time and exports Prometheus metrics (dmarc_messages_total, dmarc_dkim_pass_total, dmarc_spf_pass_total) into VictoriaMetrics and Grafana.
  • Zitadel OIDC Single Sign-On: Provides passwordless WebAuthn/Passkey and OAuth 2.0 PKCE authentication across internal and public services.
  • Bilingual (FI / EN) Compliance Portal: info.leander.media serves our GDPR Privacy Policy, Terms of Service, EULA, Open-Source Licensing attributions, and EU Digital Services Act (DSA) contact points with automatic Finnish/English browser language detection.

3. Automatic EXIF Scrubbing & Media Optimization

When blogging from a phone in the workshop—taking photos of a custom PCB or a 16kW mountainboard battery spine—raw camera JPEGs contain sensitive EXIF metadata including GPS coordinates and device serial numbers.

Our watcher daemon intercepts every ![[photo.jpg|Caption]] embed and runs exiftool -all= plus responsive WebP generation before Zola builds the static site:

def scrub_and_optimize_image(src_path: Path, dst_clean: Path, dst_webp: Path) -> None:
    """Strip all EXIF metadata (GPS, serials) and generate a responsive 1600px WebP."""
    with Image.open(src_path) as img:
        img_rgb = ImageOps.exif_transpose(img)
        # Creating a fresh Image copy without passing info/exif strips all EXIF tags
        clean = Image.new(img_rgb.mode, img_rgb.size)
        clean.putdata(list(img_rgb.getdata()))
        clean.save(dst_clean, optimize=True)

        # Generate fast-loading WebP (max 1600px width)
        clean.thumbnail((1600, 1600), Image.Resampling.LANCZOS)
        clean.save(dst_webp, format="WEBP", quality=85, method=6)
Live EXIF Scrubbing Verification — Source JPEG contained GPS coordinates; published JPEG & WebP contain 0 EXIF tags
Live EXIF Scrubbing Verification — Source JPEG contained GPS coordinates; published JPEG & WebP contain 0 EXIF tags

4. What’s Next

Check out our companion guide—Stoat Chat on Leander.Media: Sovereign Real-Time Messaging, Voice & How to Get Started—to hop onto our chat and voice platform, or subscribe via the RSS feed / Atom feed for upcoming deep dives into our autonomous KiCad EDA verification pipeline and real-time audio DSP tooling.