caddyserver/caddy · error
--input is required
Error message
--input is required
What it means
ECH Provision calls setConfigsFromStorage to load all persisted ECH configs from the 'ech/configs' storage prefix, and that load failed. This is the first read of ECH state after acquiring the exclusive 'ech_rotation' storage lock, so any storage List/Load failure surfaces here.
Source
Thrown at cmd/storagefuncs.go:72
var jsonError *json.SyntaxError
if errors.As(err, &jsonError) {
return nil, nil
}
return nil, err
}
return &tmpStruct, nil
}
func cmdImportStorage(fl Flags) (int, error) {
importStorageCmdConfigFlag := fl.String("config")
importStorageCmdImportFile := fl.String("input")
if importStorageCmdConfigFlag == "" {
return caddy.ExitCodeFailedStartup, errors.New("--config is required")
}
if importStorageCmdImportFile == "" {
return caddy.ExitCodeFailedStartup, errors.New("--input is required")
}
// extract storage from config if possible
storageCfg, err := determineStorage(importStorageCmdConfigFlag, "")
if err != nil {
return caddy.ExitCodeFailedStartup, err
}
// load specified storage or fallback to default
var stor certmagic.Storage
ctx, cancel := caddy.NewContext(caddy.Context{Context: context.Background()})
defer cancel()
if storageCfg != nil && storageCfg.StorageRaw != nil {
val, err := ctx.LoadModule(storageCfg, "StorageRaw")
if err != nil {
return caddy.ExitCodeFailedStartup, err
}
stor, err = val.(caddy.StorageConverter).CertMagicStorage()View on GitHub (pinned to 50e54ee279)
Solutions
- Check the wrapped error for the failing storage operation and backend.
- Restore storage availability/read access and restart Caddy so Provision retries.
- If local storage is corrupt, stop Caddy and remove the 'ech/configs' folder from the data directory — ECH configs will be regenerated (clients repick configs after DNS republish).
- Ensure the same storage backend is shared consistently across cluster instances.
Example fix
# before: unreadable ech data sudo ls /var/lib/caddy/ech/configs # after: reset ech state to force regeneration systemctl stop caddy && rm -rf /var/lib/caddy/ech/configs && systemctl start caddy
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight storage readability for ECH state:
keys, err := storage.List(ctx, "ech/configs", false)
if err != nil { return fmt.Errorf("ech storage unreadable: %w", err) } Try / catch
Fail startup loudly (the error already aborts TLS app provisioning), fix storage, restart; transient backend errors clear on retry.
Prevention
- Keep the ech/configs prefix inside Caddy-managed storage only.
- Monitor storage backend health before planned restarts.
- Snapshot/reset ech state deliberately when migrating storage backends.
When it happens
Trigger: storage.List(ctx, "ech/configs", false) or a subsequent per-config load fails: backend unavailable, permission denied, or one of the nested loads returned an unexpected error (the cleanup path in loadECHConfig already swallows per-config problems, so this is usually the List itself or a hard load failure).
Common situations: Remote storage outage at startup; data directory not readable; storage schema left in a bad state after an interrupted rotation; permissions changed under a running deployment.
Related errors
- --output is required
- cannot reuse socket %v: unix socket is already in use by ano
- protocol argument was not a string
- %s is invalid policy
- ErrInvalidSplitPath
AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15).
Data as JSON: /api/errors/0b67a441357f6901.
Report an issue: GitHub.