Multiplayer Game Server for Node.js

Focus on the gameplay instead of networking.

If you're a solo indie developer, small or large game studio, Colyseus will allow you to deliver realtime or turn-based multiplayer games in record time.

Supported platforms

Colyseus comes with official support for these platforms.

Need a client for a different platform? Share your interest on the discussion board!


Sneak peak on basic usage. See more examples.


              import * as http from "http";
import { Server, Room } from "colyseus";

// Create HTTP & WebSocket servers
const server = http.createServer();
const gameServer = new Server({ server });

class ChatRoom extends Room {
  // maximum number of clients per active session
  maxClients = 4;

  onInit () {
      this.setState({ messages: [] });
  onJoin (client) {
      this.state.messages.push(`${ client.sessionId } joined.`);
  onMessage (client, data) {

// Register ChatRoom as "chat"
gameServer.register("chat", ChatRoom);


              const client = new Colyseus.Client("ws://localhost:2657");
const room = client.join("chat");

room.onJoin.add(() => {
  console.log(`${ room.sessionId } joined!`)

room.onStateChange.add((state) => {
  console.log("new state:", state)

// listen for changes on a path on the state
room.listen("messages/:index", (change) => {
  console.log(change.operation); // ~> "add"
  console.log(change.path.index); // ~> "1"
  console.log(change.value); // ~> "Hello world!"

room.send("Hello world!");


Authoritative server. Designed to be intuitive and simple to use.


A selection of games powered by Colyseus, made by the community.

Work for hire

Hi, I'm Endel. I'm working as a full-time freelancer since 2018.
I've successfully delivered 10+ projects since I started.


Get in touch!