Ever wanted to build a real-time dashboard that monitors multiple Minecraft servers at once? In this tutorial, we'll build one using Node.js, Express, and the free Minecraft ServerHub API.
What We're Building
A web dashboard that:
- Monitors multiple Minecraft servers simultaneously
- Shows real-time player counts, version info, and MOTD
- Auto-refreshes every 30 seconds
- Displays server status with color-coded indicators
Prerequisites
- Node.js 18+
- Basic JavaScript/HTML knowledge
- A list of Minecraft server IPs to monitor
Step 1: Project Setup
mkdir mc-dashboard && cd mc-dashboard
npm init -y
npm install express
Step 2: Create the API Client
The Minecraft ServerHub API provides free endpoints to query any Java or Bedrock server. No API key required.
Create api.js:
const SERVERS = [
'play.hypixel.net',
'mc.hypixel.net',
'2b2t.org',
'play.cubecraft.net'
];
async function fetchServerStatus(address) {
const url = 'https://minecraft-serverhub.com/api/server/java/' + address;
const res = await fetch(url);
if (!res.ok) return { address, online: false };
const data = await res.json();
return {
address,
online: data.online,
players: data.players || { online: 0, max: 0 },
version: data.version?.name || 'Unknown',
motd: data.motd?.clean || '',
icon: data.icon || null
};
}
async function fetchAllServers() {
return Promise.all(SERVERS.map(fetchServerStatus));
}
module.exports = { fetchAllServers, SERVERS };
Step 3: Build the Express Server
Create server.js:
const express = require('express');
const { fetchAllServers } = require('./api');
const app = express();
app.get('/api/status', async (req, res) => {
const servers = await fetchAllServers();
res.json(servers);
});
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html');
});
app.listen(3000, () => {
console.log('Dashboard running at http://localhost:3000');
});
Step 4: Create the Dashboard UI
Create index.html with a clean, dark-themed design. The dashboard fetches data from our Express API endpoint and renders a card for each server. Each card shows the server address, player count, version, and MOTD with a green/red border indicating online/offline status.
The frontend uses vanilla JavaScript with fetch() to poll our /api/status endpoint every 30 seconds, keeping the dashboard always up to date.
Step 5: Add Status Badges
Want to embed server status on your website or forum? Use the minecraft-server-badge npm package:
npm install minecraft-server-badge
const { badge, html } = require('minecraft-server-badge');
// Generate a status badge URL
const badgeUrl = badge('play.hypixel.net', { style: 'rounded' });
// Or get ready-to-use HTML embed code
const embed = html('play.hypixel.net', { dark: true });
You can also generate badges visually with the Badge Generator — no code needed.
Step 6: Run It
node server.js
Open http://localhost:3000 and you'll see your live dashboard monitoring all configured servers.
Going Further
Some ideas to extend the dashboard:
- Historical data: Store player counts in a database and graph trends over time
- Alerts: Send Discord webhooks when a server goes offline
-
Bedrock support: The API also supports Bedrock servers at
/api/server/bedrock/address - Statistics: Check out live Minecraft ecosystem stats for global player trends
Resources
- Minecraft ServerHub — Free server monitoring platform
- API Documentation — Full REST API reference
- minecraft-server-badge on npm — Embeddable status badges
- Source code on GitHub — Open-source badge generator
Built with the free Minecraft ServerHub API. No API key required, no rate limits for reasonable use.
Top comments (0)