How to Host a Killing Floor 2 Server on Ubuntu

This guide will explain the step by step instructions to host a Killing Floor 2 server on Ubuntu Linux. Follow along below to get your server configured and be up and running quickly.

To keep things simple, we will be using /kf2 as our installation directory, and we’re assuming that you are doing everything with your system’s root account. You can adapt these details according to your own setup preferences.

KF2 Server Setup

1. If you’re not already logged in as root, use the following command to change accounts.

$ sudo -i

2. Next, install the steamcmd package on your system.

# apt -y install steamcmd

3. Create the directory to where you will install all of the KF2 server files.

# mkdir /kf2

4. Next, use steamcmd to download all of the KF2 server files. Substitute your own KF2 directory in your command if you have chosen a different path. This process may take a little while, depending on your internet speed.

# steamcmd +login anonymous +force_install_dir /kf2 +app_update 232130 validate +quit

5. You can now start your server by using the command below. This will lauch everything with the default settings, and map kf-bioticslab.

# /kf2/Binaries/Win64/KFGameSteamServer.bin.x86_64 kf-bioticslab

It’s recommended that you use the screen command so you don’t need to keep the current terminal open in order for the server to run.

# screen -S kf2 
# /kf2/Binaries/Win64/KFGameSteamServer.bin.x86_64 kf-bioticslab

Press Ctrl + A, D on your keyboard to detach from the screen instance. Recall it anytime with screen -r kf2.

6. You should now be able to connect to your server from the server browser in game, or by connecting directly to the IP address. When you’re ready to apply further configuration to the server, such as custom maps, an admin password, etc, you can consult the official KF2 dedicated server guide.

KF2 Server Startup Script

Since the command to start a KF2 server instance can grow rather long, you can streamline the starting process by configuring a Bash script. Here’s an example where the KF2 server is started inside of a detached screen.

#!/bin/bash

screen -mdS kf2 /kf2/Binaries/Win64/KFGameSteamServer.bin.x86_64 kf-bioticslab

Save your script as something like launchkf2.sh, then add execute permissions to the file.

# chmod +x launchkf2.sh

Now, launching the server in the future is as simple as:

# ./launchkf2.sh

If our content helped you, please consider buying us a coffee. We appreciate your support!

Buy me a coffee donation button

Leave a Comment

Your email address will not be published. Required fields are marked *