prod:env --forceStatus: Accepted (2026-11-30). Phase 1 (clean-up) of the open-source plan: its open security items and safe defaults for self-hosters. Tightens 0903 and finishes 0310 in the prod-like compose.
Once the repo is public, people will copy docker-compose.prod.yml and .env.example as they are. The second security pass over the S3 client, the prod compose file and the changes after 7e799f3 (review, second pass) found that the prod-like stack gave tiers more than they need:
LINORA_TOKEN_KEYS, marked TEMPORARY), although its config has read only the per-purpose keyrings since 81dce2d. With the master it could also mint svc:api tokens;blobs volume read-write. Only the compactors write snapshots. The doc worker is the tier that parses attacker-shaped documents, and code execution there could rewrite every tenant’s snapshots (content_hash is not checked on read);local and none of them reads it;0.0.0.0 on containers that are also on the client-facing edge network, so web, edge and mcp could read /metrics (SR-18 only partly fixed);.env.example, docker-compose.yml and CI (DB password linora, S3 secret linoradevsecret) are public, and a production tier accepted them;npm run prod:env --force overwrote .env.prod while the stack’s volumes still held data encrypted, hashed or authenticated with the old secrets; its own message then pointed at down -v, which deletes the data.loadServerConfig (every tier with a database) reports a problem when NODE_ENV is production or unset and the DATABASE_URL password or LINORA_S3_SECRET_ACCESS_KEY is a published dev value (DEV_DB_PASSWORDS, DEV_S3_SECRETS in packages/server-common/src/config.ts). The value itself is never echoed. A test keeps the lists in step with .env.example, docker-compose.yml and ci.yml.
LINORA_ALLOW_DEV_SECRETS=1 lifts it for tests and benchmarks that run production mode against the dev database (the API test harness, deploy/measure-rss.mjs, the load-test server). It is documented as never for a deployment.LINORA_TOKEN_KEYS_RT, _CG and _SVC_DOCWORKER. The TEMPORARY master line is gone, and no container receives LINORA_TOKEN_MASTER.blobs read-only. No tier gets an S3 secret while LINORA_BLOB_STORE=local; switching to s3 gives the compactors a read-write bucket user and the readers a read-only one, never the root key.127.0.0.1 default. Doc workers and compactors sit only on internal and keep 0.0.0.0 there. A Prometheus for api and realtime needs pinned internal addresses (follow-up when one is added).prod:env --force refuses while the compose project has volumes, or when Docker cannot be asked. When it does run, it backs up the old file (mode 0600) and sets 0600 on the new one even when the file existed.deploy/prod-compose.test.mjs asserts 2-5 on the compose file: keyrings per tier, own DB login per tier, read-only blob readers, no S3 secret with the local store, loopback metrics on the edge network, and the --force guard.prod:env already generated random secrets, so the maintainer’s .env.prod passes unchanged. LINORA_TOKEN_MASTER stays in .env.prod for re-deriving keyrings; nothing reads it.LINORA_ALLOW_DEV_SECRETS=1.internal network’s IPAM forces the network, and every container on it, to be recreated on the maintainer’s running stack. Deferred until a scraper exists.