KF2 Dedicated Server Step by Step: SteamCMD, WebAdmin, Ports
Since Killing Floor 2 dropped listen servers, learning to run a dedicated server is a must for anyone who wants to host. This guide, originally in Spanish, covers a public or private server from installation to port forwarding, and adds a handy set of console commands for a practice server.
Header of the original guide.
Step 1: install SteamCMD
Download steamcmd.zip from Valve and unpack it into a folder such as C:\SteamCMD\. Run steamcmd.exe, let it download its files and close it afterwards.
Step 2: install the KF2 server
To keep SteamCMD and the server in the same folder, run steamcmd again, type login anonymous, then app_update 232130. The server files land next to SteamCMD.
Alternative: separate folders
Create a folder for the server, for example C:\KF2Server\. In steamcmd run login anonymous, then force_install_dir C:\KF2Server\, then app_update 232130. The download takes a while; close the program when it finishes.
Step 3: test the server
Run the server once so the remaining files are generated. Start KF2Server.bat (a shortcut is handy). The map takes a while to load. Success looks like this in the console window:
Log: KF2 VERSION 10XXLog: Initializing game engine completedLog: STEAM GAME SERVER UID: XXXXXXXXX
The UID line shows the Steam connection works. If it is missing, update the server or check that port 20560 is open. Then open the game, find your server on the LAN tab and connect. Important: change the default password (123) in KF2Server.bat.
WebAdmin
Illustration from the WebAdmin section of the original guide.
- Find your IPv4 with
ipconfigin cmd, for example192.168.6.66. - In
...\KFGame\Config\KFWeb.inichangebEnabled=falsetobEnabled=true. - Change the admin password in
KF2Server.batso nobody can troll your server. - With the server running, open
http://<your IPv4>:8080/orlocalhost:8080in a browser and log in (loginadmin, password from the .bat file).
Manual configuration
Close the server and edit ...\KFGame\Config\PCServer-KFGame.ini:
GameDifficulty: 0 Normal, 1 Hard, 2 Suicidal, 3 Hell on Earth.GamePassword: set a password to restrict access.GameLength: 0 short, 1 medium, 2 long.
Useful console commands for a practice server
Spawn a dazed ZED (SpawnZED Clot) after enabling cheats and leave it alive so the wave never ends; then you can experiment safely. Log in as admin from the in-game console with AdminLogin password.
| Command | Effect |
|---|---|
| EnableCheats | Required for the commands below |
| ImRich, DoshMe # | Money |
| OpenTrader, OpenTraderMenu | Use the trader pod and open its menu |
| SpawnZEDLods Clot | Spawns a handful of ZEDs |
| SpawnZED Clot | Spawns one dazed, harmless ZED |
| SpawnAI Clot | Spawns a normal ZED with AI |
| SpawnZedGroup x y z | ZED type x, y waves, z ZEDs per wave |
| HealMe [#], ArmorMe [#] | Health and armor |
| SpawnHumanPawn 0 1 | Adds a dazed player |
| KillBots, KillZeds | Remove spawned players or all ZEDs |
| Ghost, Walk | Noclip on and off |
| God, Demigod | God mode, or damage with 1 HP survival |
| Fly | Flying |
| AllAmmo | Full ammo |
| ResetDoors | Resets all doors |
| PlayersOnly | Freezes everything except players |
| ToggleZedsIgnoreMe | ZEDs with AI ignore you |
| ToggleHUD, ShowHUD | Show or hide the HUD |
Replace Clot with Crawler, Gorefast, Stalker, Bloat, Siren, Husk, Scrake, Fleshpound, Clota (Clot), Clotu (Cyst) or Clots (Slasher).
Updating the server
After every game patch repeat Step 2 and add validate to the last command: app_update 232130 validate. SteamCMD checks the files and downloads the update.
Opening ports
If nobody can connect, first update the server, then make sure antivirus and firewall do not block these ports (UDP and TCP):
- Game port 7777
- Query port 27015
- Web admin 8080
- Steam port 20560
Often the internet provider blocks them. The guide suggests asking the provider to enable DMZ for the IPv4 you noted, which opens all ports for that address. A dynamic IP can change after a modem restart, so the request may need repeating.
See also KF2 dedicated server with SteamCMD and Ports and NAT.
FAQ
- Which ports does a KF2 dedicated server need?
- The guide lists game port 7777, query port 27015, web admin 8080 and Steam port 20560.
- How do I update the KF2 server after a patch?
- Run steamcmd, log in anonymously, set the install directory if you use a separate folder and run app_update 232130 validate.
- What do the GameLength values mean?
- 0 is the short game (4 waves plus boss), 1 is medium (7 plus boss) and 2 is long (10 plus boss), shown in the guide as 5/4, 8/7 and 11/10 waves.