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

MethodDetails
Server browserthe 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 connectby address in the browser, such as play.example.com:7777 or 203.0.113.7:7777; works for listed and private servers
Join linkkcds://join/play.example.com:7777, or kcds://server/<id> for a listed one, on your website or Discord (Private servers and join links)
LauncherserverAddress 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.

  1. 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.

  2. Level. A server on klaster needs the game's DLC, and a player without it is told before anything loads.

  3. 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.

  4. Password, if the server has one: "The gate is locked", with a password field (Password).

  5. This server's bans, from bans.json and the Bans tab of KCDS-Admin. A ban on any of the player's identifiers refuses them, showing its reason and end.

  6. Free place. A full server puts the player in its line (Join queue and whitelist).

  7. Whitelist, if there is one: only those listed by Steam id or nickname.

  8. Your resources. All playerConnecting handlers 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.');
      }
    });
  9. 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:

EventWhenTypical use
playerConnectthe connection exists and the inventory too, but the body is loadingrestore a saved inventory
playerSpawningtheir game waits behind the loading screen for a placechoose it with player.spawn(position, rotation)
playerSpawnedthe body stands in the worlddress them, set their nameplate
playerReadythe loading screen is down and they can play; also fires in their gamegreet them, open a menu
playerDisconnectthey left, but the object still has its last valuessave 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 seesLikely cause
the server is not in the browsermaster 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 joiningthe 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 queuethe server is full (maxPlayers)
a refusal with your textone 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.

CheckThe player is told
No licence passThis server only lets in a legally owned game: join through the KCDS launcher.
A broken passYour licence pass is not valid. Rejoin through the KCDS launcher.
A pass the Master did not signYour licence pass was not signed by the KCDS Master. Rejoin through the launcher.
An old passYour licence pass expired or has an invalid lifetime. Rejoin through the launcher.
A pass for another serverYour licence pass is for another server. Rejoin through the KCDS launcher.
A pass for another connectionYour licence pass is for another connection. Rejoin through the KCDS launcher.
A pass used twiceYour 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 licenceYour 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 storeThis server cannot confirm unshared ownership for this store.
The server's licence settings are brokenThis server cannot validate game licences because its configuration is invalid.
Too many passes at onceThis server cannot validate another licence pass yet. Please try again shortly.
A password and none givenThis server asks for a password.
A wrong passwordWrong password.
A banYou are banned from this server: Cheating. Until 2026-10-26 21:00 UTC. (a permanent ban has no "Until")
Not on the whitelistThe whitelist's reason, or: This server only admits listed players.
request.reject(reason)Your reason, cut to 512 bytes.
A playerConnecting handler that throwsNo 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.