Lab Matrix

lab-matrix Host Configuration

Role: Primary homelab (L2 gateway) — workstation + server
Platform: x86_64-linux (AMD CPU + AMD GPU)

Architecture Role

lab-matrix is the L2 gateway in our two-layer architecture. It runs all backend services but has no public IP — traffic reaches it through vps-pacman (L1) over Tailscale.

Services

CategoryServices
IdentityKanidm (id.alienzj.org)
SSOOAuth2-Proxy (local instance for SSO on direct Tailscale access)
DatabasePostgreSQL 18 (backend for all services)
MonitoringGatus (status.alienzj.org), VictoriaMetrics (metrics.alienzj.org), Gotify (push.alienzj.org)
GitForgejo (git.alienzj.org)
PasswordVaultwarden (bw.alienzj.org)
RSSFreshRSS (rss.alienzj.org)
BooksCalibre (books.alienzj.org)
MailStalwart (mail.alienzj.org)
PhotosImmich (immich.alienzj.org)
DocumentsPaperless (paper.alienzj.org), Stirling-PDF (pdf.alienzj.org)
OfficeOnlyOffice (office.alienzj.org), Affine (affine.alienzj.org)
NotesHedgeDoc (note.alienzj.org)
AI/LLMLiteLLM (litellm.alienzj.org)
BookmarksLinkwarden (links.alienzj.org)
HomeGrocy (grocy.alienzj.org), Mealie (meal.alienzj.org)
ShellAtuin sync server (atuin.alienzj.org)
ProxySing-box (TUN mode), Nginx (QUIC/kTLS)

Imported Modules

  • modules/modules.nix: All service toggles and host-specific settings
  • modules/hardware.nix: AMD CPU/GPU, HIDPI, YubiKey, Bluetooth, SSD
  • modules/storage.nix: Disko schema for Btrfs + LUKS2
  • modules/virt.nix: Docker/Podman isolation
  • modules/secrets.nix: Agenix secret declarations

Setup

See Homelab Bootstrap Guide for the step-by-step operational setup — secrets preparation, Kanidm admin recovery, OAuth2-Proxy OIDC client registration, and service startup order.

SSL and ACME

lab-matrix runs all services with nginx.ssl = false. SSL is terminated at L1 (vps-pacman); traffic between L1 and L2 travels inside a Tailscale WireGuard tunnel. lab-matrix does not run ACME and should not be given a Cloudflare API token — the *.alienzj.org wildcard cert is managed exclusively by vps-pacman.

The L2 nginx still applies full SSO (auth_request /oauth2/auth) via the local oauth2-proxy instance over a Unix socket. The auth chain is independent of SSL on L2. See SSO & Identity Management for the full encryption layering.