HUB
Sign inSign up
caddyui-caddy logo

applegater/caddyui-caddy

By applegater

•Updated about 9 hours ago

Caddy with DNS-01 providers, CrowdSec, rate limiting and layer4 — the companion image for CaddyUI.

Image
0

10K+

applegater/caddyui-caddy repository overview

⁠CaddyUI Caddy

A prebuilt Caddy⁠ for use with CaddyUI⁠: stock Caddy plus the modules CaddyUI's features need, so you don't have to build one with xcaddy yourself. Multi-arch: linux/amd64 and linux/arm64. Built from Dockerfile.caddy⁠ in the CaddyUI repository.

⁠What's included

ModuleUsed for
caddy-dns⁠ — Cloudflare, Porkbun, Namecheap, GoDaddy, DigitalOcean, Hetzner, Route 53, GandiACME DNS-01 challenges and wildcard certificates, and CaddyUI's managed DNS
caddy-crowdsec-bouncer⁠ (HTTP)CrowdSec IP blocking
caddy-ratelimit⁠CaddyUI's per-host rate limiting
caddy-l4⁠TCP/UDP routing, and sharing port 443/80 with other protocols (CaddyUI's Layer4 proxies)
coraza-caddy⁠Coraza web application firewall with the OWASP Core Rule Set (CaddyUI's middleware profiles, v2.61.0+)

The base is the official caddy:alpine image; the current build ships Caddy 2.11.9.

⁠Tags

TagMeaning
:vX.Y.ZThe CaddyUI release that last changed this image: its module set, Caddy version or a security fix. Recommended for production.
:vX.Y.Z-pNBase-layer refresh N of that release — same Caddy build, newer Alpine layer. Immutable.
:stableThe newest build, i.e. the highest -pN of the newest vX.Y.Z.
:latestKept in lockstep with :stable.

The image is not rebuilt on every CaddyUI release — only when its modules, Caddy version or security fixes change — so a plugin never changes under you silently.

⁠Base-layer refreshes: :vX.Y.Z-pN

This image's final stage runs apk upgrade --no-cache, so it ships Alpine security fixes the upstream caddy:*-alpine base has not been rebuilt for yet. Those fixes only reach you when something rebuilds the image — and a release rebuilds it only when Dockerfile.caddy changes, which is the right rule for the plugin set but lets the OS layer go stale between releases.

A scheduled job therefore rebuilds and re-scans this image weekly. When a rebuild closes vulnerabilities and introduces none, it is published as :vX.Y.Z-pN, and :stable/:latest move to it.

-pN means exactly one thing: only the base OS layer moved. v2.68.8-p3 is v2.68.8's Caddy build on a newer Alpine layer — no Caddy upgrade, no plugin change, nothing to re-test at the application level. N counts up from 1 and is never reused.

That is enforced, not assumed: before publishing, the pipeline diffs caddy list-modules --versions between the published image and the rebuild and refuses to publish on any difference. This matters because several plugin versions here are deliberately unpinned, so a rebuild could otherwise pick up a new DNS provider or WAF release; a plugin change has to go through a normal release instead, where it gets a version number and a CHANGELOG entry. You can check it yourself:

docker run --rm --entrypoint /usr/bin/caddy applegater/caddyui-caddy:stable list-modules --versions

Because apk upgrade is unpinned — that is how the image picks up fixes at all — two builds of the same source a week apart produce different images. So a tag names exactly one artifact and :vX.Y.Z-pN never changes under you, but the image is not bit-for-bit rebuildable from Dockerfile.caddy alone. Pin a digest if you need byte-level certainty:

image: applegater/caddyui-caddy:v2.68.8-p2
# or, strictest:
image: applegater/caddyui-caddy@sha256:…

Every refresh is gated on a human review before it is published, and a rebuild that introduces a vulnerability — or that changes the Caddy module set — is blocked rather than shipped.

⁠Quick start

services:
  caddy:
    image: applegater/caddyui-caddy:stable
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
      - "127.0.0.1:2019:2019"   # admin API — keep it private
    volumes:
      - caddy_data:/data
      - caddy_config:/config
volumes:
  caddy_data:
  caddy_config:

Point CaddyUI at it with CADDY_ADMIN_URL=http://caddy:2019. See the CaddyUI image⁠ for the full compose stack.

Never expose the admin API (port 2019) to the internet — it can rewrite Caddy's whole configuration.

⁠Health check

The image has a HEALTHCHECK that probes Caddy's admin API at the address in CADDY_ADMIN (default localhost:2019; a wildcard such as 0.0.0.0:2019 is probed on 127.0.0.1, and unix/<path> over the socket). It requests /metrics, the admin route Caddy logs at debug level, so the probe adds no lines to the container log. An admin address set in your Caddy config rather than in CADDY_ADMIN is still reached when it is a wildcard or loopback address on port 2019 (e.g. admin 0.0.0.0:2019). The container reads unhealthy if the config moves the admin API somewhere else (a specific IP, another port, a unix socket), turns it off (admin off), or enforces origins (enforce_origin, or origins on a non-wildcard listener); disable the check for that container with healthcheck: { disable: true }. The probe ignores proxy variables (--noproxy "*").

⁠Running as non-root

The image runs Caddy as root by default so existing root-owned volumes keep working on upgrade. The binary carries cap_net_bind_service, so it also runs as any other uid once that uid owns /data and /config — see SECURITY.md⁠ → Why the Caddy image runs as root.

Tag summary
Recent tags
Content type
Image
Digest
sha256:c5d27fc52…
Size
49.2 MB
Last updated
about 9 hours ago
docker pull applegater/caddyui-caddy:latest