Skip to content
Get started

Hostnames and custom domains

View as Markdown

Players reach a network at <network>.g.minekube.net. The plan adds names for parts of a network, and your own domains, as Cloudflare attaches routes and custom domains to a Worker.

vite.config.ts already takes hostnames and domains in a target, so your configuration keeps its shape. Until they are built, mk deploy, mk versions deploy and mk rollback stop with not yet supported for a target that has them, instead of ignoring them.

hostnames: ["arena"] in a target makes arena.<network>.g.minekube.net an entry of the network that points to the target’s selector. A player who types it lands on those servers. If another project in the network claims the same hostname, the registry refuses instead of overwriting it.

The Minecraft handshake carries the hostname the player typed, so a CNAME to the network’s hostname is enough. Before it routes a domain, the Minekube API checks that the domain belongs to the network, with a DNS record, as Cloudflare does. The relay then maps the domain to the network. mk deploy says which record to set, and turns the domain on once the check passes.

Later, <version>.<network>.g.minekube.net reaches a server that runs exactly that version, for a preview before a rollout.

Was this helpful?