How players connect
This page follows a player from choosing your server to standing in its world, including what can refuse them and what you can change.
Reaching the server
| Method | Details |
|---|---|
| Server browser | the server lists itself on KCDS Master unless master is off, or it binds to 127.0.0.1 with no publicAddress (Running a server) |
| Direct connect | by address in the browser, such as play.example.com:7777 or 203.0.113.7:7777; works for listed and private servers |
| Join link | kcds://join/play.example.com:7777, or kcds://server/<id> for a listed one, on your website or Discord (Private servers and join links) |
| Launcher | serverAddress in the player's kcds-launcher.json joins one server directly (Getting started) |
The server listens on one UDP port, 7777 by default. For players outside your network, it must be open in the firewall and forwarded on the router.
Checks on the way in
Any of these can refuse a player, and the server browser tells them why. The password comes before the whitelist, and both before your
playerConnecting handlers.
KCDS version. It must match the server's. Whichever way they joined, a player on another version is told which one the server runs, such as "This server runs KCDS 0.3.4.1. Your KCDS is another version: join with KCDS 0.3.4.1." The browser then offers the update, or says the server is on an older version.
Level. A server on
klasterneeds the game's DLC, and a player without it is told before anything loads.Legal copy. Their game proves to KCDS Master that its store owns the game, and brings a pass for this server (A legal copy of the game). Without one they see "This copy cannot be verified". A player on the central ban list gets no pass.
Password, if the server has one: "The gate is locked", with a password field (Password).
This server's bans, from
bans.jsonand the Bans tab of KCDS-Admin. A ban on any of the player's identifiers refuses them, showing its reason and end.Free place. A full server puts the player in its line (Join queue and whitelist).
Whitelist, if there is one: only those listed by Steam id or nickname.
Your resources. All
playerConnectinghandlers run, and any can refuse with a reason or show the waiting player a line:kcds.core.Events.on('playerConnecting', async (request) => { request.update('One moment, looking you up...'); if (bans.has(request.steamId)) { request.reject('You are banned from this server.'); } });
Loading. The game downloads the resources' client files, only changed ones after the first time, then loads the level behind the loading screen.
Events on arrival
Once admitted, a player's connection goes through these events in order:
| Event | When | Typical use |
|---|---|---|
playerConnect | the connection exists and the inventory too, but the body is loading | restore a saved inventory |
playerSpawning | their game waits behind the loading screen for a place | choose it with player.spawn(position, rotation) |
playerSpawned | the body stands in the world | dress them, set their nameplate |
playerReady | the loading screen is down and they can play; also fires in their game | greet them, open a menu |
playerDisconnect | they left, but the object still has its last values | save what you keep |
const { Events, Chat } = kcds.core; Events.on('playerSpawning', (player) => { player.spawn(new kcds.math.Vector3(1652.5, 2151.5, 37.5), { z: 90 }); }); Events.on('playerReady', (player) => { Chat.sendToPlayer(player, `Welcome, ${player.nickname}!`); }); Events.on('playerDisconnect', (player) => { savedInventories.set(player.steamId, kcds.players.Inventory.get(player)); });
Identifying the player
player.steamId, or epicId for a player who owns the game on Epic, store and storeAccount come from the licence pass and are verified.
discordId and deviceId are only what the player's game reports. player.identifiers lists them all (Identifying a
player). Use a verified one for your bans and saved data.
Troubleshooting
| The player sees | Likely cause |
|---|---|
| the server is not in the browser | master is off, it binds to 127.0.0.1, or Master cannot reach it; check for MASTER listed in the server log |
| a time-out when joining | the UDP port is not open or forwarded, or the address is wrong |
| "This copy cannot be verified" | their store is offline or signed out, or the copy is not supported (Stores) |
| "The gate is locked" | the server has a password |
| a place in a queue | the server is full (maxPlayers) |
| a refusal with your text | one of your playerConnecting handlers refused them |
The server's refusal texts
These are the exact texts, in the order the server checks. The browser's join popup shows a title for the kind of refusal, such as "The gate is locked" with a password field, or "Turned away at the gates". The server's text appears below it, in a box headed THE REALM SAYS.
| Check | The player is told |
|---|---|
| No licence pass | This server only lets in a legally owned game: join through the KCDS launcher. |
| A broken pass | Your licence pass is not valid. Rejoin through the KCDS launcher. |
| A pass the Master did not sign | Your licence pass was not signed by the KCDS Master. Rejoin through the launcher. |
| An old pass | Your licence pass expired or has an invalid lifetime. Rejoin through the launcher. |
| A pass for another server | Your licence pass is for another server. Rejoin through the KCDS launcher. |
| A pass for another connection | Your licence pass is for another connection. Rejoin through the KCDS launcher. |
| A pass used twice | Your licence pass was already used. Rejoin through the KCDS launcher. |
A store the server does not take (licence.stores) | This server does not let in games from your store. |
| A store that could not confirm the licence | Your store could not confirm a current game licence. |
A family-shared copy (licence.familySharing: false) | This server does not let in family-shared copies. |
| Sharing not known for the store | This server cannot confirm unshared ownership for this store. |
| The server's licence settings are broken | This server cannot validate game licences because its configuration is invalid. |
| Too many passes at once | This server cannot validate another licence pass yet. Please try again shortly. |
| A password and none given | This server asks for a password. |
| A wrong password | Wrong password. |
| A ban | You are banned from this server: Cheating. Until 2026-10-26 21:00 UTC. (a permanent ban has no "Until") |
| Not on the whitelist | The whitelist's reason, or: This server only admits listed players. |
request.reject(reason) | Your reason, cut to 512 bytes. |
A playerConnecting handler that throws | No text; the server log has the error. |
Each refusal goes to the server log with its cause, for example playerConnecting refused request 3: licence wrongServer, ... : wrong password,
... : banned (2ad9433eed394c0c) or ... : not on the whitelist.