Skip to content

Instantly share code, notes, and snippets.

@mgraupner
Last active February 13, 2023 10:26
Show Gist options
  • Save mgraupner/12d248d51c8473aa319120dbadeefbb8 to your computer and use it in GitHub Desktop.
Save mgraupner/12d248d51c8473aa319120dbadeefbb8 to your computer and use it in GitHub Desktop.
How to create a Caddy HTTP-BasicAuth password with docker
Replace "test" with your actual password:
docker run --rm caddy caddy hash-password --plaintext test
Afterwards the hashed password has to be base64 encoded (example for MacOS/Linux command line):
echo -n '$2a$14$IKXcpbxxxxxxxxViGObuL7TffDIl5Wxxxxxxxr3o4De4QNu' | base64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment