php bin/console secrets:set
Set a secret in the vault
Usage
secrets:set [-l|--local] [-r|--random [RANDOM]] [--] <name> [<file>]
Arguments
name The name of the secret
file A file where to read the secret from or "-" for reading from STDIN
Options
-l, --local Update the local vault.
-r, --random Generate a random value.
Help
The secrets:set command stores a secret in the vault.
bin/console secrets:set
To reference secrets in services.yaml or any other config
files, use "%env()%" .
By default, the secret value should be entered interactively.
Alternatively, provide a file where to read the secret from:
php bin/console secrets:set filename
Use "-" as a file name to read from STDIN:
cat filename | php bin/console secrets:set -
Use --local to override secrets for local needs.