Secrets Management
Why Use Secrets
If keys are stored directly in config, common leak paths are:
- screenshots
- shared config files
- accidental commits
Secrets keep references in config while real values stay in external secure sources.
Where Real Values Can Live
env: operating system environment variablesfile: external JSON fileexec: command output (commonly used with secret systems)
config.json keeps only:
secrets.providerssecrets.defaultssecrets.refs
Beginner Path (UI First)
- Open
/secretsin the Web UI. - Enable
enabled. - Configure one default provider (usually
envfirst). - Convert sensitive paths like
providers.<name>.apiKeytorefs. - Save and run a connection test to confirm behavior.
Typical Benefits
- Safe team templates without exposing real keys.
- Easier multi-environment switching.
- Simpler key rotation by updating secret sources only.
Is the Old Style Still Valid?
Yes. Direct providers.<name>.apiKey still works.
Recommended usage:
- quick local experiments: direct key is acceptable
- team/shared/long-running environments: use secrets refs
Advanced Entry (Optional)
For automated/batch secret operations, use nextclaw secrets subcommands. See full options in Commands.