Nathaniel Lewis

The lab

A three-node, self-managed environment

Every service is containerized, hardened to a common baseline, and reachable only through Cloudflare Zero Trust. No open inbound ports.

Architecture

How it's built, top to bottom

Access

  • Cloudflare Access
  • Cloudflare Tunnel (outbound-only)
  • MFA everywhere

Edge

  • Cloudflare Pages
  • Workers
  • D1
  • R2
  • Turnstile

Services

  • Immich
  • Jellyfin
  • Nextcloud
  • OpenEMR (test data)
  • Uptime Kuma
  • Portainer

Platform

  • Docker + Compose
  • Hardened container baseline
  • 3 NAS nodes

Recovery

  • Isolated DR node
  • Backblaze B2 (encrypted)
  • Monthly restore test

Hardware

What it runs on

Primary NAS nodeMedia, photos, file sync, internal services
Secondary NAS nodeClient previews, evaluations, backup target
Disaster-recovery nodeVersioned backups on isolated hardware

Services

What runs on it, and why

ServiceRoleWhy it's here
Cloudflare TunnelOutbound-only connectivityInternal services reachable with no port forwarding
Cloudflare AccessIdentity-gated previews and admin surfacesNothing private is one password away from the internet
Cloudflare PagesProduction websites at the edgeSites stay up even if a NAS goes down
Workers, D1, R2Forms and workflowsServer-side Turnstile verification, no servers to patch
NextcloudFile sync and sharingFiles on hardware I control
Uptime KumaService monitoringI hear about an outage before anyone else does
PortainerMulti-node container managementOne view across all three nodes
Backblaze B2 + rcloneEncrypted off-site backupsA monthly restore test proves they work

Practice

What I rehearse here before I do it at work

  • Container baseline on every service: read-only root filesystem, all capabilities dropped, no privilege escalation, memory and process limits, health checks
  • Private previews behind Cloudflare Access before any cutover
  • DKIM, SPF and strict DMARC on every sending domain
  • Monthly restore tests from off-site backups
  • Every change tested, every result recorded