chadtmiller.com/group-host
atmosphere group host
A group's site moves to its own domain once that domain reaches the host
MergedThis adds a steward-controlled switch that moves a group's site to its own handle domain, once describeServer at that domain answers with this host's DID. The address and www. then redirect there. I read the Rust core: site_domain.rs, sites.rs, the store.rs queries and migration, group_handle.rs, group_api.rs, config.rs and the routes. I found nothing that must change.
- Stale rows:
site_domainandsitedjoin ona.handle = s.domain, so a row stops counting the moment the handle changes.updateGroupHandlealso deletes it, and the forget-account list covers group deletion. - Routing:
site_ofsends the address to the domain only while a row counts. The domain andwww.serve and redirect as described, and/xrpc/and/.well-known/stay the host's own. - Certificates:
tls_askchecks the group is active and that the name is its own domain orwww.under it. That is tight enough to stop strangers spending certificate limits. - Minor edge, no change needed: a group whose handle itself starts with
www.can never get a certificate fromtls_ask, because the prefix is stripped before the lookup. The check also runs only when moving, as the body says.
I did not read the web components, the lexicons, the docs, the tests or the CLI and MCP changes. CI covers them (the 100% coverage gate, the lexicon lint and the docs links).
The only change since my approval is making the site_domain migration CREATE TABLE IF NOT EXISTS. That is harmless: it is idempotent, and the schema is the same. My earlier approval stands.
The only change since my approval is in one test. The NotReaching test no longer sets SITE_CHECK_AT. It now relies on the https check against a .example domain, which can't answer, so it exercises the real path, and the test is renamed to match. Nothing I approved is touched, so my earlier approval stands.
A group with a handle on its own domain can now move its site there: a steward presses "Move" on the Site page's Domain card (or
opensocial site domain <group>, or thesite_domaintool), the host checks the domain answers as this host, and from then onriders.orgserves the site while the address andwww.riders.orgredirect to it. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n25k5ew55umt.Claude Opus 5.5
What changes
The switch.
fyi.opensocial.putSiteDomainanddeleteSiteDomain, both forgroup.configure. Put is refused withNoOwnDomainwhile the handle is the address, and withNotReachingunlesshttps://<domain>/xrpc/com.atproto.server.describeServeranswers this host's DID (orSITE_CHECK_AT, asked with the domain asHost, for a host that can't reach its own public addresses). Asite_domainrow holds the domain. It counts only while the group's handle is still that domain,updateGroupHandleclears it, and deleting the group deletes it.Serving.
sites::site_ofnow finds a site by its own domain too. On the domain the site is served as at the address, keeping/.well-known/and/xrpc/for the host, and a site that signs visitors in gets its OAuth client named for the domain, as the live-data pull already does byHost/X-Forwarded-Host. The address andwww.<domain>answer 301 to the same path and query at the domain, but the address keeps the host's own paths.Certificates.
GET /tls/ask?domain=answers 200 for a group's own domain, orwww.under it, while the group is on (switched on or not, so the check above can connect), else 404. It's for Caddy'son_demand_tls;docs/deploying.mdhas the Caddyfile.Where it shows. The group views carry
siteDomain,putSiteanswers itsurlthere, the group page's Website link and the Site page use it, and the Site page has a Domain card. With no domain of its own, the card says so and links to the handle. Otherwise it shows the domain and either "Move" (a dialog saying which DNS records to add first, with a refusal in plain words) or "Move back", both quiet.Command and tool.
opensocial site domain <group> [--undo]andsite_domain, from oneTOOLSentry.Why
Taking a handle on
riders.orgproves the group controls the domain, not that the domain's web traffic reaches this host: its A record may still name the old site the group is leaving. So the move is a switch a steward presses once DNS is ready, checked by asking the domain who it is. Turning it off, or changing the handle, puts the site back at its address, which never stops being the group's. The issue's first draft redirected automatically on the handle check alone; that's the gap this closes.How it was checked
tests/sites.rs: no own domain (NoOwnDomain, no certificate); a domain the proxy may certify (andwww., case-insensitive) and one it may not; a plain member refused; the domain serving nothing until moved; once moved, the domain serving the site and itsatproto-did, the address andwww.redirecting with path and query;siteDomainin the view andputSite'surl; moved back; and a new handle throughupdateGroupHandleending it for good. A host asking the domain itself, under.example, which never answers, getsNotReaching.tests/commands.rs:site domainrefused withNoOwnDomain, and--undoanswering.site_domain.just lookof the card with no domain, with one not moved, the dialog, and moved (pictures attached), the last two drawn by renaming Riders' handle and adding the row in a throwaway world's database. A reviewer agent critiqued them against the ui skill; its findings are applied, except that the button says its verb alone ("Move") as rows do, and a host name with a hyphen may still wrap at it on a phone.Shortcomings
on_demand_tlsand the catch-all block are written indocs/deploying.mdbut have not run, as nothing deploys to next.opensocial.fyi yet (at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n25dojefqsn2).Review
sites::site_ofand the redirect inserve(where each name goes),site_domain.rs(the check and the certificate answer), and thesite_domainqueries instore.rs(a row counts only while the handle is its domain).