clean-piano-39737
02/18/2025, 11:04 AMbrief-egg-61061
02/18/2025, 11:04 AMbrief-egg-61061
02/18/2025, 11:04 AMopenssl
command-line tool. Here's how you can generate secure secrets for each: For Ory Hydra: openssl rand -base64 32
This command will generate a 32-byte random string encoded in base64, which is suitable for Hydra's system secrets. You can use this for the secrets.system
configuration in Hydra. For Ory Kratos: openssl rand -base64 22
This command generates a secure key that you can use for Kratos' cookie and cipher secrets. For both Hydra and Kratos, you should generate unique secrets for each required field in their respective configurations. Make sure to keep these secrets secure and never share them publicly. After generating the secrets, you need to update the configuration files for each service. For Kratos, you would update the kratos.yml
file, replacing the placeholder secrets with your newly generated ones. For more detailed information on configuring secrets in Kratos, you can refer to the [Deploy to production](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#secure-secrets) guide. Remember to restart the services after updating the configuration files with the new secrets. [Deploy to production](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#secure-secrets) [Secret and Key Rotation](https://www.ory.sh/docs/kratos/guides/secret-key-rotation)