Running a Server

KF1 Dedicated Server: SteamCMD Install, Ports, Admin, Redirect

This is a hands-on reference for running a Killing Floor 1 dedicated server, based on the community wiki's server guide. It covers the exact ports, the SteamCMD install, the main KillingFloor.ini settings, the launch command, admin setup, map redirects and mutators. For the bigger picture (when a dedicated server makes sense, common mistakes) read Killing Floor dedicated server setup first.

A dedicated server is useful for LAN games or for hosting your friends if you have a good connection. There are two ways to start one:

  1. Quick: in the game go to Host Game, configure the match and click Dedicated in the bottom-right corner.
  2. Detailed: install the standalone server as below. You get full control and your settings persist between sessions.

Ports

Default ports:

PortProtocolPurpose
7707UDPGame
7708UDPQuery
7717UDPGameSpy query
8075TCPWebAdmin
20560UDPSteam
28852TCP and UDPMaster server browser

If you move the game port, every other port moves by the same offset. With the game port at 7709 (+2) you get 7709, 7710, 7719, 8077, 20562 and 28854.

You normally only need this when running several servers on one machine; otherwise keep the defaults. To change them, edit the server's KillingFloor.ini:

[URL]
Port=7707

[IpDrv.UdpGamespyQuery]
OldQueryPortNumber=7717

[UWeb.WebServer]
ListenPort=8075

The remaining ports follow automatically. Router and firewall setup is covered in Ports and NAT, and running several instances in Multiple servers in the same folder.

Installing with SteamCMD

Since May 2012 the server is installed and updated through SteamCMD, Valve's command-line client, which replaced the old HLDSUpdateTool.

  1. Create a separate Steam account for the server. It does not need to own any games; it is only used to download server files.
  2. Download SteamCMD for Windows from Valve's developer wiki and extract it into an empty folder, for example C:\SteamCMD\.
  3. Create a folder for the server, for example C:\killingfloor\.
  4. In Notepad, write one line:
steamcmd +login <user> <password> +force_install_dir C:\killingfloor\ +app_update 215350 +exit
  1. Replace <user> and <password> with the server account details and the folder with your own path.
  2. Save the file into the SteamCMD folder with a .bat extension and double-click it.

SteamCMD updates itself, downloads the server files, and closes when done. If Steam Guard is enabled you will be asked for the code sent by email. To update later, stop the server and run the same .bat again.

If SteamCMD will not download

Tips from the thread "Создание выделенного сервера для Windows через steamcmd" (Creating a Windows dedicated server with steamcmd, killingfloor.ru forum, 2012):

  • No spaces in the password. With a space in the password SteamCMD reported a wrong password; one poster had to register another account.
  • The window closes immediately. Create a batch file next to steamcmd.exe so you can read the error:
steamcmd.exe
pause
  • Steam Guard. Either disable it on the server account or, if your commands live in a script file, add set_steam_guard_code <Steam_Guard_code> as the first line.
  • A script instead of a long command line. Put the commands into a text file (for example steamcmd.txt) and run steamcmd.exe +runscript steamcmd.txt, for instance from a shortcut. The same shortcut both downloads and updates the server.
  • ERROR! Failed to request AppInfo update, not online or not logged into Steam. According to the Valve wiki quoted on the forum, remove the Steam folder from the drive root: rd /s c:\Steam.
  • You cannot pick a specific server version: the latest one is always downloaded.
  • Pick a server folder without Cyrillic letters or spaces. You can add validate to the install line (+app_update 215350 validate) to verify the files.
  • The path to SteamCMD itself must not contain Cyrillic either, otherwise it fails on start with [ 0%] !!! Fatal Error: %appname% cannot run from a folder path that includes non-English characters. Logging in as anonymous does not work for the KF server; you need a Steam account. If you skip force_install_dir, the server is installed into .\steamapps\common (Flame, thread "[article series] Creating a Killing Floor server", killingfloor.ru forum).

Basic configuration

All settings are in KillingFloor.ini (full reference: KillingFloor.ini location). The first values to change:

  • ServerName=
  • GamePassword=
  • GameDifficulty=

GameDifficulty values:

ValueDifficulty
1.0Beginner
2.0Normal
4.0Hard
5.0Suicidal
7.0Hell on Earth

KFGameLength sets the number of waves:

ValueLength
0Short, 4 waves
1Normal, 7 waves
2Long, 10 waves
3Custom, uses the sandbox settings in the INI

