Skip to content

Domains

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:

Terminal window
PORKBUN_SVRBC_API_KEY=pk1_…
PORKBUN_SVRBC_SECRET_KEY=sk1_…

porkbun then reaches it as --profile svrbc.

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.

Terminal window
porkbun --profile svrbc funding # credit, card, auto top-up

Auto 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).

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.org
porkbun: svrbc.org is not in the default account; it is in profile svrbc. Rerun with --profile svrbc.

To see everything at once:

Terminal window
porkbun domains --all # every configured account, with a profile column

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). Not s3.… or cdn.…: 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.org is one; assets.symbolics.dev holds 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 with CAA_ERROR). Add a TXT at the name first, then replace it with the real record.

The AWS resources behind them follow AWS naming.

This is how developers.svrbc.org is set up:

  1. 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=true

    The response carries a verification_code.

  2. Add the two records in the subaccount. dns set is an upsert, so it’s safe to re-run:

    Terminal window
    porkbun --profile svrbc dns set svrbc.org CNAME <name> svrbc.gitlab.io
    porkbun --profile svrbc dns set svrbc.org TXT _gitlab-pages-verification-code.<name> \
    gitlab-pages-verification-code=<code>
  3. 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"

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:

  1. Save the zone: porkbun --json dns list <domain> > <domain>-dns.json.
  2. Write down the email forwards (https://porkbun.com/account/emailhosting/<domain>) and any URL forwarding: neither has an API to read back.
  3. 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).

  • 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 TXT record 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.