Running a Server

KF2 Quick Private Server on Windows: Passwords, Ports, Updates

The author of this Early Access guide says it took about an hour to get a server running, and that it only covers the basics: a quick launch on Windows, ports, WebAdmin and updates. It is based entirely on the official Tripwire wiki page for the Killing Floor 2 dedicated server. If you only want a private server, this is the short route; for home router details see KF2 home dedicated server walkthrough.

Install SteamCMD

  1. Download steamcmd.zip and extract it to C:\SteamCMD\ (or another folder).
  2. Launch SteamCMD from a command prompt (C:\SteamCMD\SteamCMD.exe) or by double-clicking it.
  3. Log in with login anonymous, which works better for most people. If step 4 fails, use login username password and enter the Steam Guard code from email. Do not quit yet.

Install and first start

  1. At the Steam> prompt run:
force_install_dir c:\KF2Server\
app_update 232130 validate

It downloads a few gigabytes into KF2Server. When finished, type quit.

  1. Open a new command prompt and start the server once so it creates its config files:
start c:\KF2Server\Binaries\win64\kfserver kf-bioticslab

If you get "command not found: start", you are still inside SteamCMD; type quit first. Let it run 10-20 seconds, then close the server window.

  1. Open c:\kf2server\KFGame\Config\PCServer-KFGame.ini in Notepad. Change ServerName=Killing Floor 2 Server to your own name, and do the same for ShortName.
  2. For a private server set GamePassword= to your password, for example GamePassword=secretword. Start the server again with the same command. It should now appear in the in-game server browser; if not, open the ports.

Port forwarding

Open these ports in your firewall or router:

PortProtocolPurpose
7777UDPMain server port
20560UDPServer traffic
27015UDPSteam query
8080TCPWebAdmin

Be careful: opening a wrong port can expose your computer. A restart may be needed afterwards. If you do not know how, search for your firewall software name plus "port forwarding".

WebAdmin

WebAdmin lets you kick and ban players and change map, difficulty and game length in a browser.

  1. Open KFWeb.ini in C:\KF2Server\KFGame\Config\ and change bEnabled=false to bEnabled=true.
  2. Open port 8080 as above (or use WebAdmin from the same computer, which the author believes works without forwarding).
  3. Set a password in PCServer-KFGame.ini: AdminPassword=secreterword. Use a strong one.
  4. Find your IP (ipconfig, IPv4 address, or a what-is-my-IP site) and open IP:8080 in a browser. On the server PC localhost:8080 also works.
  5. Restart the server, then log in with the username Admin (capital A).

If you launched with C:\KF2Server\KF2Server.bat without editing it, the bat file overrides the password and probably the username: you would then log in as administrator with password 123. Remove ?adminpassword=123 from the bat to avoid that. After logging in you can change the admin password in WebAdmin.

Updating the server

If the server stops working, it was probably updated and your copy is outdated, causing connection failures or odd errors. The quick method is to repeat the SteamCMD login and app_update steps. The author suggests putting it all in a batch file and points to the wiki for that.

Credits

The guide credits the Tripwire wiki contributors, a forum member for the port forwarding thread and others who pointed out helpful links.

FAQ

How do I make the server private?
Open PCServer-KFGame.ini in KFGame/Config and set GamePassword= to your password, then restart the server.
What are the WebAdmin login defaults?
The username is Admin with the password you set in AdminPassword. If you launched through KF2Server.bat without editing it, the bat overrides it with administrator / 123 until you remove ?adminpassword=123.
Which ports must be opened?
7777/UDP for the main server, 20560/UDP, 27015/UDP and 8080/TCP for WebAdmin.