Custom length is explained in Sandbox and custom game settings.

Map voting is strongly recommended:

bMapVote=True
RepeatLimit=0
bUseMapList=True

Where these lines live, according to the killingfloor.ru forum thread "Помогите включить голосование за карту" (a listen server with the KFMapVote mutator, where the voting checkboxes in the server settings would not stay ticked): bMapVote=True is set in the voting handler section (KFMapVote.ini, section [KFMapVote.KFVotingHandler]; in KillingFloor.ini the handler is chosen with VotingHandlerType=KFMapVote.KFVotingHandler in [Engine.GameInfo]), and bUseMapList=False must be changed to bUseMapList=True in the [xVoting.DefaultMapListLoader] section of KillingFloor.ini. Then at the end of a map players vote only from the list of maps you selected, not from every map installed.

Warning: never edit Default.ini. Make all changes in KillingFloor.ini.

Launching the server

The server's System folder contains kf_server_launcher.bat. Double-click it to start. The default line is:

ucc server KF-Bedlam.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6

That starts on the map KF-Bedlam with the standard game type, Valve Anti-Cheat enabled and up to six players.

To run several instances on a machine with multiple IP addresses, append ?multihome=0.0.0.0 (with the IP you want to bind):

ucc server KF-Bedlam.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?multihome=0.0.0.0

A home server or a simple setup usually does not need multihome.

Admins and WebAdmin

Enable both WebAdmin and in-game admin; they complement each other. WebAdmin is a browser interface for changing server settings remotely without editing the INI by hand, and it is worth learning properly.

Single admin via the command line

Append to the launch line in kf_server_launcher.bat:

?AdminName=XXXXX?AdminPassword=XXXXX

For example:

ucc server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?AdminName=xxxx?AdminPassword=xxxxx

Multiple admins

Useful for clan servers where different people get different rights. In KillingFloor.ini set:

[Engine.GameInfo]
AccessControlClass=xAdmin.AccessControlIni

On the next start the server creates xAdmin.ini in System; add admins there or through WebAdmin. Important: after this change the WebAdmin login resets to user Admin, password Admin. Change it right after your first login. Groups and permissions in detail: Admins with different rights (xAdmin).

Opening WebAdmin

Go to http://YOUR_SERVER_IP:8075 in a browser. It can also be opened through the Steam overlay browser.

Logging in as admin in-game

