Domains
The rule
Section titled “The rule”Every SVRBC domain is registered in the SVRBC Porkbun subaccount, and its DNS is served from there. Nothing SVRBC-owned lives in a personal Porkbun account, and nothing personal lives in the subaccount.
Porkbun’s API has no notion of subaccounts. Each account has its own API key
pair, and a key only sees its own account’s domains. So the subaccount needs
its own keys, kept beside the default account’s in ~/.env:
PORKBUN_SVRBC_API_KEY=pk1_…PORKBUN_SVRBC_SECRET_KEY=sk1_…porkbun then reaches it as --profile svrbc.
Paying for renewals
Section titled “Paying for renewals”Every SVRBC domain renews automatically, and the subaccount pays for its own renewals: from its account credit, which auto top-up refills from a card saved on the subaccount. Both are needed. Porkbun saves a card only on the website: log into the subaccount from the parent’s Subaccounts page, then add it at https://porkbun.com/account. Auto top-up does nothing without one.
porkbun --profile svrbc funding # credit, card, auto top-upAuto top-up is set to add $50 whenever a renewal leaves less than $25, which
covers any one renewal. The API sets it
(POST /account/autoTopup, needing the key’s funding scope).
svrbc-audit fails the group when either is missing
(porkbun-funding).
Before concluding a domain isn’t there
Section titled “Before concluding a domain isn’t there”Check every account. Porkbun answers a request for a domain held by
another account with INVALID_DOMAIN and the hint “The domain name is
invalid. Check the formatting.” The domain is fine; the key is the wrong one.
porkbun catches that error and names the profile that does hold the
domain:
$ porkbun dns list svrbc.orgporkbun: svrbc.org is not in the default account; it is in profile svrbc. Rerun with --profile svrbc.To see everything at once:
porkbun domains --all # every configured account, with a profile columnNaming hostnames
Section titled “Naming hostnames”A hostname says what is served there, not what serves it:
- A site is its domain:
svrbc.org,doreancon.org,psalter.svrbc.org. The GitLab project serving it has the same name, unless it serves several (New projects). - A service is
<what it serves>.<domain>:bazel-cache.svrbc.org(the Bazel cache, on SVRBC’s domain because every project uses it),developers.svrbc.org(this handbook). Nots3.…orcdn.…: the provider can change without the name changing. assets.<domain>is a site’s large files (PDFs, audio, video): CloudFront in front of the site’s own bucket,svrbc-<domain>-assets, with every file at a content-addressed key,/<sha256>/<name>. The site keeps its own paths and redirects them there (Builds and CI).assets.doreancon.orgis one;assets.symbolics.devholds symbolics.dev’s scans, linked by their own URLs.- A subdomain under a wildcard needs a placeholder record before its
certificate. Until the name exists, a
*.<domain>record answers for it, and the certificate authority reads the wildcard target’s CAA records (Vercel’s don’t allow Amazon, so ACM fails withCAA_ERROR). Add aTXTat the name first, then replace it with the real record.
The AWS resources behind them follow AWS naming.
Pointing a subdomain at GitLab Pages
Section titled “Pointing a subdomain at GitLab Pages”This is how developers.svrbc.org is set up:
-
In the project, add the domain with automatic HTTPS. With
glab:Terminal window glab api -X POST "projects/svrbc%2F<project>/pages/domains" \-f domain=<name>.svrbc.org -F auto_ssl_enabled=trueThe response carries a
verification_code. -
Add the two records in the subaccount.
dns setis an upsert, so it’s safe to re-run:Terminal window porkbun --profile svrbc dns set svrbc.org CNAME <name> svrbc.gitlab.ioporkbun --profile svrbc dns set svrbc.org TXT _gitlab-pages-verification-code.<name> \gitlab-pages-verification-code=<code> -
Ask GitLab to verify. It runs the DNS check itself, then issues a Let’s Encrypt certificate within a few minutes:
Terminal window glab api -X PUT "projects/svrbc%2F<project>/pages/domains/<name>.svrbc.org/verify"
Moving a domain into the subaccount
Section titled “Moving a domain into the subaccount”From another Porkbun account
Section titled “From another Porkbun account”A domain already at Porkbun moves with Push Domain, which Porkbun’s API
doesn’t offer. In the account that holds it: Domain Management → the
domain’s Details → Account Transfer → Push Domain, with the
username svrbc. From the parent account to its own subaccount the move is
immediate, with no acceptance email, and everything comes along: every
DNS record, the email forwards and the URL forwards.
Still, before pushing:
- Save the zone:
porkbun --json dns list <domain> > <domain>-dns.json. - Write down the email forwards (
https://porkbun.com/account/emailhosting/<domain>) and any URL forwarding: neither has an API to read back. - Check for anything else Porkbun hosts for it (Link in Bio, the sitebuilder, static hosting): the push form warns that hosting tied to the account may stop working.
Afterwards: porkbun domains --all shows it under svrbc; diff
porkbun --profile svrbc --json dns list <domain> against the saved zone;
porkbun --profile svrbc check <domain>; and look at the email forwards from
inside the subaccount (the parent’s Subaccounts page → login, and
Account → Parent Account to return).
From another registrar
Section titled “From another registrar”- Disable DNSSEC before starting a transfer. Once a transfer is pending,
the registry blocks every update, so neither registrar can remove the DS
records. A signed domain whose DNS moves while its DS records stand
resolves nowhere. Check with
dig +short DS <domain>. If it answers, disable DNSSEC and wait out the DS TTL first. - Export the zone from the old registrar’s panel, rather than probing for records. Probing finds only the names you think to guess.
- A DKIM
TXTrecord is one unbroken string. Control panels display a space at the 255-character split, and copying that space breaks DKIM silently. - Afterwards,
porkbun --profile svrbc check <domain>checks the delegation, the nameservers and public resolution in one go.