Admin PanelLive rooms

Live rooms

The admin panel includes a live room inspector that lists every active room across the cluster. It exposes the operational actions you’d otherwise wire by hand. You can kick a client, lock or unlock for matchmaking, edit state in place, or force-dispose a stuck room. No per-room wiring is required. The inspector works against any matchmaker driver supported by @colyseus/core.

Listing rooms

The Rooms resource in the panel lists every room the matchmaker driver knows about, including:

  • roomId and handler name
  • Current clients count and maxClients
  • locked / private flags, and the room’s publicAddress
  • createdAt and elapsed time
  • processId (which Node process is hosting the room, useful in multi-process deployments)
  • Live state tree and metadata, accessible from the room’s detail page

Clicking through to a room’s detail page loads the state tree, the client list, and the action buttons below.

Actions

Every mutation listed here is recorded to the audit log with resource: "rooms" and the relevant action enum.

Kick a client

Drop a single client from a room with an optional reason. The reason surfaces in the client’s WebSocket close frame so the game can react (show a message, redirect, etc.).

Records action: "room.kick" with payload { sessionId, reason }.

Lock / unlock

Toggle the room’s locked flag. Locked rooms are skipped by the matchmaker. Locking is useful for draining a room (let current clients finish; no new joins) or holding it for a private match.

Records action: "room.lock" or "room.unlock".

Edit state

The detail page renders the room’s state tree as JSON. You can mutate values directly from the panel. Direct edits are useful for adjusting in-flight match state (revert a bug, grant a permission, set a flag) without a server restart.

⚠️

State edits are immediate and broadcast to all connected clients on the next patch. Use sparingly and prefer adding a dedicated custom action for repeatable workflows (see Resources → Custom actions).

Records action: "room.state.edit" with the touched path and its new value, or action: "room.state.delete" when removing fields.

Force-dispose

Terminate a room immediately, regardless of its current state. All clients are disconnected; the room is removed from the matchmaker.

Records action: "room.dispose".

Multi-process visibility

The room inspector reads from your configured matchmaker driver, so visibility scales with the driver:

DriverVisibility
LocalDriver (default)Only rooms on the current process. Fine for development.
RedisDriver, DatabaseDriverAll rooms across all processes. Recommended for production.

If you don’t see rooms you expect, confirm the driver is shared across processes (Redis or DB-backed) rather than the default in-memory LocalDriver.

RBAC

By default, the rooms resource follows the standard role rules:

  • Admin: full read + all actions.
  • Mod: no access without the rooms scope. Assign with db.moderation.assignMod(userId, "rooms"). Scoped mods get read plus kick/lock/state edits. Dispose stays admin-only regardless (it maps to the delete action, which mods never have).
  • User: cannot open the panel UI (403), but direct API calls to list/read endpoints are permitted.

Next steps