Skip to content
Docs
Get started

Host a room

Create a room in the Creator Portal and launch it from Node with @disko-game/room.

A room is a program you run, on your computer or a server. Players' browsers connect straight to it, and it runs the game for everyone in it. disko's own services only help players find your room and check who they are.

Your room program uses its room id and token to register with disko and appear in the directory. It loads a game release from the registry. Players find the room in the directory and then connect directly to your room.

1. Create a room identity

In the Creator Portal, open Rooms and create a room. You get a room id and a hosting token, shown only once.

The token is the room's password: anyone who has it can run a room under your name. Keep it out of your code and your repository.

2. Create a room project

sh

The project has two files:

  • room.js holds the host function, which starts the room and decides how it behaves, for example what happens to chat. This is where your own code goes.

  • main.js reads the settings from environment variables and calls the host function. It's what you run.

room.js

3. Run it

Pass the room id, the token and the release to load:

sh

To find a game, browse the Registry. Each game's page has its description, its versions and the release to copy.

When the room is ready, share room.link (https://play.disko.ooo/?room=<id>) with players. To host on a server, open UDP ports 4433–4532 in its firewall; see Running on a server.

Next