Repository navigation
Conversation
…h missing or placeholder secrets The compose files shipped fixed NEXTAUTH_SECRET, DATABASE_ENCRYPTION_KEY and MEDIA_SERVER_WEBHOOK_SECRET values that are public in this repo. They now require values from .env, and cap-web (in production) and the media server refuse to start when a secret is missing or still one of those known placeholders. The self-hosting docs explain the upgrade step and what replacing each secret changes.
|
@07rjain is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
| DATABASE_ENCRYPTION_KEY: ${DATABASE_ENCRYPTION_KEY:?Set DATABASE_ENCRYPTION_KEY in .env (run: openssl rand -hex 32)} | ||
| NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:?Set NEXTAUTH_SECRET in .env (run: openssl rand -hex 32)} | ||
| MEDIA_SERVER_WEBHOOK_SECRET: ${MEDIA_SERVER_WEBHOOK_SECRET:?Set MEDIA_SERVER_WEBHOOK_SECRET in .env (run: openssl rand -hex 32)} |
There was a problem hiding this comment.
The unquoted secret values contain : in (run: openssl rand -hex 32), which breaks YAML syntax. Docker Compose cannot read either compose file, even when all three secrets are set. Quote the entire ${...} value at every changed secret entry in both docker-compose.yml and docker-compose.template.yml.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docker-compose.yml
Line: 17-19
Comment:
**Compose files cannot load**
The unquoted secret values contain `: ` in `(run: openssl rand -hex 32)`, which breaks YAML syntax. Docker Compose cannot read either compose file, even when all three secrets are set. Quote the entire `${...}` value at every changed secret entry in both `docker-compose.yml` and `docker-compose.template.yml`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| 2. Generate a new value for each secret with `openssl rand -hex 32` and put them in the `.env` next to your compose file (or in your platform's variables). Use the same `MEDIA_SERVER_WEBHOOK_SECRET` on cap-web and the media server. | ||
| 3. Pull and restart: `docker compose pull && docker compose up -d`. |
There was a problem hiding this comment.
Template upgrade steps miss secrets
The older docker-compose.template.yml sets secrets directly, so adding new values to .env does not replace them. docker compose pull only updates images; users following these steps still pass the public secrets to the new web image, which refuses to start. Tell template users to update their compose file or replace its hardcoded values before restarting.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/content/docs/self-hosting.mdx
Line: 211-212
Comment:
**Template upgrade steps miss secrets**
The older `docker-compose.template.yml` sets secrets directly, so adding new values to `.env` does not replace them. `docker compose pull` only updates images; users following these steps still pass the public secrets to the new web image, which refuses to start. Tell template users to update their compose file or replace its hardcoded values before restarting.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.The `${VAR:?... (run: openssl rand -hex 32)}` values contain ': ', which YAML reads as a nested mapping, so docker compose rejected docker-compose.yml and docker-compose.template.yml before interpolation. Quoting keeps the friendly missing-secret message.
|
Thanks @07rjain for splitting this out and for the detailed upgrade section, that's exactly what we were hoping for. Quoting the values in eae90b6 fixes Greptile's P1: both compose files parse now, and
We need Greptile at 5/5 on the latest commit and green CI before we can merge. After pushing, you can mention @greptileai in a comment to get a re-review. Thanks! |
…etup Generate unique masked CI secrets and validate both Compose variants with each required secret missing. Verify retained encryption keys still decrypt stored credentials, remove quick-start secret backups, and document the upgrade in the changelog.
|
@greptileai please re-review the latest changes on commit 8d826e4. The branch now includes current main, the upgrade and secret-check fixes, and the updated self-hosting CI validation. |
Split out of #2580 (self-host secret checks).
Old Compose files shipped public
NEXTAUTH_SECRET,DATABASE_ENCRYPTION_KEYandMEDIA_SERVER_WEBHOOK_SECRETdefaults. Standard/template Compose now require explicit values, and production startup rejects missing or known placeholder secrets. Required-secret interpolation values are quoted so both files parse correctly. Main's encryption-key format validation is preserved.Upgrade warning / release note: existing installations still using public placeholders will refuse to start after upgrading. Back up MySQL, update the repository and any copied template, configure the secrets, then pull images and rebuild the media server with
docker compose pull && docker compose up -d --build. Adding.envvalues does not replace hardcoded values in an older template. Coolify's generated secrets are unaffected. The guide and a new web changelog entry explain this change.Rotating
DATABASE_ENCRYPTION_KEYmakes previously encrypted storage settings, developer app keys and integrations unreadable. Installations that need to upgrade first can keep their exact existing valid key and explicitly setCAP_ALLOW_INSECURE_SECRETS=trueon cap-web. This temporary override permits known placeholders, logs a prominent warning on every affected startup, and keeps missing-secret and format validation enforced. Rotate the authentication/webhook secrets, plan the encrypted-data migration or reconfiguration, and remove the override once the encryption key is rotated. Standard/template Compose forward this flag. The media server still requires a unique webhook secret.README and documentation quick starts create
.envand generate all three secrets before starting containers. They remove the temporary.env.bak, which is also ignored by Git. Self-hosting CI now generates unique masked secrets before starting Compose and validates both Compose variants with each required secret missing.The branch includes current main at
3614bdb692af7317c30c0ad7afaa496a6974c2eb, integrating 174 upstream commits without conflicts.Validation:
bun run typecheck, scoped Biome checks, MDX compilation, workflow YAML/shell syntax checks and media-server bundling passed. Biome does not process Markdown/MDX/YAML; those were validated separately where applicable.The displayed Greptile 5/5 score is from an earlier commit; review of this head and maintainer approval for fork CI remain pending.


Confidence Score: 5/5
The PR appears safe to merge; both previous findings are fixed and no new blocking issue was found.Summary
This PR removes public secret defaults and adds startup checks for self-hosted deployments.
Both previous findings are fixed. No new actionable issues were found. Container startup was not run during this review.
Reviews (3) · Last reviewed commit: "fix(self-host): exercise required secret..." · Reviewed by Greptile