Manual, one-time steps done in the Cloudflare dashboard + wrangler CLI. Nothing here is needed for local dev or CI; local D1/KV are simulated.
- Add the
nbread.lolzone to the Cloudflare account (free plan). - Point the registrar's nameservers at the two Cloudflare-assigned NS hosts.
- Wait for the zone to become Active.
- SSL/TLS mode: Full (strict).
- Edge Certificates: confirm the Universal SSL cert covers
nbread.loland*.nbread.lol(universal certs include the first-level wildcard). - Edge Certificates (at Gate B, once TLS is confirmed working): enable
Always Use HTTPS + HSTS (
max-age≥ 6 months; holdincludeSubDomains/preload until tenant subdomains are confirmed stable on TLS — seedocs/ops.md§6 Gate B step 1).
| Type | Name | Content | Proxy |
|---|---|---|---|
| A | @ |
192.0.2.1 (dummy) |
Proxied |
| CNAME | * |
nbread.lol |
Proxied |
- The apex A record is a placeholder — the Worker route intercepts all traffic; any proxied record works (or use a Workers custom domain on the apex instead, which manages the record automatically).
- The wildcard CNAME must be proxied (orange cloud) or subdomains bypass the Worker. Free plans proxy first-level wildcards fine.
- Optional:
_dmarcTXT + SPF once outbound mail is a thing (not yet).
wrangler d1 create nbread # → paste database_id into wrangler.jsonc
wrangler d1 migrations apply nbread --remote
wrangler kv namespace create KV # → paste id into wrangler.jsonc
wrangler secret put TURNSTILE_SECRET_KEY
wrangler secret put ADMIN_PUBKEY # OPTIONAL: hex/npub admin identity for /admin
# (omit → admin surface disabled, all /admin 404)- Create a Turnstile widget (dashboard → Turnstile) for
nbread.lolplus the workers.dev preview hostname (Gate A tests the claim flow there); put the site key inwrangler.jsoncvars.TURNSTILE_SITE_KEYand the secret viawrangler secret put. vars.ENVIRONMENTis already"production"in the committedwrangler.jsonc(fail closed — deploys never enable the dev-only X-Forwarded-Host override). Local dev getsENVIRONMENT=developmentfrom.dev.vars(copy.dev.vars.example); do not flip the committed var.
wrangler deploy registers:
-
routes
nbread.lol/*and*.nbread.lol/*(zonenbread.lol) -
cron trigger
*/15 * * * * -
After first deploy, verify both routes appear under the zone's Workers Routes page and the cron shows in the Worker's Triggers tab.
-
Tail logs (
wrangler tail) across one 15-minute boundary to observe a cron execution.
- Gate A:
wrangler deploy --var MAIN_HOST:nbread.<account>.workers.devto theworkers.devpreview URL; CI green +bash scripts/smoke.sh https://nbread.<account>.workers.devgreen (subdomain checks auto-skip on workers.dev). - Gate B: flip DNS (section 2),
wrangler deploy(committed vars), re-run smoke againsthttps://nbread.lol, confirm cron observed inwrangler tail, and verify a claimed test blog renders real relay content. - Post-launch: configure the WAF rate rule + scanner-path block
(
docs/ops.md§3) and setADMIN_PUBKEYif the blocklist admin is wanted (docs/ops.md§5).
The project moved from nostrbook.net to nbread.lol with fresh resources
on the account that owns the nbread.lol zone. The old nostrbook.net D1/KV live
on a different account (Sovereign IT 2d2cca…) and were not reused (worker
routes must bind a zone on the same account); the ~1-day-old data did not carry
over — reserved handles were re-seeded and posts re-mirror from relays.
Account 830ade508fd3f90a2a591477cdbd399c (Kinseycagney), zone nbread.lol
(af6ac54c001d8d5c0ae21b81ab2b91e4). Pinned as account_id in wrangler.jsonc.
- D1
nbread8308f106-5d7f-443d-b34c-e8cb16728bd2(region ENAM); all 4 migrations applied--remote; 11 reserved handles seeded. - KV
d01e2e69d35549bb8ee153ac4007dbe2(bindingKV). - Turnstile widget "nbread.lol" (Managed), site key
0x4AAAAAAD1_vRxPvgk56oO-, domainnbread.lol.TURNSTILE_SECRET_KEYset viawrangler secret put. (ADMIN_PUBKEYunset ⇒/admin404s — optional.) - DNS (proxied): apex
A @ 192.0.2.1, apexAAAA @ 100::, wildcardCNAME * → nbread.lol,www CNAME → nbread.lol(all proxied).www.nbread.lol301-redirects to the apex in the Worker (guard middleware; "www" is a reserved handle, never a blog). - SSL/TLS: Full (strict); Universal SSL active covering
nbread.lol+*.nbread.lol; Always Use HTTPS on; HSTSmax-age=15552000(noincludeSubDomains/preload); TLS 1.3 on. - Worker
nbread: deployed with routesnbread.lol/*+*.nbread.lol/*and cron*/15 * * * *.workers_devis false (production serves via the zone routes); the account's workers.dev subdomain isnbread(created to unblock the cron schedules API — flipworkers_devto true to also publish tonbread.nbread.workers.dev). - WAF:
global-per-ip-throttle(60 req/10s per IP+colo, block 10s, hostnbread.lol+*.nbread.lol) +scanner-paths-block(.php,/wp-,/.env→ block). - Smoke:
bash scripts/smoke.sh https://nbread.lol→ 54/54 green.
ADMIN_PUBKEYunset — set viawrangler secret putto enable the/adminblocklist surface (unset ⇒ all/admin404, which smoke asserts).
The old nostrbook worker / nostrbook.net zone keep serving until explicitly
retired — decommission is a separate step.