
caddy
Provides the Caddy web server with automatic HTTPS, HTTP/2, and a simple declarative configuration model for serving and proxying web traffic.
What is caddy?
The caddy image provides Caddy, a modern, open-source web server written in Go that is best known for its automatic HTTPS capabilities. Caddy automatically obtains and renews TLS certificates from Let's Encrypt (or any ACME-compatible CA) with zero configuration, making it popular for quickly exposing services securely without manual certificate management.
Caddy is configured through a Caddyfile (a concise, human-readable format) or via its JSON API. It supports static file serving, reverse proxying, load balancing, HTTP/2 and HTTP/3, and middleware for logging, authentication, and compression. It is used by developers, small teams, and production environments where simplicity and automatic TLS are priorities.
How to use this image
Caddy listens on ports 80 and 443 by default and serves files from /usr/share/caddy.
Serve a static site:
Use a custom Caddyfile:
Example Caddyfile (reverse proxy with automatic HTTPS):
Example Caddyfile (static file server):
Compose stack with automatic HTTPS:
Reload config without restarting:
Image variants
caddy:latest
The default tag. Based on Alpine Linux. Includes the Caddy binary with the standard module set. Recommended for most use cases.
caddy:alpine
Explicitly Alpine-based. Functionally identical to latest but with an explicit base OS reference. Use when your pipeline validates base images explicitly.
caddy:<version>
Pinned version tags such as caddy:2.7.6. Use to lock to a specific Caddy release and avoid behavior changes from upstream updates.
caddy:<version>-alpine
Combines a pinned version with the Alpine base. The most reproducible option for production deployments.
caddy:builder
Includes the xcaddy build tool for compiling Caddy with custom plugins. Use this in a multi-stage Dockerfile build stage when you need modules not included in the standard image.
.avif)