Caddy(8) Caddy(8)

# [NAME](#NAME)

caddy-hash-password - Hashes a password and writes base64

# [SYNOPSIS](#SYNOPSIS)

**caddy hash-password \[--plaintext ] \[--algorithm ] \[--bcrypt-cost ] \[--argon2id-time ] \[--argon2id-memory ] \[--argon2id-threads ] \[--argon2id-keylen ] \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Convenient way to hash a plaintext password. The resulting hash is written to stdout as a base64 string.

--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.

--algorithm  
Selects the hashing algorithm. Valid options are:  
\* 'argon2id' (recommended for modern security)  
\* 'bcrypt' (legacy, slower, configurable cost)

bcrypt-specific parameters:

--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.

Argon2id-specific parameters:

--argon2id-time  
Number of iterations to perform. Increasing this makes  
hashing slower and more resistant to brute-force attacks.

--argon2id-memory  
Amount of memory to use during hashing.  
Larger values increase resistance to GPU/ASIC attacks.

--argon2id-threads  
Number of CPU threads to use. Increase for faster hashing  
on multi-core systems.

--argon2id-keylen  
Length of the resulting hash in bytes. Longer keys increase  
security but slightly increase storage size.

# [OPTIONS](#OPTIONS)

**-a**, **--algorithm**="bcrypt" Name of the hash algorithm

**--argon2id-keylen**=32 Length of the resulting Argon2id hash in bytes. Longer hashes increase security but slightly increase storage size.

**--argon2id-memory**=47104 Memory to use in KiB for Argon2id hashing. Larger values increase resistance to GPU/ASIC attacks.

**--argon2id-threads**=1 Number of CPU threads to use for Argon2id hashing. Increase for faster hashing on multi-core systems.

**--argon2id-time**=1 Number of iterations for Argon2id hashing. Increasing this makes the hash slower and more resistant to brute-force attacks.

**--bcrypt-cost**=14 Bcrypt hashing cost (only used with 'bcrypt' algorithm)

**-h**, **--help**\[=false] help for hash-password

**-p**, **--plaintext**="" The plaintext password

# [SEE ALSO](#SEE_ALSO)

[**caddy(8)**](/man/enterprise-packages/caddy/caddy.8)

# [HISTORY](#HISTORY)

21-Oct-2026 Auto generated by spf13/cobra

Oct 2026 Auto generated by spf13/cobra

---

Document: caddy-hash-password(8) from caddy 2.11.7-r5 (Chainguard OS)
Source: https://github.com/caddyserver/caddy
