Killing Floor 2

Killing Floor 2

51 ratings
Starting a Killing Floor 2 dedicated server
By Incubidipropano
So, basically there is the wiki that explains a lot of things but I found the documentation a bit hard to understand, so why not creating mine? After some "reverse engineering" I would also like to explain some things in the most minimal and simple way.

   
Award
Favorite
Favorited
Unfavorite
Choosing the server host OS
You can choose your favorite linux distro, or windows. I would suggest linux unless you want random shutdowns because of windows update :)

You can also create a virtual machine, from what I found the server runs well on an Intel Core 2 Duo + 3GB DDR2 RAM so you don't have to dedicate a lot of resources, just a lot of disk space, like 30GBs min. The maximum ram usage I found was 735MB's.
tl;dr
Requirements(For a single instance)
Min:
  • Intel Core 2 duo desktop
  • 2GB of RAM, 3GB If windows 8/10
  • 20GB+ Disk space, HDD
  • 2Mbps upload speed. Good ADSL, no stability issues. Good WIFI 2.4Ghz
Recommended:
  • Intel Core i3 or any generic laptop/desktop quad core wo/w HT
  • 4GB of RAM,
  • 50GB Disk space, SSD
  • Fiber optic connection. VDSL, FTTH. Local gigabit LAN. 5Ghz WIFI.
Downloading steamcmd
SteamCMD is required to manage, install and update servers for steam, there is the linux version or the windows one, I won't cover how to do it since there are a lot of guides about it.
Once you got it installed we can start.

Downloading server files
Once we got into steamcmd, run it.
On linux you have to open a console and then in the steamcmd directory do
./steamcmd
then
login anonymous
Login as anonymous is required unless you can't download/update the files
Then at this point you can change the directory, but I don't want to.
then do
app_update 232130
This will download the server files. Something like 13GB

