Deployment edge posture

Expose one private app through a narrow HTTPS edge.

The MVP target is a single-purpose Dockerized VPS behind an HTTPS reverse proxy. Before the official long-lived VPS cutover, use the same container/edge/runtime shape on a disposable private test-VPS-like rehearsal host. This page defines the production-edge assumptions without adding raw IP/user-agent identity ledgers to the application database.

Edge contract

Production assumptions

LayerRequired posturePrivacy stance
Public TLSTerminate HTTPS at a reverse proxy in front of the Rust app.The app emits HSTS only when NOCTURNE_PUBLIC_ORIGIN is an https:// origin.
App bindKeep the app reachable only by the local host proxy or private Docker network.Do not publish the application port directly to the public internet in production.
CookiesSet NOCTURNE_SECURE_COOKIES=true for production and keep owner sessions short.Member sessions store only server-side digests; owner cookies use host-prefix/Secure posture plus HMAC-signed timestamped values with server-side expiry checks.
Owner gateConfigure NOCTURNE_OWNER_KEY_SHA256 or a startup-only NOCTURNE_OWNER_KEY; tune NOCTURNE_OWNER_SESSION_MAX_AGE_SECONDS if needed.The owner dashboard remains disabled by default; plaintext owner keys are not stored in settings/database, and owner cookies contain no identity fields.
Body limitsThe app enforces a 16 KiB default form limit and an 8 KiB public report limit; edge limits should be equal or stricter for public paths.Reject oversized input without collecting reporter identity.
Public health/healthz stays shallow; run doctor locally for details.Database, filesystem, checkout, and media diagnostics are not disclosed to unauthenticated visitors.
Operational recoverySet NOCTURNE_BACKUP_POSTURE before production exposure and run an isolated restore drill.Backups recover pseudonymous records and private media without expanding live identity collection.
LogsUse purpose-bound operational logs with short retention at the proxy.The application remains designed around pseudonymous records and non-identifying abuse controls.
Proxy templatesUse the copy-safe Caddy or nginx example as the first public edge scaffold after preflight is clean.Both disable persistent access logs and avoid forwarding client-IP headers; nginx adds memory-only sensitive-POST buckets, while stock Caddy requires a separately validated trusted-edge throttle before widening.
Environment

Production-edge variables

NOCTURNE_DEPLOYMENT_PROFILE=production
NOCTURNE_PUBLIC_ORIGIN=https://final-brand.example
NOCTURNE_SECURE_COOKIES=true
NOCTURNE_OWNER_KEY_SHA256=64_character_sha256_hex_digest
NOCTURNE_OWNER_SESSION_MAX_AGE_SECONDS=1800
NOCTURNE_BACKUP_POSTURE=configured
NOCTURNE_BACKUP_DIR=/srv/nocturne/backups
NOCTURNE_BIND=0.0.0.0:3000

NOCTURNE_BIND=0.0.0.0:3000 is acceptable inside a private Docker network. If the app runs directly on the host, prefer a loopback bind and let the reverse proxy own public ports 80/443.

Doctor + preflight gates

Local readiness checks

Use doctor for general environment diagnostics, vps-bootstrap-plan for non-destructive env/compose/proxy-template review before services start, deployment-rehearsal-plan for the secret-free operator sequence, and production-preflight as the stricter before-exposure gate on the VPS.

cargo run -- doctor
cargo run -- vps-bootstrap-plan --env-file .env.production
cargo run -- deployment-rehearsal-plan --origin https://members.final-domain.example --backup-id backup-YYYYMMDD
cargo run -- production-preflight
Non-goals

What this slice intentionally avoids