Skip to content

Secret commands

Use secret commands for passwords, tokens, and generated keys.

Creates a new secret.

Interactive:

Terminal window
dpl secret create
dpl secret create api-token

Read stdin:

Terminal window
printf '%s' 'secret-value' | dpl secret create api-token -

Read a file:

Terminal window
dpl secret create api-token ./token.txt

If the interactive value is empty, dpl generates a random 32-character value.

Lists secret names.

Terminal window
dpl secret ls

Prints plaintext to stdout.

Terminal window
dpl secret cat api-token

Use this carefully. Shell history and terminal scrollback can expose secrets.

Removes a secret file.

Terminal window
dpl secret rm api-token

Run dpl check <unit> after removing a secret to find configs that still use it.