Skip to content

Commit 44b2142

Browse files
edwhclaude
andcommitted
Use wildcard TLS cert for *.restarters.net, add network subdomains to DNS cutover
Wildcard cert already created on Fly. Needs _acme-challenge CNAME at iwantmyname.com for DNS-01 validation (can be done before cutover). Covers repairtogether, repairshare, hauts-de-france subdomains. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 964ebde commit 44b2142

1 file changed

Lines changed: 40 additions & 12 deletions

File tree

docs/fly-migration-plan.md

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
- `restarters.net` — main app → **DNS changes to Fly.io**
6363
- `www.restarters.net` — CNAME to `restarters.net` → follows main domain
6464
- `map.restarters.net` — currently same server → **needs separate plan**
65-
- `repairtogether.restarters.net` — network subdomain (Repair Together, Belgium, `fr-BE`) → **DNS must move to Fly + `fly certs add`**
66-
- `repairshare.restarters.net` — network subdomain (Repair Share) → **DNS must move to Fly + `fly certs add`**
67-
- `hauts-de-france.restarters.net` — network subdomain (Hauts-de-France) → **DNS must move to Fly + `fly certs add`**
65+
- `repairtogether.restarters.net` — network subdomain (Repair Together, Belgium, `fr-BE`) → **DNS must move to Fly** (covered by wildcard cert)
66+
- `repairshare.restarters.net` — network subdomain (Repair Share) → **DNS must move to Fly** (covered by wildcard cert)
67+
- `hauts-de-france.restarters.net` — network subdomain (Hauts-de-France) → **DNS must move to Fly** (covered by wildcard cert)
6868
- `talk.restarters.net` — Discourse (external) → no change
6969
- `wiki.restarters.net` — MediaWiki (external) → no change
7070
- `therestartproject.org` — WordPress (external) → no change
@@ -445,14 +445,24 @@ workflows:
445445
446446
This can be tested by merging to the production branch before DNS cutover — the deploy will go to Fly.io and be accessible on `restarters.fly.dev`.
447447

448-
#### Add custom domain (before cutover)
448+
#### Set up wildcard TLS certificate (before cutover — do this now)
449449

450+
A wildcard cert covers `*.restarters.net` — all network subdomains (`repairtogether`, `repairshare`, `hauts-de-france`) plus `www`, without needing individual `fly certs add` for each.
451+
452+
**Already done (2026-03-19):**
450453
```bash
451-
fly certs add restarters.net -a restarters
452-
fly certs add www.restarters.net -a restarters
454+
fly certs add "*.restarters.net" -a restarters # ✅ Done
455+
fly certs add restarters.net -a restarters # Also needed for the apex domain
456+
```
457+
458+
**DNS validation required** — add this CNAME at iwantmyname.com now (does not affect current production):
459+
```
460+
_acme-challenge.restarters.net. CNAME restarters.net.369kyp0.flydns.net.
453461
```
454462
455-
The certificate won't be issued until DNS points to Fly.io (Let's Encrypt needs to reach it for the HTTP-01 challenge), but adding the domain is a prerequisite that should be done early.
463+
Once the CNAME is in place, Fly.io will issue the wildcard cert via DNS-01 challenge. Unlike per-domain HTTP-01 validation, this works **before** DNS cutover, so the cert can be ready and waiting.
464+
465+
Check progress: `fly certs check "*.restarters.net" -a restarters`
456466
457467
### Cutover Steps (maintenance window — aim for minimal duration)
458468
@@ -482,24 +492,42 @@ DNS is hosted at **iwantmyname.com**. Since iwantmyname does not support CNAME f
482492
- IPv6 (dedicated): `2a09:8280:1::ce:b85f:0`
483493

484494
```
485-
restarters.net. 300 A 66.241.124.187
486-
restarters.net. 300 AAAA 2a09:8280:1::ce:b85f:0
487-
www.restarters.net. 300 CNAME restarters.net.
495+
restarters.net. 300 A 66.241.124.187
496+
restarters.net. 300 AAAA 2a09:8280:1::ce:b85f:0
497+
www.restarters.net. 300 CNAME restarters.net.
498+
repairtogether.restarters.net. 300 A 66.241.124.187
499+
repairtogether.restarters.net. 300 AAAA 2a09:8280:1::ce:b85f:0
500+
repairshare.restarters.net. 300 A 66.241.124.187
501+
repairshare.restarters.net. 300 AAAA 2a09:8280:1::ce:b85f:0
502+
hauts-de-france.restarters.net. 300 A 66.241.124.187
503+
hauts-de-france.restarters.net. 300 AAAA 2a09:8280:1::ce:b85f:0
488504
```
489505

506+
Or, if iwantmyname supports wildcard DNS records:
507+
```
508+
*.restarters.net. 300 A 66.241.124.187
509+
*.restarters.net. 300 AAAA 2a09:8280:1::ce:b85f:0
510+
```
511+
512+
**Note:** Do NOT wildcard DNS if `map.restarters.net` still needs the old server. In that case, use individual records above.
513+
490514
If a dedicated IPv4 is needed later: `fly ips allocate-v4 -a restarters` (~$2/month).
491515

492516
#### Step 3: Verify TLS Certificate
493517

494518
```bash
495-
# Wait for certificate to be issued (usually 1-5 minutes after DNS propagation)
519+
# Wildcard cert (should already be issued via DNS-01 validation done pre-cutover)
520+
fly certs check "*.restarters.net" -a restarters
521+
522+
# Apex domain
496523
fly certs check restarters.net -a restarters
497524

498525
# Verify in browser
499526
curl -I https://restarters.net
527+
curl -I https://repairtogether.restarters.net
500528
```
501529

502-
**Certificate Renewal:** Fly.io auto-renews Let's Encrypt certificates (typically 30 days before the 90-day expiry). No certbot or cron needed. DNS must continue pointing to Fly.io for renewal to work.
530+
**Certificate Renewal:** Fly.io auto-renews Let's Encrypt certificates. The wildcard cert renews via DNS-01 challenge using the `_acme-challenge` CNAME — this must remain in place permanently. No certbot or cron needed.
503531

504532
#### Step 6: Verify Application
505533

0 commit comments

Comments
 (0)