systemd-creds Command Examples

List, show, encrypt and decrypt service credentials. More information: https://www.freedesktop.org/software/systemd/man/systemd-creds.html.

systemd-creds encrypt --name={{name}} {{path/to/input_file}} {{path/to/output}}

systemd-creds decrypt {{path/to/input_file}} {{path/to/output_file}}

echo -n {{text}} | systemd-creds encrypt --name={{name}} - {{path/to/output}}

echo -n {{text}} | systemd-creds encrypt --name={{name}} --pretty - - >> {{service}}

systemd-creds encrypt --not-after="{{timestamp}}" {{path/to/input_file}} {{path/to/output_file}}