Certificates: reuse the installer's HTTP-01 account, and ask port 80 or 443 #209

Merged
jcoffey-dev merged 1 commits from fix/certs-http01 into main 2026-11-15 05:19:36 +00:00
Owner

Fixes #206.

The Certificates guide and Order a certificate only knew DNS-01 and TLS-ALPN-01. On an installer setup that meant they never reused the installer's HTTP-01 Let's Encrypt account, and always added a TLS-ALPN-01 one, which can't validate while Caddy holds port 443. This is how forum t/279 ran into the server-set description bug.

  • Both guides now ask how Let's Encrypt reaches the server for names checked without DNS: port 80 (HTTP-01) or port 443 (TLS-ALPN-01) (DirectChoice, on the Account step).
  • The choice starts on port 80 when the server already has an HTTP-01 account (the installer makes one), so that account is reused. Otherwise it starts on port 443, as before.
  • The texts that said "port 443" now give the chosen port.
  • shared.ts: defaultDirect, challengeOf and providerFor replace CHALLENGE; addProvider takes the choice. There's a new shared.test.ts.

The server's listeners can't settle this: in a container install the HTTPS listener is on [::]:443 inside the container while Caddy holds the host's 443. So the existing account decides the default, and the admin can change it.

Local CI: typecheck, lint, i18n:check, tests (1085), the three shell tests, build and notice-check all pass. The release/2026 backport follows in a separate PR.

Fixes #206. The Certificates guide and Order a certificate only knew DNS-01 and TLS-ALPN-01. On an installer setup that meant they never reused the installer's HTTP-01 Let's Encrypt account, and always added a TLS-ALPN-01 one, which can't validate while Caddy holds port 443. This is how forum t/279 ran into the server-set `description` bug. - Both guides now ask how Let's Encrypt reaches the server for names checked without DNS: **port 80 (HTTP-01)** or **port 443 (TLS-ALPN-01)** (`DirectChoice`, on the Account step). - The choice starts on port 80 when the server already has an HTTP-01 account (the installer makes one), so that account is reused. Otherwise it starts on port 443, as before. - The texts that said "port 443" now give the chosen port. - `shared.ts`: `defaultDirect`, `challengeOf` and `providerFor` replace `CHALLENGE`; `addProvider` takes the choice. There's a new `shared.test.ts`. The server's listeners can't settle this: in a container install the HTTPS listener is on `[::]:443` inside the container while Caddy holds the host's 443. So the existing account decides the default, and the admin can change it. Local CI: typecheck, lint, i18n:check, tests (1085), the three shell tests, build and notice-check all pass. The release/2026 backport follows in a separate PR.
jcoffey-dev added 1 commit 2026-11-15 05:17:50 +00:00
Certificates: reuse the installer's HTTP-01 account, and ask port 80 or 443
ci / build (pull_request) Skipped
ci / notices (pull_request) Successful in 56s
ci / publish (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m27s
c7bb163e8c
The guides only knew DNS-01 and TLS-ALPN-01, so on an installer setup
they never reused its HTTP-01 Let's Encrypt account and always added a
TLS-ALPN-01 one, which can't validate while the installer's web server
holds port 443.

Both guides now ask how Let's Encrypt reaches the server for names
checked without DNS: port 80 (HTTP-01) or port 443 (TLS-ALPN-01). It
starts on port 80 when the server already has an HTTP-01 account, as an
installer setup does, so that account is reused; otherwise on port 443,
as before. The texts that said port 443 say the chosen port.

Fixes #206
jcoffey-dev merged commit 5f14aba0ff into main 2026-11-15 05:19:36 +00:00
jcoffey-dev deleted branch fix/certs-http01 2026-11-15 05:19:36 +00:00
Sign in to join this conversation.