Split out of #59 so that issue can close on its shipped, safe surface. This is the deferred, breaking half its audit always flagged.
What's left env-only (deliberately)
| Bucket |
Vars |
| Federation identity |
SITE_URL, FEDI_HANDLE, FEDI_DOMAIN — baked into the ActivityPub actor id, WebFinger, signature keyId, RSS. Changing them post-install rewrites your identity. |
| Root secrets / infra |
ADMIN_SECRET, DATABASE_URL, SMTP_* / DAYONE_EMAIL, TRUSTED_PROXY, SETUP_TOKEN |
Everything user-facing and safe to move web-side is done (theme/layout/accent/sidebar, profile incl. avatar/banner, contact + podcast, gallery categories, analytics site-id and encrypted API key, crosspost creds, VAPID keys, and session/token TTLs).
Why it's not just "another slice"
Moving identity to the DB is a breaking change to how an instance is stood up and migrated, and it interacts with:
Suggested shape (for later)
Decide the hosting model first, then: a DB overlay for the identity/secret values with the wizard writing DB instead of .env.local, an explicit "change your domain" migration flow (re-key + refetch), and secrets encrypted via secret-box (as VAPID/analytics/crosspost already are). Not before the model decision.
Blocks the full "configure everything from the web" vision; not required for #59's shipped scope.
Split out of #59 so that issue can close on its shipped, safe surface. This is the deferred, breaking half its audit always flagged.
What's left env-only (deliberately)
SITE_URL,FEDI_HANDLE,FEDI_DOMAIN— baked into the ActivityPub actor id, WebFinger, signaturekeyId, RSS. Changing them post-install rewrites your identity.ADMIN_SECRET,DATABASE_URL,SMTP_*/DAYONE_EMAIL,TRUSTED_PROXY,SETUP_TOKENEverything user-facing and safe to move web-side is done (theme/layout/accent/sidebar, profile incl. avatar/banner, contact + podcast, gallery categories, analytics site-id and encrypted API key, crosspost creds, VAPID keys, and session/token TTLs).
Why it's not just "another slice"
Moving identity to the DB is a breaking change to how an instance is stood up and migrated, and it interacts with:
SITE_URL/handle without re-keying / breaking followers — see ensureActorKeys() silently mints a NEW federation keypair when the ActorKeys row is missing #310)..env.localsafely (fix(setup): don't brick an install when setup fails; ask for + validate SITE_URL (#59) #301) — the question is whether a running instance should be able to rewrite them, and how to migrate existing.envinstalls.Suggested shape (for later)
Decide the hosting model first, then: a DB overlay for the identity/secret values with the wizard writing DB instead of
.env.local, an explicit "change your domain" migration flow (re-key + refetch), and secrets encrypted viasecret-box(as VAPID/analytics/crosspost already are). Not before the model decision.Blocks the full "configure everything from the web" vision; not required for #59's shipped scope.