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 support in Coolify

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.

The short version

Coolify can generate normal Caddy routes and automatic HTTPS settings. Advanced Caddy features may require changes to the proxy Docker Compose configuration, a custom Caddy image, or files under /data/coolify/proxy/caddy/dynamic/.


What Coolify manages

For a server using Caddy, Coolify:

  • runs the proxy as the coolify-proxy container
  • listens on ports 80 and 443, including HTTP/3 on UDP port 443
  • 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:

  1. On the server, go to Proxy > Configuration.

  2. Add the global options as caddy.* labels to the caddy service. 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
  3. 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.

Caddy and Traefik configuration are not interchangeable

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

On this page