Self-hosted, for Paper Minecraft servers
mcservice
A web console and live map for a family Minecraft server.
One place to run the server
mcservice is a small Node.js service that sits in front of a Paper Minecraft server. It talks to the server over RCON and systemd, and to a companion plugin, mcblockreporter, that reports what happens in the world as it happens. The result is a dashboard, a map and an API that work from any browser.
- Live status: TPS, who is online, memory and uptime, refreshed as you watch.
- Live console: the server log streamed to the page over a WebSocket, with joins and leaves counted the moment they happen. Signed-in admins can run commands from the same panel.
- Chat: broadcast a message to everyone in the game from the web.
A map that knows where everyone is
The Map page is a pannable, zoomable top-down view of the world, rendered by squaremap and drawn with Leaflet, with every rail network and landmark at its true position and scale.
- Live players: a marker for each connected player, with their face cropped from their skin, pointing the way they face and updated twice a second.
- Point and teleport: click anywhere on the map to send a player there; the service finds the ground for you.
- Player menu: follow someone around the map, send them to another player or a landmark, or heal, feed, give an item or change their game mode.
- 3D globe: a full 3D view of the world through BlueMap, linked both ways with the map so you can jump from a spot on one to the same spot on the other.
Rail networks you can drive from a browser
Point the plugin at a piece of track and it follows every connected rail, junction and lever, then reports the network back to be drawn as an interactive map.
- Flip junctions remotely: toggle any junction’s lever from the web, or in the game, and the map shows the live state either way.
- Stations from signs: a sign beside the track names a station.
- Route planning: pick two stations and mcservice finds the shortest path and sets every junction along it, in either direction.
- Learned, not guessed: which lever position sends a cart which way is recorded from real lever flips in the game. Until a junction is known, routing through it is refused rather than sending a cart the wrong way.
Blocks, landmarks and warps
- Block registry: register any block (a lever, a door, a lamp) by its coordinates or by looking at it in the game. The plugin reports every change to its state, and the dashboard can switch it back, even when nobody is nearby.
- Landmarks: save any spot by its coordinates, or wherever you are standing. Every landmark is also a one-click warp for any connected player.
- Scripted actions: small hand-written behaviours, such as opening a base’s doors and gate, that reload the moment they are saved.
Server control, behind a sign-in
Starting, stopping and restarting the server, backing up and restoring the world, and generating a fresh world (from a seed, or a random one) all run in the background, one at a time, with their progress shown on the dashboard. Generating a new world backs up the old one first. These controls and the raw console need a sign-in, checked against an existing WordPress account by a small companion WordPress plugin, and the session renews itself while the dashboard stays open.
How it’s built
Plain Node.js with no framework, no build step and no database: a hand-written HTTP router, flat JSON files written atomically, and self-contained HTML pages. Its one dependency is ws for the WebSocket channels. The companion plugin is Java, built with Gradle for Paper.