Killing Floor 2

Killing Floor 2

81 ratings
Dedicated Server + Workshop
By Zerreth
Set up Steam CMD for Dedicated Servers and learn to configure Killing Floor 2 with the Steam Workshop.
   
Award
Favorite
Favorited
Unfavorite
Steam CMD
This guide will assume certain folder paths & filenames. You can always choose other file paths & filenames, but be vigilant that you link them all correctly. I recommend that you create folder paths WITHOUT any spaces.

Create a folder for SteamCMD @
C:\Servers\SteamCMD

Download SteamCMD for Windows @
https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
and extract the steamcmd.exe into that folder.

You can now run the executable if you want but remember, it is a commandline app !
For our purposes, we can make it a lot easier by using small scripts to automate things.
You can view the API documentation @ https://developer.valvesoftware.com/wiki/SteamCMD
Updating Killing Floor 2
Create a text file in the SteamCMD root folder using your favorite text editor. (Notepad++)
In it dump the following lines of text & save with filename "_kf2_update.txt":

// KF2 UPDATE & QUIT // @ShutdownOnFailedCommand 1 @NoPromptForPassword 1 login anonymous force_install_dir ../SteamServers/kf2/ app_update 232130 validate quit

You can then create a shortcut with target:
C:\Servers\SteamCMD\steamcmd.exe +runscript _kf2_update.txt
And let it start in:
C:\Servers\SteamCMD

You can name it something like "_kf2_update". As you can probably guess, you can simply run this shortcut every time you want your server to update. My shortcut is located in the SteamCMD root folder but since the start path is set, you can put it anywhere you want.

In my configuration the folder structure will be like this:
C:\Servers\ - SteamCMD contains steamcmd - SteamServers folder for all steam game server files - - kf2 server files for killing floor 2
Configuring KF2 Server
Create a text file with your favorite text editor (Notepad++) in C:\Servers\SteamServers\kf2\,
in it put the following line of text and save it as a .bat file:
start .\Binaries\win64\kfserver kf-bioticslab?adminpassword=123
Mine is named:
C:\Servers\SteamServers\kf2\KF2Server.bat

run it once so the kf2server can create all the ini files we need to edit.
To shut kf2server down, simply press ctrl + c with the window active.
( universal commandline shut down / cancel )

Open the WebUI config file:
C:\Servers\SteamServers\kf2\KFGame\Config\KFWeb.ini

enable the WebUI and configure the port you want to access it with:
ListenPort=20111 bEnabled=true

When you now run the KF2Server.bat to start the server you will be able to access to WebUI via the local ip of the machine it is running on + the port

The admin username is "admin" and the password is "123" as stated in your .bat file.
You can fully configure the KF2Server from there. I recommend you change the default admin password. But if that specific port is not forwarded to the WAN, it doesn't pose much of a security risk. Don't forget to remove the password line from the bat file if you change your password via the UI !

[] Since you'll be booting your server via the .bat file it is important to remember that updating KF2 might overwrite this. So you might want to create your own to prevent it from wiping your changes.

[] All mapnames in the .bat file are lowercase. So for "KF-ShoppingSpree" via console & WebUI that would be "kf-shoppingspree" in the bat file. When trying to boot with an invalid mapname it will be stuck in a never ending boot loop.

For port forwarding you need the following ports:
7777 UDP 20560 UDP 27015 UDP (steam game servers) 20111 TCP (your selected WebUI port if you want to expose it to WAN)

TIP: To make port forwarding work reliably, you really should setup static IP's for the computer running the game server. You can reserve IP adresses via your router's DHCP. If this all is a bit mumbo jumbo to you, then you might want to read up on it. If the game server works on LAN, but cannot be accessed via WAN, then there is something blocking traffic. Either it's your router or the operating system.

[] Note that some internet providers have port forwarding setup in the modem/cablebox which you should be able to modify via a configuration screen on your ISP's website. Mine is wide open & I have a very capable router doing a far better job.

On my server, windows Firewall has Both TCP & UDP traffic allowed in the "Inbound Rules" section for the kfserver.exe executable. It should prompt you when launching for the first time so you don't have to do this manually.

