1mellon keys rotate --to v2
123ENCRYPTION_KEYS={"v1":"derived:BETTER_AUTH_SECRET","v2":"<new-base64-key>"} ENCRYPTION_KEY_VERSION=v2 MELLON_OPERATOR_TOKEN=<random-operator-token>
12MELLON_OPERATOR_TOKEN=<random-operator-token> \ mellon keys rotate --to v2 --api-url https://secrets.example.com --apply
v1 configured until the command completes, application reads pass, and a restore drill succeeds. The command does not remove old keys.derived:BETTER_AUTH_SECRET for v1 when Mellon previously used its self-hosting default. If the instance previously used ENCRYPTION_KEY, provide that original base64 key as v1 instead.| Option | Description |
--to <version> | Active target key version |
--batch-size <count> | Events per request, from 1 to 500 (default: 100) |
--api-url <url> | Mellon instance URL |
--apply | Apply the reviewed rotation |