|
62 | 62 | - `restarters.net` — main app → **DNS changes to Fly.io** |
63 | 63 | - `www.restarters.net` — CNAME to `restarters.net` → follows main domain |
64 | 64 | - `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) |
68 | 68 | - `talk.restarters.net` — Discourse (external) → no change |
69 | 69 | - `wiki.restarters.net` — MediaWiki (external) → no change |
70 | 70 | - `therestartproject.org` — WordPress (external) → no change |
@@ -445,14 +445,24 @@ workflows: |
445 | 445 |
|
446 | 446 | 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`. |
447 | 447 |
|
448 | | -#### Add custom domain (before cutover) |
| 448 | +#### Set up wildcard TLS certificate (before cutover — do this now) |
449 | 449 |
|
| 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):** |
450 | 453 | ```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. |
453 | 461 | ``` |
454 | 462 |
|
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` |
456 | 466 |
|
457 | 467 | ### Cutover Steps (maintenance window — aim for minimal duration) |
458 | 468 |
|
@@ -482,24 +492,42 @@ DNS is hosted at **iwantmyname.com**. Since iwantmyname does not support CNAME f |
482 | 492 | - IPv6 (dedicated): `2a09:8280:1::ce:b85f:0` |
483 | 493 |
|
484 | 494 | ``` |
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 |
488 | 504 | ``` |
489 | 505 |
|
| 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 | + |
490 | 514 | If a dedicated IPv4 is needed later: `fly ips allocate-v4 -a restarters` (~$2/month). |
491 | 515 |
|
492 | 516 | #### Step 3: Verify TLS Certificate |
493 | 517 |
|
494 | 518 | ```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 |
496 | 523 | fly certs check restarters.net -a restarters |
497 | 524 |
|
498 | 525 | # Verify in browser |
499 | 526 | curl -I https://restarters.net |
| 527 | +curl -I https://repairtogether.restarters.net |
500 | 528 | ``` |
501 | 529 |
|
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. |
503 | 531 |
|
504 | 532 | #### Step 6: Verify Application |
505 | 533 |
|
|
0 commit comments