{"record":{"id":"1766ac192c1af043","repo":"caddyserver/caddy","slug":"loading-tls-storage-module-s","errorCode":null,"errorMessage":"loading TLS storage module: %s","messagePattern":"loading TLS storage module: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/caddytls/distributedstek/distributedstek.go","lineNumber":78,"sourceCode":"}\n\n// CaddyModule returns the Caddy module information.\nfunc (Provider) CaddyModule() caddy.ModuleInfo {\n\treturn caddy.ModuleInfo{\n\t\tID:  \"tls.stek.distributed\",\n\t\tNew: func() caddy.Module { return new(Provider) },\n\t}\n}\n\n// Provision provisions s.\nfunc (s *Provider) Provision(ctx caddy.Context) error {\n\ts.ctx = ctx\n\n\t// unpack the storage module to use, if different from the default\n\tif s.Storage != nil {\n\t\tval, err := ctx.LoadModule(s, \"Storage\")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"loading TLS storage module: %s\", err)\n\t\t}\n\t\tcmStorage, err := val.(caddy.StorageConverter).CertMagicStorage()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating TLS storage configuration: %v\", err)\n\t\t}\n\t\ts.storage = cmStorage\n\t}\n\n\t// otherwise, use default storage\n\tif s.storage == nil {\n\t\ts.storage = ctx.Storage()\n\t}\n\n\treturn nil\n}\n\n// Initialize sets the configuration for s and returns the starting keys.\nfunc (s *Provider) Initialize(config *caddytls.SessionTicketService) ([][32]byte, error) {","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddytls/distributedstek/distributedstek.go#L60-L96","documentation":"The distributed STEK provider's Provision loads the optional custom storage module (Provider.Storage) via ctx.LoadModule; failure is wrapped as 'loading TLS storage module'. This happens when the configured storage module name is unknown or the module itself fails to provision.","triggerScenarios":"Configuring tls session ticket key encryption/distribution { storage <module> } in JSON where <module> is not a registered caddy storage module, or the storage module's own provisioning fails (bad options).","commonSituations":"Typos in the storage module name; referencing a Redis/S3/etc. storage plugin that is not compiled into the binary; storage module options that changed across versions.","solutions":["Confirm the storage module is built in: caddy list-modules | grep caddy.storage","Fix the module name/options in the distributed STEK config","If you need a plugin storage backend, rebuild with xcaddy: xcaddy build --with github.com/caddyserver/..."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// (shell) verify the storage module is compiled in before referencing it\ncaddy list-modules | grep '^caddy\\.storage\\.'","typeGuard":"// For storage plugins: guarantee the converter interface at compile time\nvar _ caddy.StorageConverter = (*MyStorage)(nil)","tryCatchPattern":"if err := caddy.Run(cfg); err != nil {\n\tif strings.Contains(err.Error(), \"loading TLS storage module\") {\n\t\t// usually an unknown module name or failing plugin provisioning\n\t\tlog.Printf(\"fix storage module config: %v\", err)\n\t}\n}","preventionTips":["Build the storage plugin into the binary explicitly: xcaddy build --with <module>","Validate config in CI where the same plugin set is installed","Pin plugin and core versions together in your build manifest"],"tags":["tls","stek","storage","module-system"],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}