caddy-docker-proxy with Docker: Caddy Configured by Your Container Labels (Linux, Windows, Mac)
Before you start
- 19 min read
Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#
caddy-docker-proxy is a free Caddy build that reads the labels on your Docker containers and writes the Caddy configuration for you, so you add an app by giving it two labels instead of editing a Caddyfile.
Logo: the official Caddy project (caddyserver.com). caddy-docker-proxy has no logo of its own, so we show the logo of Caddy, the web server it extends. The Caddy website repository states no licence for this artwork.
You start the proxy once. After that, every container with a caddy= label gets a site, a certificate and a route, and a stopped container loses its site, with no reload by hand. It builds on our Caddy guide: same Caddy, but the sites come from labels. It suits a homelab with many small containers.
| What | Value (official sources, read 3 December 2026) |
|---|---|
| Current version | v2.13.1, released 2 July 2026 (previous: v2.13.0, 29 June 2026) |
| Image to pin | lucaslorentz/caddy-docker-proxy:2.13.1-alpine (tag checked on Docker Hub; amd64, arm64, arm; about 24 MB compressed for amd64) |
| Built on | Caddy 2.11.4 (from go.mod at the release tag) |
| Time needed | About 30 minutes (our estimate, not measured) |
| Ports | TCP 80, TCP 443, UDP 443 (HTTP/3). Port 2019 (admin) stays inside the container |
| Licence | MIT (LICENSE at the release tag) |
| Official docs | The README is the documentation |
At a glance:
- Two kinds of certificate: a local one (
tls internal) for names that exist only at home, and Let's Encrypt for a public domain. Both are automatic. - It reads the Docker socket: unlike plain Caddy, it needs Docker access. That is the price of labels (see Security).
- The one thing to get right: proxy and apps share one Docker network, whose real name goes in
CADDY_INGRESS_NETWORKS. - Pin the tag:
2.13.1-alpine. The README's example usesci-alpine, a development build. - Compared with: Traefik and nginx-proxy (table below).
How it fits together#
Docker knows every container and its labels. caddy-docker-proxy listens to Docker through the socket, builds a Caddyfile from the labels, and gives it to Caddy, which serves ports 80 and 443 and forwards each request to the right app over a shared network.
Drawn for this guide from the official README.
Two terms: an upstream is the address Caddy forwards to ({{upstreams 80}} fills in the container's address and port 80), and the ingress network is the Docker network the proxy uses to reach apps.
Before you start#
Note: every domain and e-mail on this page is a dummy (
example.com,home.arpa,[email protected]). Replace them with your own.
| System | What to have |
|---|---|
| Linux | Docker Engine and the Compose plugin, ports 80 and 443 free |
| Windows | Windows 10 or later, Docker Desktop (WSL 2 backend), PowerShell |
| Mac | Docker Desktop, Intel or Apple Silicon |
docker --version docker compose version
Checklist:
- [ ] Both commands print a version
- [ ] Ports 80 and 443 are free (no other web server or proxy on them)
- [ ] For a public domain only: a domain, an A record pointing at your public IP, and ports 80 and 443 forwarded to this machine
- [ ] Config backed up, if you already run Caddy or Traefik
Tested by DIY Lab Hub: not yet. Commands come from the README and example files at tag v2.13.1, read on 3 December 2026. We did not run them on Linux, Windows or Mac, so we show no real output.
Tip: Read the README at the tag you install. The main branch is 17 commits ahead of v2.13.1 and has a template function the release lacks.
Step 1: Create the folders and the Docker network#
Everything lives under ~/docker_volumes/caddy-docker-proxy. data holds certificates and Caddy's local certificate authority. Without a persistent /data, Caddy asks for new certificates at every restart and can hit Let's Encrypt's limits (README).
Linux#
mkdir -p ~/docker_volumes/caddy-docker-proxy/{data,config,logs,backups}
cd ~/docker_volumes/caddy-docker-proxy
docker network create caddy
Windows (PowerShell)#
$base = "$HOME\docker_volumes\caddy-docker-proxy"
foreach ($d in "data","config","logs","backups") {
New-Item -ItemType Directory -Force "$base\$d" | Out-Null
}
Set-Location $base
docker network create caddy
Mac (Terminal)#
Same commands as Linux.
The official quick start adds --ipv6; without it, apps see Docker's gateway address instead of the real address of IPv6 visitors. Add it if your host uses IPv6 on purpose.
Check it worked. docker network ls --filter name=caddy lists a network named exactly caddy. An "already exists" error from network create is harmless.
Step 2: Write the Compose file for the proxy#
The README example uses ci-alpine and no :ro. We pin the release, add :ro as a small extra safety, and keep data in the Step 1 folders. caddy.email has no site label, so it becomes a global option: the contact address for certificates (a dummy here).
Linux#
cd ~/docker_volumes/caddy-docker-proxy
cat > compose.yaml << 'EOF'
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:2.13.1-alpine
container_name: caddy
restart: unless-stopped
ports:
- "80:80/tcp"
- "443:443/tcp"
- "443:443/udp"
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data:/data
- ./config:/config
labels:
caddy.email: [email protected]
networks:
caddy:
external: true
EOF
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\caddy-docker-proxy"
@'
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:2.13.1-alpine
container_name: caddy
restart: unless-stopped
ports:
- "80:80/tcp"
- "443:443/tcp"
- "443:443/udp"
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data:/data
- ./config:/config
labels:
caddy.email: [email protected]
networks:
caddy:
external: true
'@ | Set-Content -Encoding ascii compose.yaml
Mac (Terminal)#
Same commands as Linux.
The lines that matter:
| Line | Why |
|---|---|
2.13.1-alpine | Full version, no surprise updates. The default image has no shell; the -alpine one has cat and curl |
CADDY_INGRESS_NETWORKS=caddy | Must be the real network name |
external: true | The network from Step 1, shared with other projects. Its name stays exactly caddy, with no project prefix |
...docker.sock:ro | How the proxy sees containers. :ro does not make the Docker API read-only (see Security) |
./data:/data | Certificates and the local CA. Never skip it |
caddy.email | A global option. Never add a caddy= site label to this container, or the email lands inside that site |
Check it worked. docker compose config -q prints nothing when the file is valid.
We did not run this on Docker Desktop (Windows, Mac). Mounting /var/run/docker.sock is the documented way and Docker Desktop provides it inside its Linux VM. If saving files in data fails, use a named volume instead of ./data.
Step 3: Start the proxy and read the log#
Linux#
cd ~/docker_volumes/caddy-docker-proxy docker compose up -d docker compose ps docker compose logs --tail=50 caddy
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\caddy-docker-proxy" docker compose up -d docker compose ps docker compose logs --tail=50 caddy
Mac (Terminal)#
Same commands as Linux.
We cannot show real output. Caddy logs JSON; lines in the project's issue reports look like {"level":"info",...,"logger":"docker-proxy","msg":"Running caddy proxy controller"} (an older release). Since v2.13.0, CADDY_DOCKER_LOG_FORMAT=console and CADDY_DOCKER_LOG_LEVEL=INFO give a calmer log.
Check it worked. docker compose ps shows caddy running, and the log has no error line. With no labelled app yet, the generated Caddyfile holds only the global email option and Caddy serves no site. That is normal.
Step 4: Add your first app with two labels (local HTTPS)#
traefik/whoami is a tiny test server that prints the request it gets. It has no ports:: only the proxy is reachable. We use a made-up local name, whoami.home.arpa, and tls internal, so Caddy signs the certificate itself.
Linux#
mkdir -p ~/docker_volumes/whoami && cd ~/docker_volumes/whoami
cat > compose.yaml << 'EOF'
services:
whoami:
image: traefik/whoami:v1.12.0
container_name: whoami
restart: unless-stopped
networks:
- caddy
labels:
caddy: whoami.home.arpa
caddy.reverse_proxy: "{{upstreams 80}}"
caddy.tls: internal
networks:
caddy:
external: true
EOF
docker compose up -d
Windows (PowerShell)#
New-Item -ItemType Directory -Force "$HOME\docker_volumes\whoami" | Out-Null
Set-Location "$HOME\docker_volumes\whoami"
@'
services:
whoami:
image: traefik/whoami:v1.12.0
container_name: whoami
restart: unless-stopped
networks:
- caddy
labels:
caddy: whoami.home.arpa
caddy.reverse_proxy: "{{upstreams 80}}"
caddy.tls: internal
networks:
caddy:
external: true
'@ | Set-Content -Encoding ascii compose.yaml
docker compose up -d
Mac (Terminal)#
Same commands as Linux.
The labels: caddy is the site name, caddy.reverse_proxy sends traffic to the container ({{upstreams 80}} is its address on the caddy network plus port 80, the port inside the container), and caddy.tls: internal picks Caddy's own certificate authority. In YAML, a value that starts with {{ must be quoted.
Test it without a hosts file. --resolve gives curl the address for the name, and -k accepts the not-yet-trusted certificate:
curl -k --resolve whoami.home.arpa:443:127.0.0.1 https://whoami.home.arpa/
On Windows use curl.exe (PowerShell's curl is another command). The form comes from the README.
Check it worked. whoami answers in plain text (its README: request and network information). To see what Caddy built, run docker compose exec caddy cat /config/caddy/Caddyfile.autosave in the proxy folder. Expect this shape (from the README; the address differs):
whoami.home.arpa {
reverse_proxy <container-address>:80
tls internal
}
Tip:
docker compose up -din the app's folder is what applies a changed label. Editing the file alone changes nothing.
Step 5: Trust Caddy's local certificate#
With tls internal, devices warn until they trust Caddy's root certificate. Trust it only on devices you own. These are the commands from our Caddy guide, which also covers Firefox, Chrome and phones. Skip this step for public domains.
Linux#
Debian and Ubuntu style systems:
cd ~/docker_volumes/caddy-docker-proxy docker compose cp caddy:/data/caddy/pki/authorities/local/root.crt /tmp/caddy-root.crt sudo cp /tmp/caddy-root.crt /usr/local/share/ca-certificates/caddy-local-root.crt sudo update-ca-certificates echo "127.0.0.1 whoami.home.arpa" | sudo tee -a /etc/hosts
Windows (PowerShell)#
Run PowerShell as administrator:
Set-Location "$HOME\docker_volumes\caddy-docker-proxy" docker compose cp caddy:/data/caddy/pki/authorities/local/root.crt "$env:TEMP\caddy-root.crt" certutil -addstore -f "ROOT" "$env:TEMP\caddy-root.crt" Add-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Value "127.0.0.1 whoami.home.arpa"
Mac (Terminal)#
cd ~/docker_volumes/caddy-docker-proxy docker compose cp caddy:/data/caddy/pki/authorities/local/root.crt /tmp/caddy-root.crt sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/caddy-root.crt echo "127.0.0.1 whoami.home.arpa" | sudo tee -a /etc/hosts
The last line lets this machine find the name. For other devices, add a home DNS record pointing at the proxy machine.
Check it worked. curl -I https://whoami.home.arpa/ works without -k (Windows: curl.exe), and the browser shows a padlock.
Step 6: Switch an app to a public domain (Let's Encrypt)#
A public name needs no tls label: with DNS, open ports 80 and 443 and a persistent /data, Caddy gets and renews the certificate itself. Create an A record whoami.example.com (a dummy) at your public IP and forward TCP 80 and 443 here. If your provider blocks port 80 or shares one address between customers, a public certificate cannot work; use tls internal.
Change the labels in the app's compose.yaml. The staging line (from the project's example) is Let's Encrypt's test server, so a mistake cannot lock you out:
labels:
caddy: whoami.example.com
caddy.reverse_proxy: "{{upstreams 80}}"
caddy.tls.ca: https://acme-staging-v02.api.letsencrypt.org/directory
Linux#
cd ~/docker_volumes/whoami docker compose up -d sudo ufw allow 80/tcp && sudo ufw allow 443/tcp && sudo ufw allow 443/udp
ufw is one example firewall; use yours.
Windows (PowerShell)#
Run as administrator. This is a standard Windows command, not from the Caddy docs:
Set-Location "$HOME\docker_volumes\whoami" docker compose up -d New-NetFirewallRule -DisplayName "Caddy HTTP and HTTPS" -Direction Inbound -Protocol TCP -LocalPort 80,443 -Action Allow
Mac (Terminal)#
cd ~/docker_volumes/whoami docker compose up -d
Router forwarding is the same. macOS asks once whether Docker may accept incoming connections; allow it. A sleeping laptop is a poor public server.
Check it worked. From outside your network, curl -k -I https://whoami.example.com/ (Windows: curl.exe) answers over HTTPS; -k because staging certificates are untrusted. Then delete the caddy.tls.ca line, run docker compose up -d, and curl -I without -k must succeed.
Tip: Test every new public domain on staging first. The README's examples warn: remove the line only when verified, "otherwise you risk being rate limited".
Label cheat sheet#
Every label starting with caddy becomes Caddyfile text (README, v2.13.1):
| You write | Caddy gets |
|---|---|
caddy: example.com, example.org | One site block for both names, a certificate each |
caddy.respond: / "Hello World" 200 | A directive: key = name, value = arguments |
caddy.directive.subdirA: valueA | A dot means nesting: directive { subdirA valueA } |
caddy: (encode) | A snippet (parentheses), not a site |
caddy_0, caddy_1 | Separate blocks inside one container |
caddy.route_0.a, caddy.1_bbb | A _number suffix keeps directives apart; a number_ prefix sets their order |
caddy.email: [email protected] (no site label) | A global option |
Directives from labels are sorted alphabetically, then Caddy applies its own order. Template variants: {{upstreams}}, {{upstreams https}}, {{upstreams 8080}}, {{upstreams http 8080}}. A label caddy_ingress_network: <name> overrides the network per app.
A snippet that several apps share (our reading: all labels merge into one Caddyfile; the README shows snippets only inside one container, and we did not test across containers):
# on the proxy container
labels:
caddy_0: (lan_tls)
caddy_0.tls: internal
# on an app
labels:
caddy: app.home.arpa
caddy.import: lan_tls
caddy.reverse_proxy: "{{upstreams 3000}}"
Environment variables worth knowing (each is also a flag): CADDY_INGRESS_NETWORKS (the README recommends setting it, because automatic detection fails in some setups), CADDY_DOCKER_CADDYFILE_PATH (a base Caddyfile of your own), CADDY_DOCKER_LABEL_PREFIX (default caddy), CADDY_DOCKER_POLLING_INTERVAL (default 30 s), CADDY_DOCKER_PROCESS_CADDYFILE (default true: invalid sites are removed instead of breaking everything) and CADDY_ADMIN (address or off).
Put it behind HTTPS (with or without Traefik)#
This page is the "without Traefik" route: caddy-docker-proxy gives automatic HTTPS from Step 4 or Step 6 and replaces the Traefik you would otherwise run. Never run both on ports 80 and 443. Versions read 3 December 2026:
| caddy-docker-proxy | Traefik | nginx-proxy | |
|---|---|---|---|
| Version | v2.13.1 (2 July 2026) | v3.8.0 (23 Nov 2026) | 1.11.8 (27 Nov 2026) |
| Configured by | Labels | Labels | VIRTUAL_HOST variables |
| HTTPS | Built in | Certificate resolver you set up | Separate acme-companion container |
| Docker socket | Yes | Yes | Yes (:ro in its README) |
| Best for | Few lines per app | Many rules and middlewares | People who know nginx |
All three are MIT licensed.
With Traefik#
If Traefik already runs for you, keep it. The same app with Traefik labels (external network proxy, entrypoint https, resolver le, as in our Traefik guide):
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.whoami.rule=Host(`whoami.example.com`)"
- "traefik.http.routers.whoami.entrypoints=https"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=le"
Traefik needs the entrypoint, router and resolver named in labels; caddy-docker-proxy needs the site name and {{upstreams <port>}}.
Without Traefik: Caddy#
Use Steps 1 to 6. The site block it generates is what you would write by hand: whoami.example.com { reverse_proxy <container-address>:80 }. To keep the Docker socket out of your proxy, use plain Caddy with a hand-written Caddyfile: see our Caddy guide.
Security and testing#
| Control | How |
|---|---|
| Docker socket | The proxy needs it. Docker's security docs treat daemon access as powerful. :ro protects only the socket file, not the commands sent through it. Mount it only here |
| Socket proxy | A TCP address is possible (DOCKER_HOST, CADDY_DOCKER_SOCKETS), but the project has no recipe: pull request 826 is open and the maintainer asked how it beats trusting this container. We did not test it; the general method is in our docker-socket-proxy guide |
| Image | The default image has no shell; the maintainer recommended it for security in issue 20. Cost: no cat inside |
| Labels | Anyone who can start a labelled container on the shared network can add a site (our reading). Share caddy only with containers you run |
| Ports | Apps publish none; port 2019 stays closed. Never publish it |
| Logins | Caddy knows no users: use the app's login, basic_auth or single sign-on |
| Secrets | Tokens in a .env with chmod 600, never in labels (docker inspect shows labels) |
| Root key | data/caddy/pki holds your local CA key. Keep data private |
Quick tests after each change (Windows: curl.exe):
cd ~/docker_volumes/caddy-docker-proxy docker compose ps docker compose logs caddy --tail 100 docker compose exec caddy cat /config/caddy/Caddyfile.autosave curl -I https://whoami.example.com/
More: custom image, Swarm and split mode#
Extra modules. Labels set options of modules; they do not install modules. For a DNS provider or another plugin, build an image from the official builder image. The README says: override the command to docker-proxy, and use the module path github.com/lucaslorentz/caddy-docker-proxy/v2 (older posts show /plugin/v2). Pin both versions (v2.13.1 itself uses Caddy 2.11.4). We did not build this.
ARG CADDY_VERSION=2.11.4
FROM caddy:${CADDY_VERSION}-builder AS builder
RUN xcaddy build \
--with github.com/lucaslorentz/caddy-docker-proxy/[email protected] \
--with <additional-plugin>
FROM caddy:${CADDY_VERSION}-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
CMD ["caddy", "docker-proxy"]
Swarm. Put labels under deploy: labels: and use an overlay network.
Controller and server. CADDY_DOCKER_MODE=controller reads the socket; server instances serve traffic without it, carry the label caddy_controlled_server and share CADDY_CONTROLLER_NETWORK (a CIDR). This guide uses the default, standalone.
Common mistakes#
From the project's GitHub issues (linked), its README and our reading.
| Mistake | Why it happens | Do this instead |
|---|---|---|
no upstreams available for a working app (issue 508) | Compose named the network docker_caddy; the variable said caddy. The maintainer: it must match the real name | docker network ls, then use that exact name, or external: true with a fixed name |
Removing invalid block: Caddyfile:2: unrecognized global option: handle_path (issue 693) | A label without the caddy. prefix, or site directives without a caddy= site label, land in the global block | Start every label with caddy; give the container a caddy=<name> label |
unrecognized global option: tls (issue 262) | tls is a site option; one wrong label on another container put it in the global block | Use caddy.tls next to a caddy=<name> label or in a snippet |
caddy.auto_https: off ignored (issue 693) | It is a global option; next to a caddy= label it lands inside the site | Put it on the proxy container, which has no site label (maintainer, 12 March 2026) |
module not registered: caddy.logging.writers.console (issue 289) | caddy.log.output: console: console is a format, not an output | caddy.log.format: console, or CADDY_DOCKER_LOG_FORMAT=console |
| 502 or a missing site after a container was recreated (763, 851, both open) | Reporters say Caddy kept the old address | docker compose restart caddy. Some reporters use <container-name>:<port> instead of {{upstreams}}; untested by us |
no upstreams available after updating to 2.13.1, all containers on network_mode: host (issue 825, open) | No confirmed cause. The README says only containers on the ingress networks are used; a host-mode container is on none | Put proxy and app on the caddy network |
cat fails inside the proxy (issue 831) | The default image has no shell | Use an -alpine tag |
| Certificates lost at every restart | No volume on /data; the README warns of Let's Encrypt quota | Keep ./data:/data and back it up |
AI assistants: plain caddy:alpine, the socket and caddy= labels | The stock image has no label discovery | Use lucaslorentz/caddy-docker-proxy, or a build with CMD ["caddy", "docker-proxy"] |
AI assistants: plugin/v2 in xcaddy, ci-alpine or latest, ":ro makes the socket safe" | Old posts and the README's own quick start | Module path /v2, a pinned tag, and no trust in :ro. A typo such as @v.2.3.4 gives [FATAL] v.2.3.4: Invalid characters in version (issue 262): write @v2.13.1 |
Tip: In Compose YAML quote the whole template:
caddy.reverse_proxy: "{{upstreams 80}}". In adocker run -lflag the quotes belong to the shell; the README warns against quotes inside the value.
Tip: Change one thing at a time and read the generated file after each change.
Removing invalid blockmeans Caddy kept running without your broken site, so a working proxy does not prove every site was accepted.
Tip: If one app is not found, read the proxy log first:
Container is not in same network as caddynames the container and its networks.
Troubleshooting#
| Problem | Solution |
|---|---|
| Site not found or 503 | docker network inspect caddy must list proxy and app; docker compose logs caddy --tail 100 shows the warning |
| Label change does nothing | docker compose up -d in the app folder, then read Caddyfile.autosave |
| Browser warns about the certificate | Local name: Step 5 on that device. Public name: staging versus production |
| Public certificate never arrives | Test DNS, ports 80 and 443 from outside, and CG-NAT; stay on staging until it works |
| Port already in use | sudo ss -ltnp (Linux) or Get-NetTCPConnection -LocalPort 80,443 (Windows) |
Cannot connect to the Docker daemon | Start Docker Desktop, then docker compose restart caddy |
Exact error texts#
no upstreams available(HTTP 503): no upstream for that site; see issue 508 above.Container is not in same network as caddy: a warning naming the container, its networks and the ingress networks. Issue 759 reports a flood of it although routing worked; v2.13.1 stays quiet for stopped containers without an address.Post "http://localhost:2019/load": dial tcp [::1]:2019: connect: connection refused: issue 780, seen on v2.11.0 withadmin off, fixed in v2.12.0. Do not publish port 2019 to "fix" it.
Known bugs (open, December 2026)#
Issue 851: overlapping updates can leave Caddy on an older config after a container replacement; the reporter reloaded by hand with caddy reload --config /config/caddy/Caddyfile.autosave. Issues 763 and 825 are described above. Issue 839: Caddy fails to start if one of several Docker sockets is offline. None stopped a first install in the reports we read.
First diagnostics: docker compose ps, docker compose logs caddy --tail 200, docker network inspect caddy.
Updates and backups#
Update. Read the release notes, change the tag, then:
cd ~/docker_volumes/caddy-docker-proxy docker compose pull docker compose up -d docker compose logs caddy --tail 50
Windows: the same in PowerShell. Mac: as Linux. Keep the old tag in a comment to go back. The admin API changed between releases (v2.13.0 loads configuration in the process, v2.13.1 turned the API on again), so read the notes before a jump.
Back up compose.yaml and data (certificates, ACME account, local CA). The generated Caddyfile is rebuilt from your labels. The archive holds private keys: keep it secret.
Linux and Mac#
Save as ~/docker_volumes/caddy-docker-proxy/backup.sh:
#!/usr/bin/env bash set -euo pipefail base="$HOME/docker_volumes/caddy-docker-proxy" out="$base/backups/caddy-docker-proxy-$(date +%F).tar.gz" tar -czf "$out" -C "$base" compose.yaml data chmod 600 "$out"
Run chmod 700 on it and add this line with crontab -e (on a Mac write /Users/<your-user>/...):
0 3 * * * /home/<your-user>/docker_volumes/caddy-docker-proxy/backup.sh
Windows (PowerShell)#
Save as $HOME\docker_volumes\caddy-docker-proxy\backup.ps1:
$base = "$HOME\docker_volumes\caddy-docker-proxy" $out = "$base\backups\caddy-docker-proxy-$(Get-Date -Format yyyy-MM-dd).tar.gz" tar.exe -czf $out -C $base compose.yaml data
In Task Scheduler run powershell.exe -NoProfile -File <full-path-to-the-script> daily at 03:00.
Restore test#
Unpack an archive into a new empty folder, never over the live one:
mkdir -p /tmp/restore-test && tar -xzf backups/caddy-docker-proxy-<date>.tar.gz -C /tmp/restore-test ls /tmp/restore-test/data/caddy
It should contain pki and your certificates. We did not run a full restore on a second machine.
Performance and resources#
The project gives no memory or CPU numbers and we measured none; run docker stats caddy. The repository's Swarm example reserves 0.1 CPU and 200 MB, a scheduling hint, not a measurement. Load depends on CADDY_DOCKER_POLLING_INTERVAL (30 s) and CADDY_DOCKER_EVENT_THROTTLE_INTERVAL (100 ms).
FAQ#
Is this the same as Caddy? It is Caddy plus a plugin, built on Caddy 2.11.4. The generated config is normal Caddyfile text, and the plugin lives in its own repository, separate from the Caddy project.
Do I still need a Caddyfile? No. For global settings you may point CADDY_DOCKER_CADDYFILE_PATH at a base file; the Docker sites are added to it.
Is it maintained? The last release is 2 July 2026; the main branch had commits and pull requests in November and December 2026, mostly dependency updates and a few fixes. Judge on the issues page.
Sources#
- caddy-docker-proxy repository, release v2.13.1 (2 July 2026) and LICENSE (MIT) - read 3 December 2026
- Files at tag v2.13.1: README, standalone example, distributed example, Dockerfile-alpine, go.mod - read 3 December 2026
- Release notes v2.13.0 (29 June 2026) and v2.12.0 (12 March 2026)
- Image tags on Docker Hub (API checked for
2.13.1-alpine) and traefik/whoami v1.12.0 - Caddy docs: automatic HTTPS, tls directive and Docker Engine security - read 3 December 2026
- Comparison: Traefik release v3.8.0, nginx-proxy README and release 1.11.8
- Issues read: 20, 262, 289, 508, 693, 759, 763, 780, 825, 826, 831, 839, 851
Checked against the official docs on 2026-12-03. Nothing was run on a real machine by DIY Lab Hub; the commands come from the README, the example files and the issues above.