Built-in ToolsMonitoring Panel

Monitoring Panel

The Colyseus Monitoring Panel is a browser-based administration tool for inspecting and managing your multiplayer server in real time. It gives you visibility into active rooms, connected clients, and room state — and lets you take actions like disposing rooms, disconnecting clients, or broadcasting messages.

Installation

This package is installed by default on new projects created via npm create colyseus-app.

npm install --save @colyseus/monitor

Then, import and mount it as an Express middleware:

app.config.ts
import { defineServer } from "colyseus";
import { monitor } from "@colyseus/monitor";
 
const server = defineServer({
    // ...
    express: (app) => {
        app.use("/monitor", monitor());
    }
});

Usage

Once mounted, start your server and navigate to http://localhost:2567/monitor in your browser.

All active rooms spawned by your server are automatically listed, along with their clients and metadata.

Features

  • List all active rooms
    • Force dispose a specific room
  • Inspect a specific room
    • View room’s state
    • Send/broadcast messages for a client
    • Force disconnect a client
⚠️

The monitoring panel exposes full control over your rooms and clients. Do not expose it in production without password protection — see Password Protection below.

Password Protection

You can use express-basic-auth to restrict access to the monitor route:

npm install --save express-basic-auth
import basicAuth from "express-basic-auth";
 
const basicAuthMiddleware = basicAuth({
    users: { "admin": "admin" },
    challenge: true
});
 
app.use("/monitor", basicAuthMiddleware, monitor());

Custom Room Listing Columns

You can customize which columns appear in the room list by passing a columns option:

app.use("/monitor", monitor({
  columns: [
    'roomId',
    'name',
    'clients',
    { metadata: "spectators" }, // display 'spectators' from metadata
    'locked',
    'elapsedTime'
  ]
}));

If unspecified, the default columns are: ['roomId', 'name', 'clients', 'maxClients', 'locked', 'elapsedTime'].