1. Overview & Design Philosophy
After consolidating and hardening the main web server in Portfolio 2.0, the natural next step was to connect every piece of my personal data, artificial intelligence, and finance lab under a unified, production-grade architecture—without having to run a dedicated, noisy 24/7 server rack at home.
The Oscarlytics ecosystem is a distributed hybrid infrastructure combining four physical and cloud environments under a single virtual private mesh network (P2P WireGuard Mesh VPN with NetBird).
Its design follows five core engineering principles:
- Critical Production Isolation: The public server hosting
oscarlytics.comis completely autonomous and does not rely on free cloud tiers or external reverse tunnels to serve public web traffic. - Zero-Trust & Minimal Attack Surface: No administration panel, database, financial manager, orchestrator, or observability tool is exposed to the public Internet. The entire control plane listens exclusively on private interfaces within the VPN mesh.
- Dual Container Strategy (Rootless Podman vs. Docker Engine):
- Rootless Podman + Systemd Quadlets: Deployed on Internet-facing environments (
VPS Prod) and system telemetry pods (pod-monitor), ensuring unprivileged execution withoutroot, read-only filesystems, and dropped kernel capabilities (DropCapabilities=ALL). - Docker Engine + NVIDIA Container Toolkit: Deployed on the internal control plane (
OCI-Ampere) and the GPU workstation (Local PC), where hardware CUDA acceleration (RTX 4090), complex bridge networks (red-global), and multi-container orchestration are paramount. - Cost Efficiency & Data Sovereignty: Strategic use of Oracle Cloud's Always Free tier (backed by Pay-As-You-Go) on ARM64 (24 GB RAM) paired with heavy on-premise compute (Intel Core i9 + RTX 4090) to run LLMs, RAG pipelines, and financial analytics without paying SaaS subscriptions or handing private data over to third parties.
- Full Mobile Control: Every internal service (metrics, finances, local AI, digital library, containers) is seamlessly accessible from an Android smartphone (Google Pixel 9 Pro) connected as a peer node on the mesh.
2. Global Infrastructure Topology
mermaid
flowchart TB
subgraph Internet ["🌍 Public Internet"]
Users["<b>Web Users (HTTPS :443)</b><br/>Public DNS (Namecheap) + DNS-01 Challenge (DuckDNS)"]
end
subgraph Mesh ["🕸️ Virtual Private Mesh Network — NetBird (WireGuard P2P / IP 100.x.x.x)"]
subgraph Row1 ["Always-On 24/7 Plane (Cloud and VPS)"]
direction LR
VPS["<b>🛡️ Node 1: Production VPS (2 vCPU / 4GB RAM)</b><br/>• Pod portfolio (Rootless Podman + Quadlets):<br/>Nginx TLS 1.3 + Flask + PostgreSQL + Meilisearch + ACME.sh<br/>• Pod monitor (Rootless Podman):<br/>Node Exporter + Podman Exporter + Promtail"]
OCI["<b>☁️ Node 2: OCI Ampere ARM64 (4 OCPU / 24GB RAM)</b><br/>• Nginx Proxy Manager (Wildcard SSL *.oscarlytics.com)<br/>• NetBird Control Plane (Management, Signal, Relay, STUN)<br/>• Observability: Prometheus + Grafana + Loki + Kuma + Netdata<br/>• Finance and DWH: Actual + Finanze + Python ETL + Postgres 16"]
end
subgraph Row2 ["On-Demand Plane (Local GPU Compute and Mobile Control)"]
direction LR
PC["<b>🖥️ Node 3: Workstation / Homelab (i9-14900K / 64GB / RTX 4090 24GB)</b><br/>• Local AI and RAG: Ollama + Open WebUI + AnythingLLM + Qdrant + n8n + Docling<br/>• Data and Media: Central Postgres + PgHero + Immich (AI Photos)<br/>• Dual Management: Homarr + Beszel (Docker/GPU/Podman) + Portainer<br/>• Pre-Prod Mirror: Exact replica of portfolio and monitor Pods"]
Mobile["<b>📱 Node 4: Mobile Command Center</b><br/>• Google Pixel 9 Pro (Android)<br/>• NetBird P2P VPN Client<br/>• Direct HTTPS access to *.oscarlytics.com<br/>and AI / Homelab with zero exposed ports"]
end
end
Users ==>|"Public HTTPS Traffic"| VPS
VPS -.->|"Metrics and Logs via P2P VPN"| OCI
PC -.->|"Read-Only SQL Tool + Remote Write"| OCI
Mobile -.->|"Secure P2P HTTPS Management"| OCI
Mobile -.->|"P2P Local AI / Homelab Access"| PC
Action
1. Global Networking, Split-Horizon DNS & SSL Cryptography
1.1. Self-Hosted NetBird WireGuard Mesh
Instead of relying on a traditional hub-and-spoke VPN concentrator (where all traffic flows through a central bottleneck), the infrastructure runs a self-hosted NetBird stack on OCI-Ampere:
- Containerized Control Plane: Composed of
netbird-management,netbird-signal,netbird-dashboard, andnetbird-relay(with STUN/TURN on3478/udpand WebSocket relay over443/tcp). - Federated Identity: Integrated with an OAuth2 / OIDC (Auth0) identity provider for user authentication and per-node Setup Keys.
- Direct P2P Connections (ICE / STUN): Peers negotiate direct point-to-point UDP tunnels (
:51820) with minimal latency (~18–22 ms between Spain, OCI, and the local workstation), falling back to the Relay only behind restrictive firewalls. - Coexistence with Commercial Outbound VPN (NordVPN): Both the local workstation and mobile device can route outbound Internet browsing through NordVPN without losing connectivity to internal NetBird mesh peers or local container subnets (via
net.ipv4.conf.all.route_localnet=1and custom routing rules).
1.2. "Split-Horizon" DNS Strategy on a Public Domain (oscarlytics.com)
Registered on Namecheap, the domain uses a split-horizon DNS pattern to combine public availability with strict private isolation:
| DNS Record | Type | Target | Purpose |
|---|---|---|---|
@, www |
A |
<PUBLIC_IP_VPS_PROD> |
Direct public traffic to the production website without intermediaries. |
netbird |
A |
<PUBLIC_IP_OCI_AMPERE> |
Single public entry point on OCI for VPN gRPC/WebSocket signaling. |
grafana, kuma, prometheus, netdata, npm |
A |
<PRIVATE_NETBIRD_IP_OCI> |
Observability subdomains; resolve to a private 100.x.x.x IP (unreachable outside NetBird). |
cuentas, bancos, inversiones |
A |
<PRIVATE_NETBIRD_IP_OCI> |
Financial ecosystem subdomains; functionally exist only inside the VPN mesh. |
_acme-challenge |
CNAME |
<SUBDOMAIN>.duckdns.org |
Delegates the DNS-01 challenge for Wildcard SSL issuance without exposing the registrar API. |
1.3. Wildcard SSL Certificates (*.oscarlytics.com) with Zero Exposed Ports
- Through the
_acme-challengeCNAMEdelegation to DuckDNS, both theacme.shsidecar container onVPS Prodand Nginx Proxy Manager onOCI-Ampereissue and renew Let's Encrypt certificates (including wildcard*.oscarlytics.com) via DNS-01 validation. - This provides every internal service (
https://grafana.oscarlytics.com,https://cuentas.oscarlytics.com,https://inversiones.oscarlytics.com, etc.) with valid end-to-end HTTPS inside the VPN without ever opening ports 80 or 443 to the public Internet.
mermaid
sequenceDiagram
autonumber
participant User as 📱 VPN Node (Pixel 9 / PC)
participant DNS as 🌐 Public DNS (Namecheap / DuckDNS)
participant LE as 🔐 Let's Encrypt (ACME DNS-01)
participant NPM as ☁️ Nginx Proxy Manager (OCI wt0:443)
participant App as 🗄️ Internal Service (Grafana / Finance)
Note over LE,NPM: Automatic SSL renewal without opening ports 80/443 externally
NPM->>DNS: Publishes TXT on DuckDNS via CNAME (_acme-challenge)
LE->>DNS: Verifies TXT record (DNS-01 Challenge)
LE-->>NPM: Issues Wildcard Certificate (*.oscarlytics.com)
Note over User,App: Zero-Trust access in production
User->>DNS: Queries A grafana.oscarlytics.com
DNS-->>User: Returns Private NetBird IP (100.x.x.x)
User->>NPM: WireGuard P2P Tunnel (Valid TLS 1.3 HTTPS)
NPM->>App: Reverse proxy over internal network (100.x.x.x:PORT)
2. Detailed Node Breakdown
2.1. Node 1: VPS Prod — Hardened Web Production
- Provider & Specs: VPS in Spain (Ginernet), 2 vCPU cores, 4 GB RAM, 50 GB NVMe, Ubuntu 24.04 LTS.
- Runtime Architecture: Rootless Podman natively orchestrated by
systemdvia Quadlets (~/.config/containers/systemd/). Zero daemons running asroot. - Deployed Pods:
- Pod
portfolio(Oscarlytics 2.0):portfolio-nginx: Reverse proxy with hardened TLS 1.2/1.3 (A rating on Qualys SSL Labs) and automatic certificate reload viasystemd timer(portfolio-nginx-reload.timer).portfolio-app: Python 3.12 / Flask / Gunicorn application that synchronizes Markdown (.md) articles with YAML Frontmatter.postgres: Relational database (postgres:alpine) isolated within the pod's local namespace.meilisearch: Rust-based indexed search engine (getmeili/meilisearch), replacing legacy Elasticsearch and cutting total server RAM footprint from ~1.8 GB down to under 190 MB.acme-sh: Sidecar container for automated DNS-01 certificate renewal.
- Pod
monitor(pod-monitor):- Bundles
node-exporter,podman-exporter, andpromtailbuilt on minimal hardened Alpine images (USER 1000,readOnlyRootFilesystem: true,drop: [ALL]). - Exposes metrics and pushes
systemdjournal and container logs directly toOCI-Ampereover the private NetBird IP.
- Bundles
2.2. Node 2: OCI-Ampere — Network Brain, Observability & Finance
- Provider & Specs: Oracle Cloud Infrastructure (OCI),
VM.Standard.A1.Flexinstance (ARM64 Ampere Altra architecture, 4 OCPU, 24 GB RAM, 100 GB block storage, PAYG tier operating within Always Free limits). - Subsystem 1: VPN Gateway & Control Plane (
~/docker/netbirdand~/docker/nginx-proxy-manager): nginx-proxy-manager: Routes bothnetbird.oscarlytics.comgRPC/WebSocket streams and all internal subdomains over the NetBird interface by hostname (SNI).netbird-management,netbird-signal,netbird-relay,netbird-dashboard.- Subsystem 2: Centralized Observability (
~/docker/monitoringand~/docker/uptime-kuma): prometheus: Collects local metrics, remotely scrapesVPS Prodover NetBird, and receivesremote_writemetrics from theLocal PC(30-day TSDB retention).loki+promtail: Central log store for container and system logs streamed across all nodes.grafana: Single pane of glass for multi-node server infrastructure, Podman/Docker containers, and financial dashboards.uptime-kuma: Active synthetic monitoring (HTTP/HTTPS probes on public/private domains and cross-nodePINGchecks across the VPN mesh) with instant Telegram bot alerts.netdataandnode_exporter: High-frequency granular telemetry for the ARM64 host.- Subsystem 3: Financial Ecosystem & Data Warehouse (
~/docker/finanzasand~/docker/database): - Includes
actual-server(Actual Budget),actual-eb-sync(Enable Banking PSD2),finanze-server+finanze-front(Finanze),api-sync(Python ETL worker for BNPL, Kraken, Coinbase, Monzo, and DWH ingestion), andpostgres(pgvector:pg16acting as the Data Warehouse withfinanzas,omniwrapped, andllm_viewsschemas).
mermaid
flowchart TB
subgraph Nodos ["📡 Distributed Sensors Across 3 Nodes (over NetBird Mesh)"]
direction LR
N1["🛡️ vps-prod (Podman)<br/>node-exporter + podman-exporter<br/>+ promtail"]
N2["☁️ oci-ampere (Docker)<br/>node-exporter + netdata<br/>+ promtail"]
N3["🖥️ local-pc (Hybrid)<br/>prometheus remote_write<br/>+ promtail"]
end
subgraph CoreOCI ["🧠 Central Storage and Active Probing (OCI-Ampere)"]
direction LR
Prom[("Prometheus TSDB<br/>30d Retention (:9090)")]
Loki[("Grafana Loki<br/>Centralized Logs (:3100)")]
Kuma["Uptime Kuma (:3001)<br/>HTTP and P2P Ping Probes<br/>across all 3 Nodes"]
end
subgraph Vis ["📊 Unified Visualization and Alerting"]
direction LR
Graf["Grafana (:3000)<br/>• Multi-Node Central Control<br/>• 3-Node Executive Dashboard"]
TG["Telegram Bot<br/>Real-Time Alerts"]
end
N1 -->|"Pull Scrape via VPN"| Prom
N2 -->|"Internal Scrape + Logs"| Prom
N3 -->|"Push Remote Write via VPN"| Prom
N2 -->|"Push Promtail Logs via VPN"| Loki
Prom & Loki --> Graf
Kuma -->|"Instant Notification"| TG
Fig 1. Global 3-Node Dashboard in Grafana (cuadro-mando-tres-nodos): unified view of health, Podman/Docker containers, network traffic, and storage across all three compute nodes.
Fig 2. Multi-Node Central Control (Selector) dashboard inspecting the vps-prod node in detail and comparing its CPU and RAM curves against the rest of the cluster.
Fig 3. Centralized log explorer in Grafana + Loki ingesting real-time HTTP traffic and container events over the NetBird mesh.
2.3. Node 3: Local PC / Homelab — AI Muscle, RAG, Media & Lab
- Primary Hardware:
- CPU: Intel Core i9-14900K (24 cores / 32 threads).
- RAM: 64 GB DDR5.
- GPU: NVIDIA GeForce RTX 4090 with 24 GB dedicated VRAM.
- OS & Virtualization: Ubuntu 24.04 LTS + KVM/QEMU hypervisor (Windows 11 VM with custom lifecycle management scripts).
- Complementary Home Network Hardware (1 Gbps Symmetric Fiber without CG-NAT):
- Netgear ReadyNAS 104: 4 bays x 1 TB in RAID 5 for centralized backups and dynamic DuckDNS IP updates.
- Raspberry Pi 3 Model B: Dedicated to on-demand retro emulation.
- Container Architecture on the Local PC (23 Docker Containers + 1 Rootless Podman Pod):
| Functional Block | Active Containers | Technical Purpose |
|---|---|---|
| AI Inference & Agentic Clients | ollama, open_webui (CUDA), anythingllm, libretranslate |
Local execution on the RTX 4090 of LLMs (qwen2.5:14b, llama3.1:8b, qwen3-embedding:8b), chat interfaces equipped with SQL/RAG tools connected to OCI and the local catalog, and offline neural translation. |
| eBiblioRAG Pipeline (+3,000 Books) | n8n, python-worker (Docling GPU), qdrant, unstructured-api (GPU), stirling-pdf, calibre |
Automated ingestion, e-book conversion, Tesseract OCR, AI-assisted structured cataloging, and hybrid vector indexing (4096d + BM25). |
| Local Databases & SQL BI | postgres_central (Postgres 15), pgadmin4, cloudbeaver, pghero |
Relational storage for n8n, biblioteca, and omniwrapped (music listening analytics enriched with MusicBrainz dumps), plus query auditing in PgHero and web SQL clients. |
| Photography & Multimedia AI | immich_server, immich_machine_learning, immich_postgres (vectorchord/pgvecto.rs), immich_redis (valkey:9) |
Self-hosted Google Photos alternative with facial recognition and AI-accelerated semantic image search. |
| Dashboard, Proxy & Dual Monitoring | homarr, nginx-proxy-manager, portainer, beszel-hub, beszel-agent, beszel-agent-podman |
Unified start page (Homarr) and ultra-lightweight inspection in Beszel capable of simultaneously monitoring Docker containers, the RTX 4090 GPU, and rootless Podman pods. |
| Pre-Production Mirror Environment (Podman) | Pod portfolio + Pod monitor (monitor-sensor-so, monitor-sensor-podman, monitor-prometheus) |
Identical local replica of VPS Prod managed with Podman Quadlets to validate changes before pushing images to GitHub Container Registry (GHCR). |
2.4. Node 4: Android (Google Pixel 9 Pro) — Pocket Command Center
- Operates as a full peer node on the
NetBirdmesh (pixel9.netbird.selfhosted). - With the NetBird Android client active, the phone transparently resolves all internal subdomains (
grafana.oscarlytics.com,cuentas.oscarlytics.com,inversiones.oscarlytics.com,kuma.oscarlytics.com) and connects directly via private IP toOpen WebUI,Homarr,Beszel, orImmichon the home workstation when powered on—delivering a cloud-like mobile experience with zero ports exposed to the Internet.
Fig 4. Active monitoring in Uptime Kuma from the smartphone verifying web status, the NetBird control plane, and the private VPS-PROD <-> OCI link.
Fig 5. Direct HTTPS access from the Google Pixel 9 Pro to grafana.oscarlytics.com over the P2P WireGuard NetBird tunnel.
Resolution
Consolidating this hybrid architecture proves that you don't need noisy enterprise server racks running 24/7 at home to operate a private, production-grade data, AI, and self-hosted services platform:
- Zero public exposure on private services: 100% of observability tools, databases, personal finance managers, and AI workloads operate behind P2P WireGuard tunnels authenticated with federated identity and valid Wildcard SSL certificates (
DNS-01). - Over 40 containers orchestrated with the best of both worlds: Immutability and unprivileged (
rootless) execution with Podman + Systemd Quadlets on the public perimeter, combined with Docker + NVIDIA CUDA across the 24 GB VRAM RTX 4090 for heavy local AI and RAG workloads. - Full data sovereignty & cost efficiency: Zero SaaS subscriptions for wealth management, photo storage, observability, or LLM inference, keeping fixed monthly costs to a bare minimum (only the lightweight web production VPS and domain name) by leveraging OCI Ampere's 24 GB RAM as an always-on central node.
In upcoming articles, I will dive deeper into the key systems running on top of this infrastructure: the Financial Data Warehouse with automated BNPL reconciliation and agentic SQL querying, the eBiblioRAG engine for 3,000+ books with hybrid vector search, and the polymorphic Grafana dashboards. If you want to read how the public web server hardening started, check out the Portfolio 2.0 article.