caddyserver/caddy · error

failed to get argon2id threads parameter: %w

Error message

failed to get argon2id threads parameter: %w

What it means

Error "failed to get argon2id threads parameter: %w" thrown in caddyserver/caddy.

Source

Thrown at modules/caddyhttp/caddyauth/command.go:159

	var hash []byte
	var hashString string
	switch algorithm {
	case bcryptName:
		hash, err = BcryptHash{cost: bcryptCost}.Hash(plaintext)
		hashString = string(hash)
	case argon2idName:
		time, err := fs.GetUint32("argon2id-time")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id time parameter: %w", err)
		}
		memory, err := fs.GetUint32("argon2id-memory")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id memory parameter: %w", err)
		}
		threads, err := fs.GetUint8("argon2id-threads")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id threads parameter: %w", err)
		}
		keyLen, err := fs.GetUint32("argon2id-keylen")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id keylen parameter: %w", err)
		}

		hash, _ = Argon2idHash{
			time:    time,
			memory:  memory,
			threads: threads,
			keyLen:  keyLen,
		}.Hash(plaintext)

		hashString = string(hash)
	default:
		return caddy.ExitCodeFailedStartup, fmt.Errorf("unrecognized hash algorithm: %s", algorithm)
	}
	if err != nil {

View on GitHub (pinned to 50e54ee279)

Solutions

  1. Pass a valid integer for the argon2id threads parameter, or omit the flag to use the default.

When it happens

Trigger: Thrown at modules/caddyhttp/caddyauth/command.go:159 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15). Data as JSON: /api/errors/28976c887c63a22a. Report an issue: GitHub.