Running a Server

KF2 Dedicated Server on Windows With Workshop Maps: Full Setup

A Spanish-language Windows guide to setting up a Killing Floor 2 dedicated server with Workshop content, including admin accounts and the meaning of common console messages. It complements the SteamCMD dedicated server guide and the custom maps and mods setup. The default admin credentials shown in the original are weak; change them before opening the server to the Internet.

Requirements

MinimumRecommended
CPUIntel Core 2 DuoIntel Core i3
RAM2 GB on Linux, 3 GB on Windows 7/8/104 GB on Linux and Windows
Disk40 GB60 GB
Network2 Mbps upload (cable) or stable 2.4 GHz Wi-FiFiber or stable 5 GHz Wi-Fi

Open the ports

Open these ports on your router and in the firewall, otherwise the server stays on the LAN: 7777 UDP, 27015 UDP, 8080 TCP, 20560 UDP and 123 UDP. In an administrator command prompt you can add the firewall rules with netsh advfirewall firewall add rule name="KFServer-7777" dir=in action=allow protocol=UDP localport=7777, repeating with the other names, ports and protocols (27015 UDP, 8080 TCP, 20560 UDP, 123 UDP). See also ports and NAT.

Download and install

  1. Download and install SteamCMD, then start it.
  2. At the Steam> prompt set the install directory with force_install_dir C:\KF2Server\.
  3. Log in anonymously with login anonymous.
  4. Install or verify the server with app_update 232130 (232130 is the KF2 server).
  5. When it finishes with "Success! App '232130' fully installed.", type exit.

SteamCMD installing the KF2 server

SteamCMD downloading the server files.

Start the server

Go to C:\KF2Server and run KF2Server.bat.

KF2 server console

The server console after starting.

Basic configuration

Edit DefaultGame.ini in C:\KF2Server\KFGame\Config. To change difficulty, set under [Engine.GameInfo] the line GameDifficulty=2 (0 Normal, 1 Hard, 2 Suicidal, 3 Hell on Earth) and save.

Web admin

In KFWeb.ini in the same folder, change bEnabled=false to bEnabled=true, save, and open http://localhost:8080. The original uses the user admin and password 123.

WebAdmin login

The web admin panel.

Download Workshop items

  1. Make sure the server is not running, or the Workshop settings are overwritten on the next restart.
  2. In PCServer-KFEngine.ini add a section [OnlineSubsystemSteamworks.KFWorkshopSteamworks].
  3. For every Workshop item, add a line ServerSubscribedWorkshopItems=<id> in that section (the example uses 643383080).

Workshop section in the ini

The Workshop section with item IDs.

  1. In the same file find [IpDrv.TcpNetDriver] and add DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload above the other DownloadManagers lines (which are IpDrv.HTTPDownload and Engine.ChannelDownload).

TcpNetDriver section with Workshop download manager

The download manager order.

Save the changes.

Custom maps in the map list

For custom maps to appear in the map-change section of web admin, add a map summary datastore in PCServer-KFGame.ini. A section looks like [KF-Default KFMapSummary] with MapName=KF-Default and ScreenshotPathName=UI_MapPreview_TEX.UI_MapPreview_Placeholder. Stock maps such as [KF-BioticsLab KFMapSummary] also have MapAssociation=2 and a proper preview, but custom maps do not need the MapAssociation=2 line.

Map summary entries

Map summary entries in PCServer-KFGame.ini.

Several administrators

  1. In KFWebAdmin.ini add under [WebAdmin.WebAdmin] the line AuthenticationClass = WebAdmin.MultiWebAdminAuth.
  2. Start the server so it creates KFMultiAdmin.ini. Do not create admins or passwords by editing it; use it only to remove admins.
  3. Open web admin and log in as Admin (with a capital A) with the original password. A new Administrators section appears.
  4. Choose Create administrator, give a login name, enable the account, set a password and a display name (the name players see in chat).
  5. Set Deny/Allow patterns by dragging items from the navigation preview, for example an admin who can only change maps.
  6. Save, log out and test the account.

Administrators section in web admin

The new Administrators section.

Server icons

Ranked icon

Ranked.

Ranked: stats and XP are enabled, no mutators or custom server settings are run, and custom maps do not change this unless they use scripts.

Ranked Stock icon

Ranked Stock.

Ranked Stock: the server is customized but stats and XP are still enabled; probably a whitelisted mutator or a setting such as friendly fire. See whitelist system.

Unranked icon

Unranked.

Unranked: stats and XP are disabled, because it runs a non-whitelisted mutator or mod, or a custom map uses scripts (for example spawning extra ZEDs).

Item states

After adding Workshop maps you will see item states in the console:

  • 4: the custom map is installed and up to date.
  • 0: not installed yet; it will download for the first time.
  • 12: installed but needs an update; it will download and replace the file.
  • 20: probably the maps were not checked for updates and or the Workshop connection was temporarily lost; restart the server and make sure the connection is stable.
  • 8: unknown, perhaps a download or status-check problem like 20.
  • 36: unknown but always goes away by itself; no problems noticed.

Warnings

  • "Workshop: Steam does not appear to be running. Unable to check Workshop": the server has no Workshop connection. Close and reopen Steam, then rerun the server, and make sure the server is updated. It can also occur if you start the server twice by mistake.
  • "Workshop: Unable to download workshop item ": the item's page was set to private or removed, or the ID is invalid.
  • "Workshop: Attempting to check if item is installed without having downloaded it": normal after adding new maps. Workshop installs maps in two locations. The server first checks C:\KF2Server\Binaries\Win64\steamapps\workshop\content; if the map is there it copies it to C:\KF2Server\KFGame\Cache without downloading. If it is missing, the console shows Item state is 0, downloads it, then copies it and reports state 4.

FAQ

Which ports must be open for a KF2 server?
7777 UDP, 27015 UDP, 8080 TCP, 20560 UDP and 123 UDP, in both the router and the firewall; otherwise the server stays LAN-only.
How do I make the server download Workshop maps?
Add a [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section to PCServer-KFEngine.ini with one ServerSubscribedWorkshopItems line per item ID, and add DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload above the other DownloadManagers lines.
What does Item state is 4 mean?
The custom map is installed and up to date.