Caddy overview
Caddy is an integrated proxy alternative to Traefik. Coolify runs lucaslorentz/caddy-docker-proxy, generates Caddy labels for resource domains, and stores Caddy configuration and certificate data on the selected server.
Caddy is supported, but Traefik is the default and the proxy used by the Coolify core team in production. As a result, Traefik has broader documentation and support coverage. Choose Caddy if you are familiar with it or need a Caddy-specific feature.
What Coolify manages
For a server using Caddy, Coolify:
- runs the proxy as the
coolify-proxycontainer - listens on ports
80and443, including HTTP/3 on UDP port443 - generates Caddy Docker labels for application and service domains
- stores the main configuration at
/data/coolify/proxy/caddy/docker-compose.yml - stores dynamic Caddy snippets under
/data/coolify/proxy/caddy/dynamic/ - reloads Caddy after dynamic configuration changes made in the dashboard
The proxy imports *.caddy files from its dynamic directory. Coolify-generated files such as Caddyfile, coolify.caddy, and the default request handler are shown as read-only in the dashboard.
Coolify writes the Caddyfile again each time the proxy starts. Do not edit it manually. When Caddy rejects a dynamic file that you save in the dashboard, Coolify keeps the previous version of the file.
Global options and access logs
Caddy reads global options only from the first block of the Caddyfile. Dynamic files are imported after other blocks, so you cannot put global options in a dynamic file. Add them as labels of the proxy container instead:
-
On the server, go to
Proxy>Configuration. -
Add the global options as
caddy.*labels to thecaddyservice. Each label is one option. Nested options use dots:labels: - coolify.managed=true - coolify.proxy=true - caddy.email=admin@example.com - caddy.log.output=stdout - caddy.log.format=console -
Restart the proxy.
The global log option configures the Caddy logs, but it does not turn on access logs. To log the requests of a resource, add a log directive to its site with a label on the resource, for example caddy_0.log.output=stdout. Then redeploy the resource.
Switching proxies replaces the proxy type and default configuration. Recreate custom routing in Caddy syntax and redeploy resources so their Caddy labels are applied.
Configure Caddy
Basic authentication
Protect an application with Coolify-managed credentials or Caddy labels.
Custom SSL certificates
Mount your certificate and private key and configure TLS on an existing Caddy route.
DNS challenge
Build a Caddy image with a DNS provider module and configure DNS-based certificate validation.
