Skip to content

refactor(router): remove the unused ddev-router-letsencrypt volume (#8977) [skip ci] - #8977

Merged
rfay merged 1 commit into
ddev:mainfrom
rfay:20261019_rfay_remove_letsencrypt_volume
Oct 19, 2026
Merged

rfay merged 1 commit into
ddev:mainfrom
rfay:20261019_rfay_remove_letsencrypt_volume

Conversation

@rfay

@rfay rfay commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

The router no longer mounts a ddev-router-letsencrypt volume at /etc/letsencrypt or sets LETSENCRYPT_EMAIL and USE_LETSENCRYPT, because nothing has used them since the nginx-proxy router was removed. Let's Encrypt works as before, through Traefik's acme.json.

The Issue

Discovered while studying #8976:

The ddev-router-letsencrypt volume and the env vars were for Certbot in the old nginx-proxy router (#2458). Traefik has always kept its ACME state in /mnt/ddev-global-cache/traefik/acme.json (#4248), and #6739 removed the nginx router but left these in the router compose template. The use_letsencrypt help text in the generated global_config.yaml still said certificates come "via Certbot".

How This PR Solves The Issue

It removes the mount, the volume definition and the two env vars from the router compose template, along with the template keys that only fed them, and corrects the help text. Existing ddev-router-letsencrypt volumes are left in place, which is harmless since they only hold Certbot data that Traefik can't use.

Manual Testing Instructions

A real certificate needs a host with ports 80 and 443 reachable from the internet and a DNS name pointing at it. On such a host:

ddev utility download-ddev --pr 8977
export PATH="$HOME/tmp/ddev-download-ddev/pr-8977:$PATH"
ddev config global --use-letsencrypt=true --router-bind-all-interfaces=true
mkdir -p ~/tmp/lepr && cd ~/tmp/lepr
ddev config --project-type=php --project-tld=<your.domain> --omit-containers=db
echo "<?php echo 'hello';" > index.php
ddev start
docker inspect ddev-router --format '{{range .Mounts}}{{.Name}}:{{.Destination}} {{end}}'
# Expect only ddev-global-cache:/mnt/ddev-global-cache
curl https://lepr.<your.domain>/
# Expect "hello" with no certificate error, from a certificate issued by Let's Encrypt

Without a public host, the ACME path can still be checked against the Let's Encrypt staging server by adding a ~/.ddev/traefik/static_config.staging.yaml as described in hosting. The router logs then show a staging account registered and an order that fails with "no valid A records", which is expected for a site that isn't public.

Automated Testing Overview

No test covered the removed mount, and the existing Traefik tests exercise the compose template that remains.

Testing Done

I ran the same test with the upstream/main binary and with this PR's binary on an internet-reachable Ubuntu 26.04 host (Docker 27.4), using *.traefik.thefays.us. Each run used a fresh global config directory, and every Docker volume was deleted between the runs, so the PR run started with no ACME account or certificate.

upstream/main This PR
Router mounts ddev-global-cache, ddev-router-letsencrypt:/etc/letsencrypt ddev-global-cache only
LETSENCRYPT_* env set not set
Volumes created ddev-global-cache, ddev-router-letsencrypt ddev-global-cache
Certificate Let's Encrypt production, CN lebase.traefik.thefays.us Let's Encrypt production, CN lepr.traefik.thefays.us
acme.json mode 600 mode 600, holding the lepr certificate

In both runs curl from another machine fetched the site without -k.

🤖 Generated with Claude Code

…kip buildkite]

The router no longer mounts a `ddev-router-letsencrypt` volume at `/etc/letsencrypt` or sets `LETSENCRYPT_EMAIL` and `USE_LETSENCRYPT`, because nothing has used them since the nginx-proxy router was removed. Let's Encrypt works as before, through Traefik's `acme.json`.

The volume and the env vars were for Certbot in the old nginx-proxy router. Traefik has always kept its ACME state in `/mnt/ddev-global-cache/traefik/acme.json`, and [ddev#6739](ddev#6739) removed the nginx router but left these in the router compose template. The `use_letsencrypt` help text in the generated `global_config.yaml` still said certificates come "via Certbot".

It removes the mount, the volume definition and the two env vars from the router compose template, along with the template keys that only fed them, and corrects the help text. Existing `ddev-router-letsencrypt` volumes are left in place, which is harmless since they only hold Certbot data that Traefik can't use.

A real certificate needs a host with public DNS, but the ACME path can be checked anywhere against the Let's Encrypt staging server:

```bash
ddev utility download-ddev --pr 8977
export PATH="$HOME/tmp/ddev-download-ddev/pr-8977:$PATH"
ddev poweroff
printf 'certificatesResolvers:\n  acme-tlsChallenge:\n    acme:\n      caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"\n' > ~/.ddev/traefik/static_config.staging.yaml
ddev config global --use-letsencrypt=true
mkdir -p ~/tmp/le-test && cd ~/tmp/le-test && ddev config --project-type=php && ddev start
docker inspect ddev-router --format '{{range .Mounts}}{{.Name}}:{{.Destination}} {{end}}'
docker exec ddev-router stat -c '%a' acme.json
docker logs ddev-router 2>&1 | grep -i acme
rm ~/.ddev/traefik/static_config.staging.yaml && ddev config global --use-letsencrypt=false && ddev delete -Oy le-test
```

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rfay
rfay requested a review from a team as a code owner October 19, 2026 13:59
@github-actions

Copy link
Copy Markdown

Download this PR's build for your OS and architecture with:

ddev utility download-ddev --pr 8977

Or download the artifact for your OS and architecture directly:

See Testing a PR.

Open in GitHub Codespaces

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rfay rfay changed the title refactor(router): remove the unused ddev-router-letsencrypt volume refactor(router): remove the unused ddev-router-letsencrypt volume (#8977) [skip ci] Oct 19, 2026
@rfay
rfay merged commit d1814ff into ddev:main Oct 19, 2026
49 checks passed
@rfay
rfay deleted the 20261019_rfay_remove_letsencrypt_volume branch October 19, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants