Attach Domain
create_domainAttach a custom domain to a Cube and route it to an in-Cube port. Returns the domain and required DNS records; publish them verbatim for the domain to work.
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. Applied as saved, with no check: if nothing in the Cube answers HTTPS for this domain, visitors get an error page until it is set back to http. | |
| proxyProtocol | No | PROXY protocol header the edge sends at the start of every connection to the Cube, naming the visitor, so an app reads the visitor's address from the connection itself (as on a plain VPS) instead of X-Real-IP / X-Forwarded-For. "v1" is a line of text, "v2" is binary, "off" (the default) sends none. The app must accept PROXY protocol on this port before it is turned on, or every request to the domain fails; it is applied as saved, with no check. Every domain on the same Cube port needs the same setting: a save that would mix them is refused with 409 unless confirmMixedProxyProtocol is true. | |
| confirmMixedProxyProtocol | No | Set true only when the user confirms that the app handles both settings on this port (or is mid-migration): it lets a save go ahead that leaves domains on the same Cube port with different proxyProtocol settings. The 409 that asks for it names the other domains; relay them before asking. |