Public | Automated Build

Last pushed: 4 months ago
Short Description
Dockerfile for running a Killing Floor 2 server under wine
Full Description


Dockerfile for running a Killing Floor 2 server


2GB RAM and 20GB free disk space are essential. SSD recommended, otherwise map
changes will take a long time. Disk space requirements will keep going up as
updates are released.

Simple start

mkdir -p $HOME/{kf2,kf2_steamdir}
docker run -d -t --name kf2 -p \
    -p \
    -p \
    -p \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \

Configuring the server

Configuration is done via environment variables. To run a long, hard server:

docker run -d -t --name kf2 -p \
    -p \
    -p \
    -p \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    -e KF_DIFFICULTY=1 \
    -e KF_GAME_LENGTH=2 \

Updating the server

Run with the command update

docker run -d -t --name kf2 -p \
    -p \
    -p \
    -p \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    dwurf/docker-kf2:latest \

Further arguments get passed to the update command, e.g.

docker run -d -t --name kf2 -p \
    -p \
    -p \
    -p \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    dwurf/docker-kf2:latest \
    update -beta preview validate


KF_MAP (default: KF-BioticsLab)

Starting map when the server is first loaded

KF_DIFFICULTY (default: 0)

Game difficulty.

  • 0 - normal
  • 1 - hard
  • 2 - suicidal
  • 3 - hell on earth

KF_ADMIN_PASS (default: secret)

Used for web console and in-game admin logins

KF_GAME_PASS (default: '')

Setting this creates a private server

KF_GAME_LENGTH (default: 1)

  • 0 - 4 waves
  • 1 - 7 waves
  • 2 - 10 waves

KF_GAME_MODE (default: Survival)

Options are:

  • Survival
  • VersusSurvival
  • WeeklySurvival
  • Endless

KF_SERVER_NAME (default: Killing Floor 2 Server)

Name that appears in the server browser

KF_ENABLE_WEB (default: false)

Set to true to enable the web console. You should probably also change the
default admin password
Access the web console on port 8080, the username is admin, the password is
set to KF_ADMIN_PASS (default: secret)

KF_DISABLE_TAKEOVER (default: false)

Set to true to prevent randoms from taking over the server. Useful if you've
set a password on your server.

Running multiple servers

  1. Ensure 'command' in docker-compose.yml is not present. Update swill be
    handled from the first server only.
  2. Change ports (increment), set environment variables to match
  3. Change server name (optional)

Update the volume mounts as follows:

Map the following read-only volume from server 1

  • $HOME/kf2:/home/steam/kf2server:ro \

Map the following read-write volumes

  • $HOME/kf2-server2/steam/:/home/steam/steam
  • $HOME/kf2-server2/kf2server/KFGame/Logs:/home/steam/kf2server/KFGame/Logs
  • $HOME/kf2-server2/kf2server/KFGame/Config:/home/steam/kf2server/KFGame/Config

These are only required for Steam Workshop maps (see below)

  • $HOME/kf2-server2/kf2server/Binaries/Win64/steamapps:/home/steam/kf2server/Binaries/Win64/steamapps
  • $HOME/kf2-server2/kf2server/KFGame/Cache:/home/steam/kf2server/KFGame/Cache

You must also copy the basic config files from server1

mkdir -p $HOME/kf2-server2/kf2server/KFGame/Config
cp -a $HOME/kf2/kf2server/KFGame/Config/* $HOME/kf2-server2/kf2server/KFGame/Config

Steam Workshop maps

Under kf2server, modify the file KFGame/Config/LinuxServer-KFEngine.ini as per Tripwire's wiki

Example shown below is for Biolapse - Biotics Holdout by


You'll also need to add the maps to LinuxServer-KFGame.ini as described in the wiki here and here.



[KF-Biolapse KFMapSummary]

Building the image

docker build -t dwurf/docker-kf2:latest .


Docker Pull Command
Source Repository