Skip to content
Get started

Run the dev network

View as Markdown

A proxy bundle needs a network to run in. The dev network is a complete one on your own machine: the same relay, proxy, servers and Minekube API as in production, on loopback ports. You program its proxy and play on it like on the dev server.

Terminal window
mk server --network --accept-eula

The dev network runs beside the dev server, on its own ports, and listens on 127.0.0.1 only:

Part Address What it does
Relay localhost:25577 Where players join. Passes them over iroh to the proxy.
Velocity 127.0.0.1:25578 The proxy, with the Minekube plugin. Offline mode, modern forwarding. Runs in the foreground.
lobby 127.0.0.1:25580, RCON 25590 A Paper server labeled stage=lobby. Players land here.
arena 127.0.0.1:25581, RCON 25591 A Paper server labeled game=arena.
Minekube API http://localhost:4776 Its registry knows every instance and its labels. Velocity finds lobby and arena by their labels through it.
Devtools http://127.0.0.1:4774 The proxy’s and the servers’ sessions.

Both Paper servers run the Minekube plugin, plus ViaVersion and ViaBackwards, so clients older than the servers can play too. They accept players only through the proxy. Stopping Velocity (end, or Ctrl-C) stops the whole network.

In the project:

Terminal window
mk dev .

mk dev builds the project’s velocity bundle (proxy/velocity.ts in a project from mk init) into the proxy’s plugins/minekube/bundles/<name>.js and reinstalls it on every save. A project with a paper bundle also gets its game installed on the dev server.

Join localhost:25577 with Minecraft. You land on lobby; Velocity’s /server arena moves you, and /lobby brings you back. When you save, players see [proxy] Reloaded <id> (<revision>) in chat, and nobody disconnects. On the dev proxy every player counts as a developer and sees these messages; the runtime messages are those of a game, in the proxy’s log.

Was this helpful?