Skip to content

Secrets

Terminal window
layer secret set NAME [options]
layer secret rotate [project] [options]
OptionValueNotes
--value<value>Secret value.
--value-env<name>Read the secret value from an environment variable.
--from-stdinRead the secret value from stdin.
--env<name>Environment name for rotation checks.
--applyWrite due generated Secret rotations to Cloudflare.
--yes, -yConfirm non-interactive rotation apply.
-h, --helpShow help.

Check due generated Secret rotations:

Terminal window
layer secret rotate --env production

Write due rotations:

Terminal window
layer secret rotate --env production --apply --yes

Use the apply command in cron when local direct deploys should rotate generated Secret values on a schedule.