KF2 Dedicated Server via SteamCMD - Configs and Workshop
This page follows a long-running English Steam guide for setting up a Killing Floor 2 dedicated server on Windows with SteamCMD. Compared with the custom maps and mods setup guide, it focuses on editing the config files by hand: difficulty, MOTD, server name, Versus mode and Workshop subscriptions.
Before you start
Open these ports on your router:
| Port | Protocol | Purpose |
|---|---|---|
| 7777 | UDP | Server (game) port |
| 27015 | UDP | Master server / query port |
| 8080 | TCP | WebAdmin |
| 20560 | UDP | Steam port |
You need at least 31 GB of free disk space. For router and firewall background see server ports and NAT.
1. Download SteamCMD
Get the SteamCMD zip from Valve: https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip. Extract it into its own folder (the guide author keeps servers under C:\Steam-Server\).
2. Log in
Run steamcmd.exe. After a few seconds it is ready for input:
login anonymous
3. Download the server files
force_install_dir ./kf2_ds/
app_update 232130 validate
When the download finishes, type exit to close SteamCMD.
4. Run the server
The kf2_ds folder now contains a batch file. It holds the start map and the admin password, and you will edit it later. Out of the box it starts a Survival server, not Versus. To stop the server, just close its window.
5. Server config
Difficulty
The guide sets difficulty in kf2_ds\KFGame\Config\DefaultGame.ini:
[Engine.GameInfo]
GameDifficulty=0.000000
| Value | Difficulty |
|---|---|
| 0 | Normal |
| 1 | Hard |
| 2 | Suicidal |
| 3 | Hell on Earth |
MOTD, banner and website
Further down the same file, under [KFGame.KFGameInfo]:
BannerLink=http://art.tripwirecdn.com/TestItemIcons/MOTDServer.png
ServerMOTD=Welcome to our server. \n \n Have fun and good luck!
WebsiteLink=http://killingfloor2.com/
\n inserts a line break in the message of the day.
Versus mode
The game mode is chosen on the launch line in the batch file. Add:
?Game=KFGameContent.KFGameInfo_VersusSurvival
More about the mode itself: KF2 Versus Survival.
Server name
In PCServer-KFGame.ini:
ServerName=
ShortName=
6. WebAdmin
WebAdmin must be switched on first. In kf2_ds\KFGame\Config\DefaultWeb.ini change:
bEnabled=false
to:
bEnabled=true
Then open the server IP and WebAdmin port in a browser, for example 127.0.0.1:8080 on the server PC. Default login:
- User name:
admin - Password:
123(set in the batch file - change it)
7. Steam Workshop items
Open kf2_ds\KFGame\Config\PCServer-KFEngine.ini and scroll to the [OnlineSubsystemSteamworks.OnlineSubsystemSteamworks] block (it contains lines such as bUseVAC=true, GameDir=kf2, ProfileDataExtention=PFD). Below that block, add a new section with one line per Workshop item:
[OnlineSubsystemSteamworks.KFWorkshopSteamworks]
ServerSubscribedWorkshopItems=605633924
ServerSubscribedWorkshopItems=605551918
The ID is the number at the end of the Workshop link. For http://steamcommunity.com/sharedfiles/filedetails/?id=535769647 it is 535769647.
A tip from the comments: on Windows servers, Workshop content may not download at startup and the log shows "Attempting to check if item ... is installed without having downloaded it". One user found the server only fetched the item when the map was changed through WebAdmin.
FAQ from the guide
Nobody can see or join my server. Check that every port above is forwarded. If it is all correct and still fails, contact your internet provider. Router-specific steps are collected on portforward.com.
Is there a way around port forwarding? Yes: host over a VPN network such as Hamachi. Only people inside that VPN network can join.
How do I change the server port? Add a port switch to the launch line in the batch file (the guide shows -port 27015).
The SteamCMD download failed. Usually simply retrying the download fixes it.
How do I update the server? Open SteamCMD, log in again and repeat the download step. SteamCMD checks which files need updating.
How do I test the server from the internet? Find your public IP on a site such as whatismyip.com and connect to that address from the in-game console or add it to favorites.
WebAdmin returns 404 Not Found. A commenter found another application was already using port 8080; moving WebAdmin to a different port in the config fixed it.
Automating the setup
The guide's author also wrote a separate ServerTool that automates installing and upgrading servers (published on GitHub as Zeromix9/ServerTool). A more widely used KF2-specific option is KF2ServerTool.
FAQ
- How much disk space does a KF2 dedicated server need?
- The guide asks for at least 31 GB of free space for the server files.
- How do I add Workshop maps to a KF2 server by hand?
- In PCServer-KFEngine.ini add a [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section and one ServerSubscribedWorkshopItems=<ID> line per item. The ID is the number at the end of the Workshop link.
- How do I turn a KF2 server into a Versus server?
- Add ?Game=KFGameContent.KFGameInfo_VersusSurvival to the launch line in the server batch file.
- WebAdmin shows 404 Not Found. What is wrong?
- One user found that another program was already using port 8080. Changing the WebAdmin port in the config fixed it.