Top-level keys
server
storage
database
server_tls
acme
dns
call_home
Environment variable overrides
These environment variables always win over the YAML file:Rotating the storage key
You can replace the storage key without downtime. CertGov keeps accepting the old key while it re-encrypts everything with the new one. One server:- Generate a new key:
certforge storage-key generate. Save a copy somewhere safe. - In the key file, make the new key
CERTFORGE_STORAGE_KEYand setCERTFORGE_STORAGE_KEY_PREVIOUSto the old key. - Restart CertGov. At startup it re-encrypts every value still on the old key and logs
[storage-key] re-encrypted …. - Check that nothing is left:
certforge storage-key status(with the same environment andDATABASE_URL) should report0 value(s) on a previous key, 0 unreadable. - Remove
CERTFORGE_STORAGE_KEY_PREVIOUSand restart.
- On every server, set
CERTFORGE_STORAGE_KEY_NEXTto the new key, and restart them one at a time. - On every server, make the new key current, move the old one to
CERTFORGE_STORAGE_KEY_PREVIOUS, remove_NEXT, and restart them one at a time. - Continue from step 4 above, on every server.
Backup files are encrypted with the key that was current when they were made, and rotation doesn’t rewrite them. Keep the old key while you still need those backups: restore accepts any key in
CERTFORGE_STORAGE_KEY_PREVIOUS, and certforge decrypt-backup does too.