Skip to content

Putting a server on the public list

A server announces itself to the public list at kcd-mp.com once a minute, and every launcher’s Servers tab shows what the list has. Nothing has to be registered: a server that can be reached is on the list from its first minute and off it three minutes after its last announcement. The settings are [master] and [server] in server.toml (Server configuration).

The server takes one UDP port, [server] port (7777 by default). Open it on the machine’s firewall and, behind a home router, forward it to the machine - UDP, not TCP. Two servers on one machine take two ports.

The list shows a server under the address it sees the announcement come from - the machine’s public address, which is right for a server on a rented box or behind a plain home connection. When it is not - a server that should be found under a hostname, or one behind an address the list cannot see - name it:

[master]
url = "https://kcd-mp.com/server-list" # the public list; "" = announce nowhere (a private server)
interval_seconds = 60 # how often
public_address = "" # "" = the address the list sees; else a hostname or an address

url = "" keeps a server off the list altogether - a test server, a private one for friends who connect by address. The environment variables KCDMP_MASTER_URL and KCDMP_MASTER_ADDRESS stand in for the two addresses when set, and the command line’s --master / --master-address beat both.

The list carries the server’s name, its level, the players on it against max_players, the game mode’s name, the server’s version and whether a password is needed:

[server]
name = "KCD:MP dev server" # the name in the list and in the welcome
motd = "" # a line shown to every joining player
password = "" # players must type it to join; "" = open
max_players = 32
level = "klaster" # klaster, trosecko or kutnohorsko

A player picks the server in the launcher’s Servers tab (or types its address under Direct connect), gives the password if there is one, and the launcher boots their game onto the server’s level. A client and a server only play together on the same protocol number - the release notes give it - so a server is updated together with the client release; [server] build_hash can further require one game build.

The list is also a page on the website, kcd-mp.com/server-list, with the same entries.

  • Admins: [accounts] admins lists the registered names whose owners may use the server’s own commands after /login (Setting up); [commands] public names the built-ins anyone may use, disabled switches some off.
  • Registration: [accounts] registration = false stops new /register claims once your regulars have theirs; login_hold keeps a registered name frozen in a world of its own until it logs in, so nobody plays under it meanwhile.
  • Bans: /kickban <player> [minutes] and /unban in the chat, or a game mode’s own rules; the bans live next to the player records.
  • Cheating: the server owns every player’s health, stamina, items and position - it judges what the clients report against its own record, and the world data sharpens that judgement: the terrain and the collision geometry catch a player through a wall or in the air, the tables make a hit what the game says it is, and the inventory audit ([audit]) catches items a player cannot explain.