Open the console with ~ (or ') and type:

  • single admin: adminlogin <adminpassword> (several people can share the same password);
  • multiple admins: adminlogin <username> <password> (each admin has their own).

Admins currently have to log in again after every map change, so a bind helps:

  • Method 1: type preferences in the console and bind a key to the command in the advanced settings window.
  • Method 2: in the console, for example for the M key: SET INPUT m adminlogin <adminpassword> or SET INPUT m adminlogin <username> <password>. This writes M=adminlogin <password> into killingfloor\System\User.ini.
  • Method 3: add the line directly to User.ini, e.g. N=adminlogin <username> <password>. Binds in that file are easy to edit or remove.

More binds: Chat bind and Useful binds.

Admin commands

  • Force a map change: vote for a map in Map Vote (your vote forces it), or type admin map <mapname> (no .rom needed).
  • Kick and ban: if Vote Kick is enabled, right-click a player's name for an extended Kick/Ban option. Logged-in admins are immune to vote kicks.
  • Center-screen message: admin adminsay <message>.
  • Change properties live: admin set <package>.<classname> <property> <value>, for example admin set engine.gameinfo gamedifficulty 1 (Beginner) or ... gamedifficulty 2 (Normal). Mind the spaces.
  • Pause: enable bAdminCanPause=True under [Engine.GameInfo] (or in WebAdmin), log in, then type pause. Type it again or fire your weapon to resume.

Full list: Admin console commands.

Custom maps through a redirect

Maps made with the KF SDK can be downloaded automatically by joining players. A redirect makes that fast:

  1. Put the custom map into the server's Maps folder.
  2. In System, create a .bat with ucc compress ..\maps\<mapname>.rom. This produces <mapname>.rom.uz2. For example, KF-WestLondonNight shrinks from 10.7 MB to 1.78 MB, saving download time and bandwidth. You need ucc.exe itself: it is in the System folder of a dedicated server downloaded through SteamCMD, or of the map editor (SDK). In the "Архивация файлов для KF в Uz2" (packing KF files into uz2) thread on the killingfloor.ru forum, a separately downloaded ucc.exe asked for missing dlls, and the advice was exactly that: download the server through SteamCMD or install the map editor.
  3. To compress every map in the folder at once, use a batch like compress_maps.bat:
for /f "tokens=*" %%a in ("C:\killingfloorServer\maps\*.rom") do ucc compress %%a

It also compresses the stock maps, but saves time when you have many custom ones.

The reverse, to get a map out of someone else's .uz2: ucc decompress <file>.uz2. For batch unpacking, the killingfloor.ru forum used a Decompress.exe wrapper by ALEX_GREEN. 4. Move the .uz2 files out of Maps and upload them to a web host, e.g. http://www.yourhost.com/maps/. 5. In KillingFloor.ini, under [IpDrv.HTTPDownload], set RedirectToURL=http://www.yourhost.com/maps/ (keep the trailing slash). UseCompression=True is already on by default. 6. Add the map to the map list. The first time, use WebAdmin: Defaults > Maps, move maps from "Maps Not In Cycle" to "Maps In Cycle" and save. It writes a block like this at the end of the INI:

[KFMod.KFMaplist]
MapNum=0
Maps=KF-<map name>
Maps=KF-<map name>
  1. Restart the map or the server and vote for the new map.

    In older server versions (around 2011, per the "Downloading maps and extra content from the server" thread on the killingfloor.ru forum) the map list lived in the [DefaultKF MaplistRecord] section of KillingFloor.ini.

After that you can add maps by editing that block directly. With no web host you can test with a free file host, or run your own web server (for example Apache) on the server PC. More: Fast download and Manual map installation.

Custom mutators

Mutators change gameplay beyond the defaults. Mutators that make subtle changes can be whitelisted and keep perks and achievements working; mutators that speed up perk or achievement progress are not whitelisted and disable both on your server. The admin decides which to run. See Whitelisted mutators.

Example: KF Anti-Blocker turns off player collision during trader time, so nobody can block the trader door.

  1. Download the mutator.
  2. Copy MutKFAntiBlocker.ucl and MutKFAntiBlocker.u into the server's System folder.
  3. Stop the server and either add ?Mutator=MutKFAntiBlocker.MutKFAntiBlocker to the launch line, or restart and enable it in WebAdmin > Mutators, click Set Selected Mutators and restart the map.

WebAdmin detects a mutator once its .u and .ucl files are in System. If one does not show up, add it manually under [Engine.GameEngine]:

ServerPackages=MutKFAntiBlocker

More on this: How to add a mutator to the server.

Common startup problems

Fixes from killingfloor.ru forum threads; each item names its thread.

  • Failed to load 'KF_DLC': Can't find file for package 'KF_DLC', after which KFGui, ServerPerksV5 and ServerPerksMut fail to load too. Take KF_DLC.utx from the game client and put it in the same folder on the server. According to Flame, the server has been downloading without this file since version 1044, and the problem is the same on Windows and Linux ("serverperks" and "Помогите настроить сервер" threads).
  • Failed to load '2K4Menus': Can't find file for package '2K4Menus': Server Veterancy Handler V3 would not enable on a Linux server. Copy 2K4Menus.utx from the client's Textures folder into the server's Textures folder and restart the server ("Проблема с Server Perks" thread).
  • Log spam like Failed to find object 'Class KFMod.AshHardingSpecies' and similar (ChickenNatorspecies, SoldierSpeciesRobot, ReaperSpecies, CivilianSpecies...). The server's System folder contained character .upl files (ash_harding.upl, Reaper.upl and so on), which the engine loads automatically. After deleting them the errors were gone except Missing Class Class KFMod.KFVoicePackFemale. Flame's advice: do not edit KFMod; a skin's species, voice files and body parts go into its *Mod package (for example AshHardingMod) ("Как узнать какому мутатору чего не хватает?" thread).
  • The server ignores game length and difficulty and always starts on Normal with 4 waves, while the [KFMod.KFGameType] section disappears from KillingFloor.ini (with the file set to read-only, the section is simply ignored). Renaming killingfloor.ini, for example to killingfloor1.ini, and pointing the launch line at the new file fixed it; leave the read-only attribute alone. Another option is your own game type ("Настройки количества волн стираются при запуске сервера" thread):
ucc server kf-Westlondon.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?Mutator=MutKFAntiBlocker.MutKFAntiBlocker?ini=killingfloor1.ini
  • KillingFloor.ini has no KFGameLength. If the file has no [KFMod.KFGameType] section at all, copy the whole section from default.ini in the same folder into KillingFloor.ini; it contains KFGameLength=. Dr_Killjoy recommended working with an ini under your own name from the start (copy KillingFloor.ini to MyOwn.ini and launch with -ini=MyOwn.ini), because a patch sometimes overwrites the old ini ("Не могу разобраться с выделенным сервером" thread).
  • STEAMSTATS: SECURITY CHECK FAILED - ../System/MutKFAntiBlocker.u at startup means the mutator failed the check (the server does not consider it whitelisted) and perk progression is disabled. The message itself cannot be removed. In the launch line a mutator is given as ?Mutator=MutKFAntiBlocker.MutKFAntiBlocker, not via .ucl ("STEAMSTATS: SECURITY CHECK FAILED" and "Проблема с мутаторами" threads).
  • couldn't spawn collision tester, move this volume!!! in the log (it refers to a map's ZombieVolume) causes no problems, according to Flame. If players hang on connecting after a map change, the cause is almost always too many mutators and packages: merge them into one package, see Package loading limit ("Тема" thread).
  • Banning an IP range. A range like 14.0.128.0-14.0.255.255 does not work in KF; you can only ban by subnet mask, one line per subnet. For real ranges the forum suggested writing your own AccessControl or a mutator that gets the player's address with the PlayerController function GetPlayerNetworkAddress() and checks it ("Как забанить диапазон IP" thread):
