Get started with networks
In this guide you put a Paper server into a network of your own. Players then join the network’s address, and the server needs no open port. You write no code.
You need:
- A Paper server for Minecraft 1.21 or newer, running on Java 22 or newer. The connector needs Java 22.
- Bun 1.4.4 or newer, for the Minekube CLI.
- Minecraft: Java Edition, to log in and to join.
1. Install the CLI
Section titled “1. Install the CLI”bun add -g https://github.com/minekube/minekube/releases/latest/download/minekube-cli.tgzThe CLI is minekube, and mk for short. During the preview, point it at the staging Minekube API:
export MINEKUBE_API=https://api.staging.minekube.com2. Log in and create a network
Section titled “2. Log in and create a network”-
Join the Minekube hub at
play.staging.minekube.netwith Minecraft. -
Run
mk login, click [Log in] in the hub’s chat and enter the code it shows. -
Create your network:
Terminal window mk network create my-network
The name must be free. Your account owns the network.
3. Install the Minekube plugin
Section titled “3. Install the Minekube plugin”Download the Minekube plugin for Paper from the latest release, minekube-paper-runtime.jar, into the server’s plugins/ folder. Start the server once and stop it again. The plugin creates its folder, plugins/Minekube/.
4. Let the server in
Section titled “4. Let the server in”Make a one-time invite for the server:
mk network invite my-networkIt prints a token that works once, for an hour. On the server, write the token to plugins/. Then create plugins/:
{ "directory": { "api": "https://api.staging.minekube.com" }, "relays": ["https://relay.staging.minekube.net/"], "join": { "network": "my-network", "token": "network-invite" }, "labels": { "minekube.com/entry": "true" }}directorynames the Minekube API, andrelaysthe relays the connector may use.joinnames the network and the file with the invite. Paths are relative to the plugin folder.- The label
minekube.com/entry=truemarks this server as the one players land on when they join the network’s address.
Keep online-mode=true in server.properties: anyone can reach the server now.
Start the server. The connector makes the server’s key, shows the invite once, and from then on the key is in the network.
5. Check and join
Section titled “5. Check and join”mk instances --network my-networkThe list shows your server, its labels and whether it is online. In Minecraft, join my-network.staging.minekube.net. You land on your server, through the relay, with no open port.
Next steps
Section titled “Next steps”- Let servers in: trust rules for Kubernetes and CI, and your dev server with one flag.
- Labels and selectors: give servers labels and pick them by selector.
- Deploy a version: run Games bundles on the servers of your network.
Was this helpful?
Thanks for the feedback.