Have fun in a cooperative game with our friends is something quite fun, right? Do this on our own server is something even more fun! Today I will teach you how to create a dedicated server for Killing Floor 2!
But before we begin, I would like to highlight a few things:
- You will need a router with feature called Universal Plug and Play (uPnP) active. If your router does not rely on this feature, you need to open its ports manually.
- If you use a specific firewall will need to open the ports in the program. In the impossibility to do this, you must disable the firewall temporarily while the server is running.
- The server is configured with basic features, I will not cover in this tutorial features such as compatibility with the Steam Workshop, test versions and other advanced tools.
- The server will be created with the official tools, this means that you must have the original game to be able to enter the server that we will create.
- The server was created in the game version 1032, if you are reading this tutorial at a later date, it may be that some tips are no longer valid, so stay tuned.
- In the version that created this tutorial, the game and the server were only available on 64-bit platforms. If you are using a 32-bit system, this tutorial will not work.
The SteamCMD is an official tool released by Valve that we will use during this process. To download the SteamCMD, click here.
With the assistance of a program that extracts files such as WinRAR or 7-Zip, extract the contents of this file to a folder, for example: C:\Games\SteamCMD\. Do not extract this content in the same folder in which you installed Steam!
After extracting the content, run the steamcmd.exe program. The program will upgrade to the latest version with all that is necessary for its proper operation. You will know that the process ended when the last line be showing steadily: "Steam>" (as you can see in the image that is at the beginning of this section). When this step is complete, close the program.
Now you must install the Killing Floor Server 2. To make the process more simple, I have prepared everything for you. Just click here and download the file. Then, extract the contents in the same folder that you put the SteamCMD.
There will be two files, kf2_intall.bat and kf2_update.bat. As its name suggests, for the first installation you will run the kf2_install.bat file and whenever there is an update of the game, you need to run kf2_update.bat.
Run the kf2_install.bat file and wait for the process to complete. This may take a few hours depending on the speed of your connection. You will know that the process ended when the last line be showing steadily: "Steam>"
By default, the content will be installed inside in a folder called "kf2server_www.brunokitsune.net" which will be visible within the folder that you choose to put the SteamCMD.
In order to run the server, in addition to what has been mentioned in the tutorial beginning we'll need some tools. Luckily the game developers have prepared everything ready for us.
Inside the folder where the server was installed, open the Binaries folder, then open the Redist folder and run the file UE3Redist.exe. Proceed with installation of this software.
We mentioned in the tutorial from the beginning that if your router does not have the uPnP feature or if this feature is disabled, you need to open multiple ports on your router. The standard ports are: TCP - 8080 and UPD - 7777, 27015, 20560. If you do not know if your router will work properly or not, I recommend you to continue the tutorial and in case of problems, make the manual opening I will mention in the paragraph below.
There are several websites that help to manually configure the release of ports. I personally quite like this one. Just choose the manufacturer of your router, then choose the router model and finally, the game you want to release the ports. Remember to ignore the advertisements suggesting the installation of their software.
Important Update - v1055
There was a major and vital change to execute the server on v1055, I thank immensely Kekko42, who contacted me to report this information. The problem is that the server is creating messages associated with a module called DevOnline, which does not allow us to see the information that will be shown soon to follow, the command below will cause this module to be hidden.
Open the file PCServer-KFEngine.ini in the \KFGame\Config\ folder.
Find the [Core.System] section. Create a blank line just below, and enter the following:
Creating configuration files
As the official instructions of the creator of the game, we need to run our server once so that it generates all relevant files to advanced configuration. To do this, run the KF2Server.bat file present in the server's root directory (that is, by default this file must be within the kf2server_www.brunokitsune.net folder).
Wait for the program properly finish loading and then close the program.
You will know that the process is complete when you see in the window a line with the following content: Log: Steam game server UID: XXXXXXXXXXXXXXXXX (where X is a number of 0-9), as you can see in this example image at the beginning of this section.
In this section we configure the server by choosing the password from administrators, game password, server name, among others. Remember to make these changes when the server is not running!
Open the file PCServer-KFGame.ini in the \KFGame\Config\ folder.
Find the [Engine.AccessControl] section. Inside, the variables that interest us are AdminPassword and GamePassword. The first is the password for the administrators and the second password to connect to your server (this is optional and should be used only if you want a private server).
You must use alphanumeric characters (numbers and letters), such as:
In this case I put the password for administrators as A1b2C34D and the game does not have a password to connect, therefore this will be a public game.
Find the [Engine.GameReplicationInfo] section. Inside, the variables that interest us are ServerName and AdminContact. The first is the server name and the second is the administrator contact email.
You must use alphanumeric characters (numbers and letters), such as:
ServerName=Bruno Kitsune Server
Find the [KFGame.KFGameInfo] section. Inside, the variables that interest us are BannerLink, ServerMOTD and WebsiteLink.
- BannerLink is the image of your server. This image must be a PNG (8 bit).
- ServerMOTD is the message that will appear below the logo. Use the text \n to skip a line.
- WebsiteLink is the link to your site (optional).
You must use alphanumeric characters (numbers and letters). For example:
ServerMOTD=Welcome to this server \n \n Have a nice game!
Open the file KFWeb.ini in the \KFGame\Config\ folder.
Turning on the WebAdmin:
Find the [IpDrv.WebServer] section. Inside, the variable that interests us is bEnabled. For this feature to work, you need to put this variable as "true" (the default is "false").
Optionally, if you want to modify the connection port, you can modify the ListenPort variable, which is in this section. Just remember that if your router does not have uPnP, you must manually release the chosen port.
We can modify many variables from a server without getting modifying the configuration file, just use some variables in KF2Server.bat file, which is present in the server's root directory (ie, by default this file must be within the folder kf2server_www.brunokitsune.net).
To edit the file, simply press the right mouse button on the file and choose the Edit option, as you can see in the image below.
The file must have a content similar to that shown below:
start .\Binaries\win64\kfserver kf-bioticslab?adminpassword=123
The first thing we can change is the initial game map. In this example is selected kf-bioticslab map, but you can choose others, for example: kf-burningparis, kf-outpost, kf-voltermanor, kf-catacombs and kf-evacuationpoint.
All variables of this file are preceded by the symbol "?". Its value must be displayed after the symbol "=", for example:
start .\Binaries\win64\kfserver kf-bioticslab?variable=value?variable2=value2
Remember that all variables placed here override the changes we made in the configuration files! If you do not set these variables, it will use the information provided in the configuration files, so none of them are mandatory. Here are a few variables:
- AdminName= Administrator username to connect to the webadmin. If not set the user will be admin. (Alphanumeric)
- AdminPassword= Master Password of the server administrator. (Alphanumeric)
- MaxPlayers= Maximum number of players. (Numbers - up to 6 for survival mode and up to 12 in the competitive mode).
- Difficulty= Difficulty Number (Numbers: 0= Normal; 1= Hard; 2= Suicide and 3=Hell on Earth).
- Port= Game port. (Numbers)
- QueryPort= Query port. (Numbers)
- WebAdminPort= WebAdmin port. (Numbers)
- Multihome= If you use more than one IP on the same machine, you must define which one will be the server. Useful if you use two networks at the same time. (Alphanumeric).
- PREFERREDPROCESSOR= This will cause the server to run only on a particular processor core for you. (Numbers)
Below are two examples:
start .\Binaries\win64\kfserver kf-burningparis?adminpassword=A1b2C34D?Difficulty=1?Port=8093?QueryPort=8094?WebAdminPort=8095?MaxPlayers=4?Multihome=192.168.137.74
start .\Binaries\win64\kfserver kf-voltermanor?adminpassword=A1b2C34D?Difficulty=3?WebAdminPort=8095?PREFERREDPROCESSOR=2
These commands above are for cooperative play. If you want to play competitively, the initial command line is modified, as in the example below:
.\Binaries\Win64\KFGame.exe Server KF-BurningParis?Game=KFGameContent.KFGameInfo_VersusSurvival?maxplayers=12
In this game mode, only some maps are available: kf-burningparis; kf-bioticslab; kf-prison; kf-voltormanor and kf-farmhouse.
Remember to save your file!
Discovering your IP
Before we continue, we will discover two variables: your external IP and its internal IP.
Is your IP inside your local network. To discover is very simple. Press Windows + R In the window that opened, type "cmd" (without the quotes) and press the Enter button.
In the window that opened, type "ipconfig" (without the quotes) and press Enter. In the list of information that appeared, one refers to the network adapter that you are using. Within this variable, you will see the IPv4 address, as in the image below:
In this example, my local IP is 192.168.137.74.
The easiest way to find your external IP is accessing a website that provides this information, such as this link.
On this site the information will be displayed as in the image below:
In this example, my external IP is 188.8.131.52.
Accessing your server:
Before we continue, make sure the KF2Server.bat file is being successfully executed. You will know that the process is complete when you see in the window a line with the following content: Log: Steam game server UID: XXXXXXXXXXXXXXXXX (where X is a number of 0-9), as you can see in the image below.
To access the WebAdmin, just open your web browser and enter your local IP followed by port you chose to WebAdmin, for example: http://192.168.137.74:8080.
The port that you should put this command is the one that you put in WebAdminPort variable. If you have not chosen, the default port is 8080.
The user to access the panel is what you set in AdminName variable (if you do not set this variable, the user will be admin) and the password is what you set in AdminPassword variable (if you do not set this variable, it is because you are sloppy! Edit again the KF2Server.bat file and set an administrator password).
To access your server through the game, you have two options: The first, and simplest, is to find your server in the server list within the game itself. Another solution is to open the console (~ key) and enter the open command, followed by the local IP and port of the game, such as "open 192.168.137.74:7777" (without quotes).
The port that you should put this command is placed in the variable Port. If you have not chosen, the default port is 7777.
The process is pretty much the same, the only difference is that instead of using the internal IP, they should use the external IP. For example: http://184.108.40.206:8080 to WebAdmin and "open 220.127.116.11:7777" (without quotes) for the game.
They will also find their server in the server list in the game.
For now that's it, folks! I hope you have enjoyed this tutorial! If there are any questions, comments or suggestions, please use our contact form located on the main navigation bar.