Skip to content

Audit and harden packaging; native sign-up + password recovery - #1

Merged
MattDHill merged 1 commit into
masterfrom
audit-and-harden
Jun 19, 2026
Merged

Audit and harden packaging; native sign-up + password recovery#1
MattDHill merged 1 commit into
masterfrom
audit-and-harden

Conversation

@helix-nine

Copy link
Copy Markdown
Contributor

Audit + update of the community bunker46-startos package against the canonical start9-registry packages — correctness, conformance, and an account-recovery flow.

Correctness

  • Fix restart crash loop: removed runAsInit from all daemons. bunker46's images are plain application-binary entrypoints (postgres, valkey, node, caddy), not s6/tini images, so runAsInit was a misuse — it orphaned the node server on restart, leaving it holding :3000 and crash-looping on EADDRINUSE (reproducible on a single restart).
  • Postgres backups via withPgDump (portable across PG major upgrades).
  • Postgres bound to 127.0.0.1; dropped the server's unused volume mount.

Conformance

  • Dedicated db volume + startos volume (was one main volume).
  • Redis → Valkey (valkey/valkey:8-alpine), ephemeral.
  • Internal Postgres/Valkey health checks hidden (display: null).
  • packageRepo → Start9-Community; CONTRIBUTING/TODO aligned to canonical; effects: T.Effects.

Accounts

  • Registration on by default → the first account is created in the native web UI; an important task reminds the user to disable open sign-ups afterward.
  • New Reset Account Password action — pick an account from a dynamic dropdown, get a freshly generated password (argon2, written directly to Postgres). The only recovery path, since upstream has no forgotten-password flow and passkeys are address-bound.
  • Registrations toggle action.

Built, installed, and exercised on a StartOS dev box: clean boot, native sign-up, password reset + login (old password invalidated), and restart with no EADDRINUSE.

Follow-up tracked in TODO.md: once upstream dsbaars/bunker46#9 (first-user bypass) lands and the ref is bumped, default registration off and drop the disable-registration task.

🤖 Generated with Claude Code

Conformance + correctness pass against the canonical start9-registry packages,
plus a restart fix and an account-recovery flow.

Correctness:
- Remove runAsInit from every daemon. These images are plain application-binary
  entrypoints (postgres, valkey, node, caddy), not s6/tini images, so runAsInit
  is a misuse: it wrapped node in an init shim that was orphaned on restart,
  leaving the old server holding :3000 and the new one crash-looping on
  EADDRINUSE (reproducible on a single restart). Removing it fixes the loop.
- Back up Postgres with withPgDump instead of a raw volume copy (portable
  across Postgres major upgrades).
- Bind Postgres to 127.0.0.1; drop the server's unused volume mount.

Conformance:
- Dedicated db volume for Postgres, startos volume for store.json (was one
  main volume).
- Redis -> Valkey (valkey/valkey:8-alpine), ephemeral.
- Hide internal Postgres/Valkey health checks (display: null).
- packageRepo -> Start9-Community; CONTRIBUTING/TODO aligned; effects: T.Effects.

Accounts:
- Registration on by default so the first account is created in the native web
  UI; an important task reminds the user to disable open sign-ups afterward.
- New Reset Account Password action: pick an account from a dynamic dropdown and
  get a freshly generated password (hashed with the app's own argon2, written to
  Postgres). The only recovery path, since upstream has no forgotten-password
  flow and passkeys are address-bound.
- Registrations toggle action to open/close sign-ups.

Follow-up in TODO.md: once dsbaars/bunker46#9 (first-user bypass) lands, default
registration off and drop the disable-registration task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@helix-nine

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @MattDHill! No change requests, so nothing further to address on my end. The build / Build check is still pending — I'll keep an eye on it and we can merge once it's green.

#1

@MattDHill
MattDHill merged commit 4f373b5 into master Jun 19, 2026
1 check passed
@MattDHill
MattDHill deleted the audit-and-harden branch June 19, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants