Create your own server

A KcdM server is a small standalone program that runs on a Linux or Windows machine — a VPS, a dedicated server or your own PC. Once it is running, it announces itself to the platform and shows up in the server list of every KcdM launcher. It contains no game files: each player uses their own copy of Kingdom Come: Deliverance II. If you have ever run a FiveM or RedM server, you will feel at home: same layout, same gestures.

Linux (x64)

Recommended for an always-on server: any 64-bit distribution (Debian, Ubuntu, Alma, Rocky…) — the server is fully static, nothing to install. One CPU core and 1 GB of RAM are enough to start.

Checking the latest version…

Windows (x64)

Ideal to host a game for your friends from your own PC, or on a Windows server. Windows 10 / 11 or Windows Server, 64-bit. Standalone too.

Checking the latest version…

The server folder (same on Linux and Windows)

my-server/               ← THE ROOT: everything that is yours
├── artefact/            ← the KcdM box: replaced as a whole at every update, never edited by hand
│   ├── kcdm-server      ← the server (kcdm-server.exe on Windows), standalone
│   ├── run.sh | run.bat ← start it by hand
│   ├── eggxa/           ← what ships with the engine (API definitions for your editor, system resources)
│   ├── modele/          ← a fresh server: server.cfg example, default logo
│   ├── installation/    ← systemd service, daily database backup
│   ├── docs/            ← LISEZMOI, RESSOURCES (writing resources)
│   ├── licences/        ← third-party notices
│   ├── crashes/         ← crash reports
│   └── version.json     ← version, build date, file hashes
├── resources/           ← YOUR resources (Lua scripts), [category] folders welcome
├── logs/                ← console.log and serveur.log, rotated
├── server.cfg           ← YOUR configuration
└── icon.svg|png|jpg     ← YOUR logo (server list, launcher, this site)

The server runs in the root. Updating means swapping artefact/; backing up your server means backing up the root (minus artefact/).

Quick start on Linux

mkdir -p ~/my-server && cd ~/my-server
curl -fO https://eggxa.com/artifacts/kcdm-server-latest-linux.tar.xz
tar xJf kcdm-server-latest-linux.tar.xz        # gives artefact/
./artefact/run.sh

The first start creates server.cfg and icon.svg in the root from artefact/modele/. Set at least the server name, the public card (sets …) and the database (MariaDB on the same machine — see artefact/docs/LISEZMOI.md), then start again. A few seconds later it appears in the server list.

Keep it online (systemd service)

sed -e "s#UTILISATEUR#$USER#" -e "s#RACINE#$PWD#g" artefact/installation/kcdm-server.service > /tmp/kcdm-server.service
sudo mv /tmp/kcdm-server.service /etc/systemd/system/kcdm-server.service
sudo systemctl daemon-reload && sudo systemctl enable --now kcdm-server
tail -f logs/console.log

Open the game port

sudo ufw allow 27215/udp

Open UDP 27215 in your hosting provider's firewall too, if it has one.

Quick start on Windows

  1. Create a folder, for example C:\MyServer, and extract the .zip into it: you get C:\MyServer\artefact\.
  2. Double-click artefact\run.bat. The first start creates server.cfg and icon.svg in C:\MyServer; edit server.cfg, then start again.
  3. Allow kcdm-server.exe through the Windows firewall (UDP 27215) when Windows asks.
  4. To let players from the internet join, forward UDP port 27215 on your router to this PC.

Playing on the same PC or local network? Your server also appears in your own launcher, even without opening any port.

Configure: server.cfg

One directive per line, # starts a comment — the directives of FXServer, when they make sense for KcdM. The file is read at every start and is never overwritten by an update.

DirectiveWhat it does
endpoint_add_udp "0.0.0.0:27215"UDP game port.
sv_hostnameName shown in the server list.
sets sv_projectName / sets sv_projectDescPublic card: project name, short sentence shown under the name (120 characters max).
sets tagsComma-separated keywords shown in the list and used by the filters (e.g. roleplay,pvp).
sets localeLanguage of the server (e.g. fr-FR); the region shown in the list is derived from it (sv_region overrides).
sv_maxclientsMaximum number of players.
sv_locked1 shows a lock in the list (allowlisted server).
load_server_iconLogo file (SVG, PNG or JPG, 96 × 96 minimum, 256 KB max). Without it, icon.svg / icon.png / icon.jpg in the root is picked up automatically.
set kcdm_dbMariaDB connection (mandatory).
ensureStarts a resource from resources/.

The old names (sv_port, sv_icon, sv_tags, sv_projectDesc) still work, with a hint at start-up.

Update your server (= swap the box)

Stop the server, keep the old box aside, extract the new one, start again. Nothing else in the root is touched. artefact/version.json shows the installed version.

sudo systemctl stop kcdm-server
mv artefact artefact.old
curl -fO https://eggxa.com/artifacts/kcdm-server-latest-linux.tar.xz
tar xJf kcdm-server-latest-linux.tar.xz
sudo systemctl start kcdm-server

Verify a box

Each box is published with its SHA-256 hash and an Ed25519 signature (.sig, base64) made with the platform's private key; the public key is published next to them. A box whose signature does not match has been altered: do not install it.

sha256sum kcdm-server-0.9.0-linux.tar.xz          # compare with the hash shown above
openssl pkeyutl -verify -pubin -inkey kcdm-server-cle_publique.pem -rawin -in kcdm-server-0.9.0-linux.tar.xz \
  -sigfile <(base64 -d kcdm-server-0.9.0-linux.tar.xz.sig)