skip to content
Just Change Direction

How to generate a secret from the command line

/ 1 min read

Quite frequently I need to generate a random secret for an env var or secret. However, I always forget the command and end up googling it. So here it is for future reference.

Terminal window
openssl rand -base64 32