Module Namespaces
Caddy guest modules are loaded generically as interface{} or any types. In order for the host modules to be able to use them, the loaded guest modules are usually type-asserted to a known type first. This page describes the mapping from module namespaces to Go types for all the standard modules.
Documentation for non-standard module namespaces can be found with the documentation for the host module that defines them.
| Namespace | Expected Interface Type | Description | Notes |
|---|---|---|---|
caddy.App | Caddy app | ||
| admin.api |
caddy.AdminRoutercaddy.AdminHandler
| Registers HTTP routes for admin HTTP handler middleware | |
| caddy.config_loaders | caddy.ConfigLoader | Loads a config | ⚠️ Experimental |
| caddy.fs | fs.FS | Virtual file system | ⚠️ Experimental |
| caddy.listeners | caddy.ListenerWrapper | Wrap network listeners | |
| caddy.logging.encoders | zapcore.Encoder | Log entry encoder | |
| caddy.logging.encoders.filter | logging.LogFieldFilter | Log field filter | |
| caddy.logging.writers | caddy.WriterOpener | Log writers | |
| caddy.storage | caddy.StorageConverter | Storage backends | |
| dns.providers | certmagic.DNSProvider | DNS challenge solver | |
| events.handlers | caddyevents.Handler | Event handlers | ⚠️ Experimental |
| http.authentication.hashes |
caddyauth.Comparercaddyauth.Hasher
| Password comparers Password hashers | |
| http.authentication.providers | caddyauth.Authenticator | HTTP authentication providers | |
| http.encoders |
encode.Encodingencode.Encoder
| Creates an encoder (compression) Encodes a data stream | |
| http.handlers | caddyhttp.MiddlewareHandler | HTTP handlers | |
| http.ip_sources | caddyhttp.IPRangeSource | IP ranges for trusted proxies | |
| http.matchers |
caddyhttp.RequestMatchercaddyhttp.CELLibraryProducer
| HTTP request matchers Support for CEL expressions |
(Optional) |
| http.precompressed | encode.Precompressed | Supported precompress mappings | |
| http.reverse_proxy.circuit_breakers | reverseproxy.CircuitBreaker | Reverse proxy circuit breakers | |
| http.reverse_proxy.selection_policies | reverseproxy.Selector | Load balancing selection policies | |
| http.reverse_proxy.transport | http.RoundTripper | HTTP reverse proxy transports | |
| http.reverse_proxy.upstreams | reverseproxy.UpstreamSource | Dynamic upstream source | ⚠️ Experimental |
| tls.ca_pool.source | caddytls.CA | Source of trusted root certs | |
| tls.certificates | caddytls.CertificateLoader | TLS certificate source | |
| tls.client_auth | caddytls.ClientCertificateVerifier | Verifies client certificates | |
| tls.ech.publishers | caddytls.ECHPublisher | Publishes Encrypted ClientHello (ECH) configurations | ⚠️ Experimental |
| tls.get_certificate | certmagic.Manager | TLS certificate manager | ⚠️ Experimental |
| tls.handshake_match | caddytls.ConnectionMatcher | TLS connection matcher | |
| tls.issuance | certmagic.Issuer | TLS certificate issuer | |
| tls.leaf_cert_loader | caddytls.LeafCertificateLoader | Loads trusted leaf certs | |
| tls.permission | caddytls.OnDemandPermission | Whether to obtain a cert for a domain | ⚠️ Experimental |
| tls.stek | caddytls.STEKProvider | TLS session ticket key source |
Namespaces marked as "Experimental" are subject to change. (Please develop with them so we can finalize their interfaces!)
© 2015-2025 Matthew Holt and The Caddy Authors
Licensed under the Apache License 2.0.
Caddy is a registered trademark of Stack Holdings GmbH.
https://caddyserver.com/docs/extending-caddy/namespaces