Caddy-Modular

Caddy-Modular

Docker app from Jelle's Repository

Overview

This container builds and runs the latest version of Caddy with the specified modules included. This allows you to run Caddy with any of the modules available here: https://caddyserver.com/docs/modules. For when you want to: * Use your own DNS provider for the DNS TLS-ALPN challenge * DuckDNS * Cloudflare * Hetzner * And many more... * Use a different storage backend * Redis * MySQL * Postgres * Use other authentication providers * Discord * JWT * LDAP * OAuth 2.0 * Set up caching * Redis * Integrate security enhancements * Fail2Ban * Crowdsec * Geoblocking * Block bots and crawlers * Collect metrics * Prometheus * Umami * Run caddy with your own custom modules * Or use any of the other registered caddy modules * https://caddyserver.com/docs/modules * Based on the latest official alpine caddy builder image. Planned Features: * Storing the build binary to speed up restarts

Caddy-Modular

This container builds and runs the latest version of Caddy with the specified modules included.
This allows you to run Caddy with any of the modules available here: https://caddyserver.com/docs/modules.

Usecases

For when you want to:

  • Use your own DNS provider for the DNS challenge
    • DuckDNS
    • Cloudflare
    • Hetzner
    • And many more...
  • Use a different storage backend
    • Redis
    • MySQL
    • Postgres
  • Use other authentication providers
    • Discord
    • JWT
    • LDAP
    • OAuth 2.0
  • Set up caching
    • Redis
  • Integrate security enhancements
    • Fail2Ban
    • Crowdsec
    • Geoblocking
    • Block bots and crawlers
  • Collect metrics
    • Prometheus
    • Umami
  • Run caddy with your own custom modules
  • Or use any of the other registered caddy modules

Tutorials

This section is incomplete. You can help by submitting your own tutorials as a pull request.

List of tutorials to help you get started. All tutorials assume you are running this container on unraid 7 or higher.

Requirements

Example Caddyfile is created on first run and can be found at appdata location.
Check the ReadMe for tutorials.
Default port assignment can conflict with unraid WebUI.
Caddy cannot perform TLS challenges on ports other than 80 and 443.
The unraid WebUI port settings can be changed at Settings/Management Access.

Related apps

Details

Repository
ghcr.io/snellejelle99/caddy-modular
Last Updated2026-10-16
First Seen2026-06-03

Runtime arguments

Network
bridge
Shell
sh
Privileged
false
Extra Params
--cap-add=NET_ADMIN

Template configuration

Appdata and CaddyfilePathrw
Target
/etc/caddy
Default
/mnt/user/appdata/caddy-modular/
Value
/mnt/user/appdata/caddy-modular/
HTTP 80Porttcp

Default http port. Needs to be externally accessible to use the http challenge. Remove this port for extra security if you do not use http or the http challenge.

Target
80
Default
80
Value
80
TLS 443Porttcp

Default https port. Needs to be externally accessible to use the TLS-ALPN challenge. See the DNS challenge tutorial on github if you cannot or don't want to forward any ports on your router.

Target
443
Default
443
Value
443
HTTP/3 portPortudp

Http/3 port. Http/3 applications need this to port to use QUICK over udp.

Target
443
Default
443
Value
443
Admin API portPorttcp
Target
2019
Default
2019
Value
2019
Variable: CADDY_MODULESVariable{3}

List of caddy modules you want installed. Example: --with {module_url1} --with {module_url2}

Target
CADDY_MODULES
Default
--with github.com/caddy-dns/duckdns --with github.com/caddy-dns/hetzner/v2 --with github.com/caddy-dns/cloudflare
Variable: CADDY_VERSION_OVERRIDEVariable{3}

Lock caddy build to specific version or branch. WARNING: this can cause your caddy to stop automatically updating. Only set this when you know what you are doing

Target
CADDY_VERSION_OVERRIDE
Variable: DNS_API_TOKENVariable{3}

Your dns providers API token for automatic TLS certificate issuance and renewal.

Target
DNS_API_TOKEN
Variable: CADDY_KEEP_BUILD_CACHEVariable{3}

Set to 0 to clean the build cache after building to save some disk space. This will slow down restarts. Not advised if you have slow internet or a slow CPU

Target
CADDY_KEEP_BUILD_CACHE
Default
1