IPPolicies=DENY;14.0.128.*
IPPolicies=DENY;14.0.129.*
  • WebAdmin says In order to see the global ID for connected players, change the value for bBanbyID in the [Engine.AccessControl] section of your ini to 'True'. To see the global IDs of connected players, set bBanbyID=True in the [Engine.AccessControl] section ("Настройка второго сервера" thread).
  • A custom game type (for example SRGameType) in voting and map lists. If a server with its own game type does not work as intended and the code looks fine, Proton advised duplicating what the launch batch file says in the [xVoting.xVotingHandler] section ("Снова про GameType" thread; the thread author confirmed it helped). In the line below, the Russian placeholders mean "write the game type here as in the batch file" and "here, what the batch file has where the mutators are":
GameConfig=(GameClass="тут геймтип записать как в батнике",Prefix="KF",Acronym="KF",GameName="Killing Floor",Mutators="здесь то, что в батнике так, где мутаторы",Options=)

For map lists, siriushard suggested binding your game type to an existing map list in [Engine.MaplistManager] with a line like Games=(GameType="ServerPerksMut.SRGameType",ActiveMaplist="Default KF") and setting DefaultGameType=ServerPerksMut.SRGameType in that list's section ([... MaplistRecord]) ("Гейм тайп." thread). The WebAdmin warning Could not load gametype ServerPerksMut.SRGameType for maplist means the game type for the map list failed to load. For the author of that thread the advice did not work: whatever he wrote into KillingFloor.ini was erased and rewritten with the defaults, and the thread ends without a solution.

  • Automatic restart after a crash, keeping the log. Dronis's batch file ("Снова про GameType" thread) restarts the server and copies ucc.log, stamped with the date and time, into a ucclog folder that you must create beforehand:
@echo off
cls
echo protect crash
title log
:srcds
echo (%time%) KF server started.
start /wait ucc server Entry.rom?game=ServerPerks.GameType?VACSecured=True?AdminName=*?AdminPassword=*?Mutator=ServerPerks.ServerPerksMut?ini=KillingFloor.ini
echo (%time%) WARNING: srcds closed or crashed, restarting....
set datetemp=%date:~-10%
COPY ucc.log "..\ucclog\%datetemp%"."%time:~0,2%"."%time:~3,2%_ucc.log"
goto srcds

FAQ

Which ports does a Killing Floor 1 server use?
By default 7707 UDP (game), 7708 UDP (query), 7717 UDP (GameSpy), 8075 TCP (WebAdmin), 20560 UDP (Steam) and 28852 TCP/UDP (master server). Changing the game port shifts all the others by the same offset.
What is the SteamCMD app ID for the KF1 server?
215350. Use +force_install_dir <folder> +app_update 215350 +exit to install or update it.
How do I log in as admin in-game?
Open the console and type adminlogin <password>, or adminlogin <username> <password> when multiple admins are set up. You must log in again after every map change.
How do I make clients download custom maps faster?
Compress maps with ucc compress, upload the .uz2 files to a web host and set RedirectToURL under [IpDrv.HTTPDownload] in KillingFloor.ini.