Publish a revision
mk publish takes your game from your machine to the servers of a network. It builds the project the way mk dev does, uploads its bundles as a revision, and assigns the revision to a label selector.
Before you start: you need a network with at least one server in it. See Create a network and Let servers in in Connect. During the preview, set MINEKUBE_REGISTRY=https://.
Publish to every server
Section titled “Publish to every server”In your project:
mk publish --network my-networkWithout a selector, every server of the network runs the revision. The revision is named by the hash of its bundles, so publishing the same code twice makes no new revision.
Publish to some servers
Section titled “Publish to some servers”Pass a selector with -l:
mk publish --network my-network -l channel=canaryEvery server whose labels match runs the revision. A label comes from the server itself, in its connector.json, or from the invite or trust rule that let it in. A canary is a set of servers labelled channel=canary, so you try a revision there first and then publish it to everyone.
Watch it arrive
Section titled “Watch it arrive”Each server’s connector gets the new assignment, downloads the bundles it does not have, and the Minekube plugin swaps the game in. Players stay connected. On the server, the log says Reloaded <id> (<revision>).
mk revisions --network my-network shows what runs where, since when and by whom.
Related
Section titled “Related”- Roll back and unpublish: go back to an earlier revision.
- How servers get their bundles: what happens between
mk publishand the swap. - CLI reference: every flag of
mk publish.
Was this helpful?
Thanks for the feedback.