Attach Domain
create_domainAttach a custom domain to a Cube and receive the DNS records that must be published. Returned CNAMEs activate routing to your in-Cube port; set mustBeGrey records to DNS-only.
Instructions
Attach a custom domain to a Cube, routing it to an in-Cube port. Returns the domain AND the DNS records the user must publish — tell them the records verbatim, host and value, because the domain does nothing until those exist. An ordinary subdomain needs one CNAME; a wildcard needs three. Any record with mustBeGrey must be DNS-only (grey cloud) on Cloudflare; a proxied one hides the record and certificate issuance fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | The in-Cube port to route to. | |
| cubeId | Yes | The Cube id to operate on. | |
| domain | Yes | The domain name to attach (e.g. app.example.com). | |
| spaceId | No | Krova Cloud Space id. Optional if KROVA_SPACE_ID is set as the server default. | |
| originScheme | No | Scheme the edge speaks to the Cube on. "http" (default) is cleartext. Use "https" only when the Cube terminates TLS itself — a control panel holding its own certificate, or an app listening on HTTPS — because such an app answers plain HTTP with a redirect and cannot be reached over cleartext. Visitors are on HTTPS either way. The dial port is derived: https on the default port 80 connects on 443. Verified against the Cube before it is applied; if the domain does not serve, the route is left on http. |