Running a Server

Creating Multiple Servers in One Killing Floor Folder

This guide describes how to run multiple dedicated Killing Floor servers from one game folder without creating separate game copies.

Why is this needed?

This is useful if you want to run multiple servers on different ports without creating separate game copies due to port and configuration file conflicts.

Preparing Files

In the System folder, create copies of the following files for each server:

  1. kf_server_launcher.bat → kf_server_launcher1.bat, kf_server_launcher2.bat, kf_server_launcher3.bat
  2. ucc.exe → ucc1.exe, ucc2.exe, ucc3.exe
  3. KillingFloor.ini → KillingFloor1.ini, KillingFloor2.ini, KillingFloor3.ini

Configuring bat Files

Option 1: Launch All Servers Simultaneously

batch
start ucc1 server KF-EvilSantasLair.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?ini=killingfloor1.ini
start ucc2 server KF-EvilSantasLair.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?ini=killingfloor2.ini
start ucc3 server KF-EvilSantasLair.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?ini=killingfloor3.ini

Option 2: Crash Protection with Auto-Restart

For each server, create a separate bat file with crash protection:

kf_server_launcher1.bat:

batch
@echo off
cls
echo Protecting srcds from crashes...
title log
:srcds
echo (%time%) KF server started.
start /wait ucc1 server KF-EvilSantasLair.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?ini=killingfloor1.ini
echo (%time%) WARNING: srcds closed or crashed, restarting....
goto srcds

Similarly create kf_server_launcher2.bat and kf_server_launcher3.bat with corresponding numbers.

batch
start kf_server_launcher1.bat
start kf_server_launcher2.bat
start kf_server_launcher3.bat

Configuring Ports in KillingFloor.ini

Important! For each server, you need to configure different ports in the corresponding ini files.

Port configuration example:

  • Server 1 (KillingFloor1.ini):

    • 7707 UDP/IP (game port)
    • 7708 UDP/IP (query port)
    • 7717 UDP/IP (query port)
    • 28852 TCP/IP and UDP (query port)
    • 8075 TCP/IP (WebAdmin port)
  • Server 2 (KillingFloor2.ini):

    • 7709 UDP/IP (game port)
    • 7710 UDP/IP (query port)
    • 7718 UDP/IP (query port)
    • 28853 TCP/IP and UDP (query port)
    • 8076 TCP/IP (WebAdmin port)
  • Server 3 (KillingFloor3.ini):

    • 7711 UDP/IP (game port)
    • 7712 UDP/IP (query port)
    • 7719 UDP/IP (query port)
    • 28854 TCP/IP and UDP (query port)
    • 8077 TCP/IP (WebAdmin port)

Also don't forget to configure different ports for Steam (20560 UDP/IP for the first server, 20561 for the second, etc.).

Important Notes

  • Make sure all ports are unique for each server
  • Check that ports are not occupied by other applications
  • Configure firewall and router to forward all necessary ports
  • Each server must have its own unique configuration
  • Do not give the second server game port 7717: the first server already uses it as its GameSpy port, so the second server simply shuts down. In the "Доп.нформация" thread (killingfloor.ru forum) the suggested set for the second server was shifted by +100: 7807 UDP (game), 7808 UDP (query), 7817 UDP (GameSpy), 28952 TCP and UDP (master server), 20660 UDP (Steam).

Several servers and the client on one PC: the Q_UTF16ToUTF8 error

From killingfloor.ru forum threads (2012).

  • The error. On a map change the server shows a window saying the procedure entry point Q_UTF16ToUTF8 could not be located in the vstdlib_s.dll library, and the map does not change until the window is closed ("Map change" thread). According to denfil777, this happens when the client and the server, or two copies of the server, run on the same machine under the same Windows user; after he started the server under a different account, the error went away. The thread author himself was helped by different advice from the same thread: in KillingFloor.ini in the System folder, set bUseMapList= and bMapVote= to True.
  • Encoding of KillingFloor.ini. In the "Procedure entry point" thread, Kkos ran 3 servers from one folder (Windows 7 x64, Steam client and server). He linked the error (with UTF16toUTF8 in its text) to having re-saved KillingFloor.ini from ANSI to UCS-2 to write server messages in Russian: restoring the original encoding made the error go away, though later it came back. In the end he wrote that once the error appeared it was enough to close both servers and start them again.
  • The client does not start next to the server. In the "Problem running 2 clients at once" thread, the game would not launch while a dedicated server was running on the same PC. The advice was to run the server under a separate Windows user and the game under your own, or to use the Sandboxie program. Rainishе warned that under Sandboxie each server keeps its stats separately, so a shared database for several servers is out of the question; Proton replied that Sandboxie can be configured so that the server may change any file in any folder.