Server files analysis
Oh, now we got our files. Search for a directory like:
/home/*youruser/Steam/steamapps/common/killingfloor2
On windows search within the installed steamcmd folder.
We got some folders, what do they do?
  • linux64 - Don't touch it.

  • KFGame - Contains a lot of files we will like.
    - Web - Contains ServerAdmin web html files. Do not touch it.
    - Scripts - Don't.
    - Logs - The logs stored, obviously we will find game logs, we can choose what to enable from the server settings like chat logs, scoreboards etc.
    - Localization - Language files, we don't need to modify them.
    - Config - This is the main directory of config files. We will dig into this directory a lot.
    - Inside here we have PCServer and LinuxServer directories. DO NOT touch anything inside those folder, since they are needed to populate config files. The same things for the files with the Default prefix.
    In green the things we can modify[i.imgur.com] they will be called LinuxServer-* if you are on linux, PCServer-* if you are on windows.

  • BrewedPC - Nothing interesting, system files like maps etc.

  • Engine - System files we don't need to modify, they also contains default values.

  • Binaries/Win64 - Inside there we got both the Linux binaries like the Windows one. Linux binaries have no extension.
    The linux binary is
    KFGameSteamServer.bin.x86_64
    The windows binary is
    KFServer.exe

  • KF2Server.bat - On the main directory we will also have a .bat file which basically executes the server but only for windows, you can create something like that also for linux by creating an .sh with your favorite text editor with
    ./Binaries/Win64/KFGameSteamServer.bin.x86_64
    Remember to chmod +x it, and run it with ./yourfilename.sh
Configuring the server
The first thing you need to know is that there are a lot of ways to configure our server. We can put everything to the arguments of the server executable in both linux and windows, inside the .sh/bat files. But I personally don't like it so we will only cover the simpler ways to do that.

Note that you have to start the server once to populate the config files. If you don't know how, read a couple of sections ahead. Same thing if you have enabled WebAdmin/MultiAdmin, or changed specific settings

WebAdmin interface
The webadmin interface is a web server that you can use to configure almost everything.
THIS WORKS ONLY IF THE SERVER IS RUNNING, since it is a web server started by the game server itself
You can enable it by modifying the KFWeb.ini inside the KFGame/Config folder, changing
bEnabled=true under [IpDrv.WebServer]
it is false by default.
Then you will have to restart your server.
The default password is blank, unless you have changed it. The username is Admin

You can access the WebAdmin interface with the browser, typing this ip
  • 127.0.0.1:8080 if you are on the local server PC.
  • 192.x.x.x:8080 Depends on the local address, if your server is on your LAN
  • x.x.x.x:8080 If your server is remote, you will need to port forward it (only if you have a NAT) and know the IP Address.

Note that the WebAdmin modifies the raw config files. Restart your server for appliying the settings.

Enable MultiAdmin
MultiAdmin is a feature for managing multiple admins to your WebAdmin server, it is a bit complicate to manage through text files, so I will explain how to do it.
You have two ways to enable it, add

WebAdmin.MultiWebAdminAuth
in the WebAdmin interface, from WebAdmin settings > Advanced > Authentication class >

Or in the raw KFWebAdmin.ini file adding .
AuthenticationClass=WebAdmin.MultiWebAdminAuth under [WebAdmin.WebAdmin]
Restart the server for applying any settings.

A new file will appear, I would recommend to not touch it, since it is an hashed password, I found that unlike the wiki says, modifying manually the password will cause the user to not be recognized. Do this as your own risk. To create users and password use the WebAdmin interface instead.
note that you have to login with Admin and Admin if your password was blank, there can't be a blank password using multiadmin

Unless, it is the last used password modified in AdminPassword from the config file.


Text files
So you like it raw, uh? As I said previously, the files starting with the PCServer-* LinuxServer-* prefix are the only files you will have to modify *-KFGame.ini which is the main config file.
Here are some basic settings

ServerName=(Do I need to explain that?) AdminPassword= The ingame and default WebAdmin password, otherwise is blank as I said before. Unless you are using MultiAdmin, it is Admin even if blank Difficulty= 0 to 3, from Normal to HoE GameLength=Same as before, 1 is 7, 0 is 4, 2 is 10
Other things are pretty intuitive.

You can change the map through the WebAdmin interface

Starting the server
Once you configured everything, just start the .bat/sh, or the executable.
End.

Obviously you will have to port forward if you don't have a public address and/or your server is behind a NAT.
Directly from the wiki:

Port Default Protocol What this option controls

Game Port 7777 UDP This is the main port the game will send connections over
Query Port 27015 UDP This port is used to communicate with the Steam Master Server
Web Admin 8080 TCP This port is used to connect to your servers web admin page (if turned on)
Steam Port 20560 UDP
NTP Port 123 UDP Weekly Outbreak Only - Internet time lookup to determine correct Outbreak

Port forwarding configuration is specific on your current network configuration and equipment.

Note that for stopping the server, you have to kill the process or close the terminal window. If you want to restart, reopen the bat/sh/executable again
Useful things to note
  • If you have modified the wave length, difficulty or game mode through the WebAdmin interface, to applying the new settings just perform a map change!

  • Remember that if there is an update, you will need to use steamcmd, insert those commands.
    app_update 232130
    for checking corrupted files add "validate" after "232130"
    app_update 232130 validate

  • Always backup your config files! There can be updates that can re-populate config files, just remember the changes you made, do not overwrite new files, they can contain new features, edit the new config instead one string by one using the previously as reference!

  • You may also like to disable the takeover from webadmin panel, go to Settings > General settings to prevent people entering into the game and putting a password.

  • For ingame admin login, open your console (it is ò in my keyboard, don't know other layouts) and type adminlogin *yourpassword* the one you put into *-KFGame.ini

  • Sorry for bad formatting, I will improve this guide. Obviously I didn't put how to create an SSL certificate for the webadmin login I created this guide to be basic as possible.
8 Comments
DavidusSVK 15 Oct, 2020 @ 12:52pm 
does this guide still work ???
dread3ddie 8 Oct, 2018 @ 2:21am 
This is awesome, thanks for taking the time to pull all this info together! Really helpful!
FroggyChair 30 Jan, 2018 @ 5:16am 
Thanks for the guide! Snowbeat is a troll btw
NepNep 29 Jan, 2018 @ 4:19pm 
Great guide! Thanks for taking the time to provide all this info :D
Incubidipropano  [author] 26 Jan, 2018 @ 9:36am 
Really? Don't tell me
Uruk 25 Jan, 2018 @ 9:50pm 
Snowbeat is a troll
Pedropars 25 Jan, 2018 @ 12:34pm 
Nice guide, i´ll try hosting a server for some friends later ^_^
Incubidipropano  [author] 25 Jan, 2018 @ 7:15am 
excuse me?