caddyserver/caddy · error
loading storage module: %v
Error message
loading storage module: %v
What it means
StoragePool.Provision fails to load the nested storage module configured under `storage` in the `tls.ca_pool.source.storage` trust pool. ctx.LoadModule returned an error, typically an unknown module name or invalid module configuration inside the storage block.
Source
Thrown at modules/caddytls/capools.go:410
certs []*x509.Certificate
}
// CaddyModule implements caddy.Module.
func (StoragePool) CaddyModule() caddy.ModuleInfo {
return caddy.ModuleInfo{
ID: "tls.ca_pool.source.storage",
New: func() caddy.Module {
return new(StoragePool)
},
}
}
// Provision implements caddy.Provisioner.
func (ca *StoragePool) Provision(ctx caddy.Context) error {
if ca.StorageRaw != nil {
val, err := ctx.LoadModule(ca, "StorageRaw")
if err != nil {
return fmt.Errorf("loading storage module: %v", err)
}
cmStorage, err := val.(caddy.StorageConverter).CertMagicStorage()
if err != nil {
return fmt.Errorf("creating storage configuration: %v", err)
}
ca.storage = cmStorage
}
if ca.storage == nil {
ca.storage = ctx.Storage()
}
if len(ca.PEMKeys) == 0 {
return fmt.Errorf("no PEM keys specified")
}
caPool := x509.NewCertPool()
var certs []*x509.Certificate
for _, caID := range ca.PEMKeys {
bs, err := ca.storage.Load(ctx, caID)
if err != nil {View on GitHub (pinned to 50e54ee279)
Solutions
- Correct the storage module name inside the trust_pool storage block (e.g. `file_system`, `redis` if the plugin is installed).
- If the module comes from a plugin, rebuild Caddy with `xcaddy build --with <plugin>` so the module is registered.
- Run `caddy list-modules` to confirm the storage module ID exists in your build.
Example fix
# before
trust_pool storage {
storage file_ststem {
root /etc/caddy/certs
}
system_ca_pem path/to/roots.pem
}
# after
trust_pool storage {
storage file_system {
root /etc/caddy/certs
}
system_ca_pem path/to/roots.pem
} Defensive patterns
Strategy: validation
Validate before calling
// check the storage module id is registered before loading
if caddy.GetModuleID != nil { /* API varies; simplest check: */ }
// practical: run `caddy list-modules` and grep for the storage module, e.g.
// caddy list-modules | grep -w 'caddy.storage.file_system' Prevention
- Pin plugin versions in your xcaddy build and record them (e.g. commit the build command).
- Run `caddy list-modules` after every rebuild and diff against expectations in CI.
- Use `caddy validate` on config changes referencing storage modules.
When it happens
Trigger: Configuring `trust_pool storage { storage <module> {...} }` where <module> is not a registered caddy storage module (e.g. typo like `s3` when the module is uninstalled, or `file_system` misspelled), or where the module's own provisioning failed.
Common situations: Using a storage module provided by a plugin that is not compiled into the custom Caddy build; typoing the storage module name; version changes that renamed storage modules.
Related errors
- creating storage configuration: %v
- no PEM keys specified
- loading CA pool sources: %v
- WebSocket connections aren't allowed.
- Disabling same-origin restrictions is not allowed.
AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15).
Data as JSON: /api/errors/1dbde9406e7644e2.
Report an issue: GitHub.