Running a Server

Ready-to-Go KF2 Server Package - Host on Your Gaming PC

In 2016 a Reddit user shared a complete, pre-configured Killing Floor 2 dedicated server as a zip: unpack it, run one batch file, play. The thread is still a handy reference for hosting on the same PC you game on, and the community answers cover hardware needs, joining by IP and a few gotchas. This page summarizes how the package is laid out and what the thread teaches.

The download links live in the original thread. The package is an unofficial upload from 2016, so treat it like any third-party archive: scan it, and let its SteamCMD step update the server before you play. If you prefer to build a server yourself, see KF2 dedicated server via SteamCMD.

What is in the package

Unpacked, the zip is a SteamCMD folder with the server inside. Only three items matter, all in the SteamCMD folder:

ItemPurpose
Launch KF2 Server.batChecks the server files through SteamCMD, then starts the server. Run it and you can play immediately.
Maps folder (shortcut)Where the server's maps live. Drop custom maps here. Two examples were included: KF-BioticsLab2009-F1 and KF-WestLondon2009_Prerelease.
PCServer-KFGame.ini (shortcut)The main config: server name, password, difficulty, length and the map cycle.

Because the launch file runs SteamCMD first, it also keeps the server up to date. To use a beta branch, change the update line in Launch KF2 Server.bat to:

app_update 232130 -beta preview

(use the branch name Steam shows for the beta).

Key settings in PCServer-KFGame.ini

Search the file for these parameters:

SettingValues
GameDifficulty=0.0000000 Normal, 1 Hard, 2 Suicidal, 3 Hell on Earth
GameLength=10 Short, 1 Normal, 2 Long
ServerName=Name shown in the server list
GamePassword=Password players must enter
AdminPassword=Next to GamePassword; needed for WebAdmin
GameMapCycles=(Maps=(...))The map rotation; custom maps go here

To add custom maps, append their names to the end of the cycle line:

GameMapCycles=(Maps=("KF-BurningParis","KF-Bioticslab", ... ,"KF-BioticsLab2009-F1","KF-WestLondon2009_Prerelease"))

The package was set up to send players to an online map download directory, so most custom maps downloaded automatically for clients. Today you will likely need your own redirect: see KF2 custom map redirect with nginx.

Any change to the config or the Maps folder needs a server restart through the batch file.

Ports

Forward these to the server PC:

  • 7777 UDP
  • 27015 UDP
  • 20560 UDP

WebAdmin (8080 TCP) does not need forwarding if you only use it on the server PC. The author recommended keeping it closed for security.

Running it on your gaming PC

  • Launch the real game at least once first so its DirectX setup has run.
  • Start the server and wait until it has fully loaded before you start Killing Floor 2 on the same machine. One commenter fixed a server missing from the list just by changing that order.

Joining the server

  • On the server PC: Browse Servers, LAN tab. If it is not there, open the console with the backtick key (next to 1) and type open 127.0.0.1. That address only works on the server PC.
  • Everyone else: find the server in the list and add it to favorites, or connect by your public IP from the console, for example open 123.234.123.234. You can find your public IP on sites such as whatismyipaddress.com.

WebAdmin

Set an admin password in PCServer-KFGame.ini, then open 127.0.0.1:8080 in a browser on the server PC. A commenter pointed out that WebAdmin (enabled in KFWeb.ini) is a friendlier way to change difficulty, length and passwords than editing the ini. One limitation reported in the thread: the WebAdmin change-map list showed only stock maps, not custom ones, so groups just voted custom maps in at the end of a match.

Hardware: what does a KF2 server need?

From the comments:

  • An i7 2600K or i5 2500K with 16 GB of RAM showed no noticeable impact while playing and hosting at the same time.
  • A virtual machine with one core (two threads) of an i3-6100 and 2-3 GB of RAM ran a server without lag; peak memory use was around 1 GB.
  • The server is mostly a coordinator: it tracks positions and the state of players, ZEDs and the match.
  • Upload bandwidth is the real limit. A weak upload connection will make everyone on the server lag.

Troubleshooting from the thread

  • gamestate=ogs_pending, not in the list, friends cannot connect by public IP, but LAN works. The ports are not open. Check them with an online open-port checker (yougetsignal was suggested) and add Windows Firewall exceptions for the ports.
  • Cannot forward ports at all (strict home network, dorm). A router of your own between you and the wall jack sometimes helps; otherwise a VPN tool such as Hamachi is the fallback.
  • Versus mode errors. Nobody in the thread solved switching the package to Versus. The usual method is the ?Game=KFGameContent.KFGameInfo_VersusSurvival launch option; see KF2 Versus Survival.

FAQ

Can I host a KF2 server on the same PC I play on?
Yes. Commenters ran it alongside the game with no noticeable impact on 8-16 GB machines. Start the server and let it load fully before launching Killing Floor 2.
How much CPU and RAM does a KF2 server need?
Community reports: one CPU core and about 2-3 GB of RAM in a virtual machine ran smoothly. Upload bandwidth matters more than raw power.
How do I add a custom map to the map cycle?
Put the map in the server's Maps folder and append its name to GameMapCycles in PCServer-KFGame.ini, then restart the server.
Should I forward the WebAdmin port 8080?
Not if you only use WebAdmin on the server PC itself via 127.0.0.1:8080. The package author advised against exposing it for security reasons.