.nh .TH "Caddy" "8" "Oct 2026" "Auto generated by spf13/cobra" "" .SH NAME caddy-hash-password - Hashes a password and writes base64 .SH SYNOPSIS \fBcaddy hash-password [--plaintext ] [--algorithm ] [--bcrypt-cost ] [--argon2id-time ] [--argon2id-memory ] [--argon2id-threads ] [--argon2id-keylen ] [flags]\fP .SH DESCRIPTION Convenient way to hash a plaintext password. The resulting hash is written to stdout as a base64 string. .PP --plaintext The password to hash. If omitted, it will be read from stdin. If Caddy is attached to a controlling TTY, the input will not be echoed. .PP --algorithm Selects the hashing algorithm. Valid options are: * 'argon2id' (recommended for modern security) * 'bcrypt' (legacy, slower, configurable cost) .PP bcrypt-specific parameters: .PP --bcrypt-cost Sets the bcrypt hashing difficulty. Higher values increase security by making the hash computation slower and more CPU-intensive. Must be within the valid range [bcrypt.MinCost, bcrypt.MaxCost]. If omitted or invalid, the default cost is used. .PP Argon2id-specific parameters: .PP --argon2id-time Number of iterations to perform. Increasing this makes hashing slower and more resistant to brute-force attacks. .PP --argon2id-memory Amount of memory to use during hashing. Larger values increase resistance to GPU/ASIC attacks. .PP --argon2id-threads Number of CPU threads to use. Increase for faster hashing on multi-core systems. .PP --argon2id-keylen Length of the resulting hash in bytes. Longer keys increase security but slightly increase storage size. .SH OPTIONS \fB-a\fP, \fB--algorithm\fP="bcrypt" Name of the hash algorithm .PP \fB--argon2id-keylen\fP=32 Length of the resulting Argon2id hash in bytes. Longer hashes increase security but slightly increase storage size. .PP \fB--argon2id-memory\fP=47104 Memory to use in KiB for Argon2id hashing. Larger values increase resistance to GPU/ASIC attacks. .PP \fB--argon2id-threads\fP=1 Number of CPU threads to use for Argon2id hashing. Increase for faster hashing on multi-core systems. .PP \fB--argon2id-time\fP=1 Number of iterations for Argon2id hashing. Increasing this makes the hash slower and more resistant to brute-force attacks. .PP \fB--bcrypt-cost\fP=14 Bcrypt hashing cost (only used with 'bcrypt' algorithm) .PP \fB-h\fP, \fB--help\fP[=false] help for hash-password .PP \fB-p\fP, \fB--plaintext\fP="" The plaintext password .SH SEE ALSO \fBcaddy(8)\fP .SH HISTORY 5-Oct-2026 Auto generated by spf13/cobra