fix(selfhost): auto-generate self-host secrets instead of empty placeholders#7196
Merged
Merged
Conversation
…holders scripts/selfhost-init-secrets.sh used to create empty placeholder files for every Docker Compose secret, requiring the operator to manually run `openssl rand -hex 32` and paste a value into each one before the app would boot. For the seven secrets no external party has to agree on (webhook secret, bearer tokens, encryption master keys), generate a real random value the first time the file is missing or empty. The four externally-issued secrets (GitHub App private key, Orb enrollment secret, PagerDuty routing key, Claude Code OAuth token) are unaffected -- there's no value this host could generate that would actually work, so they still get an empty placeholder. Updates the docs and env-var comments that described the old manual step. Closes #4928
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 2a90817 | Commit Preview URL Branch Preview URL |
Jul 18 2026, 10:34 AM |
Bundle ReportChanges will increase total bundle size by 608 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7196 +/- ##
=======================================
Coverage 93.77% 93.77%
=======================================
Files 695 695
Lines 69042 69042
Branches 18811 18811
=======================================
Hits 64746 64746
Misses 3302 3302
Partials 994 994
Flags with carried forward coverage won't be shown. Click here to find out more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/selfhost-init-secrets.shused to create empty placeholder files for every Docker Compose secret — the operator still had to manually runopenssl rand -hex 32and paste a value into each one before the app would boot.github_webhook_secret,loopover_api_token,loopover_mcp_token,internal_job_token,selfhost_setup_token,token_encryption_secret,draft_token_encryption_secret), the script now generates a real random value the first time the file is missing or still empty — same idempotent/non-destructive guard as before ([ ! -e "$path" ] || [ ! -s "$path" ]), so a file that already has real content is never touched again..env.example,.env.selfhost.example,secrets/README.md,self-hosting-quickstart.mdx,self-hosting-security.mdx) that described the old manual step.Closes #4928
Test plan
npm run typecheck— clean (this change touches no TypeScript)npm run docs:drift-check— passesnpm run test:ci(full local gate, unsharded) — greenscripts/**and*.mdx/*.example/*.mdare outside Codecov'ssrc/**patch-coverage scope, so this PR carries no coverage obligation.