Let servers in
A server belongs to a network by its key. On its first start, the connector in the Minekube plugin makes a key in the plugin folder, and from then on the key is the server’s identity. A server needs no open port, because players reach it through Minekube’s relays.
Choose a way in
Section titled “Choose a way in”A network owner adds a server in one of three ways, each with the server’s consent:
| Way | When | How |
|---|---|---|
| Your dev server | To play your game with friends from your machine | mk server --join my-network |
| An invite | A plain VPS, a hosting panel, a cluster without a public token issuer | mk network invite my-network, then put the token in a file the server’s connector.json names |
| A trust rule | A Kubernetes cluster or CI with OpenID Connect tokens | mk trust add --network my-network --issuer <url> --subject <sub>; each server joins with the token its environment gives it |
An owner cannot add a server’s key without the server, because a key alone is public. The code a new server logs while it belongs to no network (mk claim <code> --network my-network) works too.
Your dev server
Section titled “Your dev server”mk server --join my-networkmk makes an invite for the dev server, points its connector at the Minekube API and relay, and turns on online mode, because anyone can reach the server now. Players join my-network.<domain>. mk server without --join makes it private again.
With an invite
Section titled “With an invite”mk network invite my-network --labels game=parkourIt prints a one-time token, valid for an hour (--hours, up to a week). On the server, write it to a file and name it in plugins/:
{ "directory": { "api": "https://api.staging.minekube.com" }, "relays": ["https://relay.staging.minekube.net/"], "join": { "network": "my-network", "token": "network-invite" }}The server shows the invite once. After that its key is in the network, and a restart keeps it there. --labels gives every server the invite lets in these labels, over its own. A network holds at most 100 unused invites.
With a trust rule
Section titled “With a trust rule”A server in Kubernetes already has a token from its environment: a projected service account token. A trust rule lets every server whose token matches join without an invite:
mk trust add --network my-network --issuer https://kubernetes.example --subject system:serviceaccount:games: --prefix --audience minekube --labels game=parkourIn connector.json, "join": {"network": "my-network", "token": "/ names the token file. The registry checks the token against the issuer’s published keys; no Minekube secret is stored on the server. Connector, relay and API explains how.
Check the servers
Section titled “Check the servers”mk instances --network my-network lists the servers, with their labels and whether they are online.
The connector.json reference lists every field of the file.
Related
Section titled “Related”- Labels and selectors: the labels a server gets, and how a network picks servers by them.
- Connector, relay and API: how a trust rule checks a token.
Was this helpful?
Thanks for the feedback.