C:\servers\steamservers\kf2\binaries\win64\kfserver.exe
Workshop Integration
Open PCServer-KFEngine.ini located @
C:\Servers\SteamServers\kf2\KFGame\Config\

Add the folowing text to the file, outside of another section
[OnlineSubsystemSteamworks.KFWorkshopSteamworks] ServerSubscribedWorkshopItems=644068210

The "644068210" is the ID of the workshop item, it is listed in the url of the item you are looking at in the workshop. (You might want to enable steam to show the page url in your steam client settings) "644068210" is the ID of KF-ShoppingSpree. You can add as much workshop items as you want.

Alternatively for your client you can find all downloaded workshop items by ID and Filenames in
%USERPROFILE%\Documents\My Games\KillingFloor2\KFGame\Cache

If the "[OnlineSubsystemSteamworks.KFWorkshopSteamworks]" Section is already there, just add the workshop item.

In the "[IpDrv.TcpNetDriver]" section, you need to add:
DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload

When you now start your server, it should mention the Workshop stuff & check if it is downloaded or not. It can take a few minutes before it will download the workshop item. It will do so while your server is running other content. It should also automatically update the workshop item while your server is running when it is released by the creator.

!!! IMPORTANT !!!

Note that as of April 11 2016, Maps are not added to the WebUI map rotation, you must add them manually to the list, in my case: "KF-ShoppingSpree". It is the literal map string without the file extension.
18 Comments
machine 5 Jul, 2019 @ 5:41pm 
hi iam hosting on game servers for my killing floor 2 server

soo i did all the step's exactly but when i got to my kf2 webadmin and go to map cycles it dosen't show any of the steam workshop map's that i put in pcserver-kfengine.ini
Dante 20 May, 2019 @ 3:24am 
Why i can't donwload map from my server?
Supergrobi 29 Nov, 2018 @ 2:58am 
I am not sure if that is normal but to get workshop content working I needed to install & keep running the steam client (not talking about SteamCMD) on the server to be able to download or update workshop maps. Optional to can close the client when everything is done. Maybe that will help others to faced the some problem with downloading workshop maps even the config mentioned above is correct.
AirionaFrost 18 May, 2018 @ 7:09pm 
@Iceberg [714] Try going to something like this 127.0.0.1:8080/ServerAdmin/current/info
Iceberg 3 Apr, 2018 @ 9:47am 
Do I need an app to access webadmin? That's what windows is telling me, but it can't tell me which app, and when I search the term "Webadmin" it tells me I also need mdaemon email service, and that site doesn't even work right, so... seems funny to me that it's not mentioned anywhere
Andro 20 Dec, 2017 @ 11:23am 
I have a question about mutators. Do players have to install the mutator in order to join the server? If yes, can you show me how to set up the redirect/workshop?
MonkeyActio 25 Oct, 2017 @ 6:09pm 
ok what in the heck do you mean "Add the folowing text to the file, outside of another section?" another section of what? outside of where?
Andeh 9 Jul, 2017 @ 4:25pm 
I have a question. How do I get in to see the server settings. Im seeing screenshots of people in a menu of some sorts but I dont know how to get there
Lavender Town 4 Dec, 2016 @ 9:10pm 
First of all, want to say thank you so much for this. My friends and I are enjoying the hell out of the server.

Problem: I've got 1 custom map working, code looks like this: DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload

[OnlineSubsystemSteamworks.KFWorkshopSteamworks]
ServerSubscribedWorkshopItems=643383080 // BikiniAToll

But when i try to add more maps, i have it coded like this, but feel its wrong:


DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload

[OnlineSubsystemSteamworks.KFWorkshopSteamworks]
ServerSubscribedWorkshopItems=643383080 // BikiniAToll
ServerSubscribedWorkshopItems=645410401 // PeachesCastle
ServerSubscribedWorkshopItems=642313451 // Nuked

What am I doing wrong?
Thanks~

Reet 30 Nov, 2016 @ 7:14am 
I dont know if this is a problem with the webadmin but I can't see custom maps on the change map section. I have them on the map cycle and they work in game to vote for a different map but I can't change them from the admin page.
I made an imigur page showing what I mean.
http://imgur.com/a/aKa0I
As you can see it is just showing the normal maps eventhough they are not on rotation.