Workload · Hosting a Killing Floor 2 squad

Run a Killing Floor 2 server that is always there when your squad logs on

To host Killing Floor 2 yourself, you install Tripwire's free server (Steam app 232130) with SteamCMD, using an anonymous login, and start it with a map name on a Linux machine that stays online. Below is the whole evening's work on a rented machine running Ubuntu: what to open in the firewall, where the admin password goes so it stays private, how to reach the web admin without exposing it, and how Workshop maps get onto the server. The machines are on our game server page.

The short version
  1. Free download: no copy of the game needed to install the server
  2. Three UDP ports to open: 7777, 27015 and 20560
  3. Web admin is off until you switch it on; keep it behind SSH
  4. Pick x86: we'd steer clear of ARM
  5. Patches itself every time it restarts

Why your group gets a machine of its own

A server that lives on a rented machine is there at 3 a.m. when half the squad is in another time zone, and nobody's gaming PC has to stay on. The machine comes with a public IPv4 address of its own, so there's no home router or port forwarding to fight with: you open three ports in its firewall and players can connect.

With us the whole machine belongs to you: all of its processor cores, all of its RAM, and root access. It sits on a port that is not shared with any other customer at the access switch, and traffic is unmetered: 500 Mbps or 1 Gbps comes included depending on the line, and nothing counts what you use. There is no long contract either; billing is month to month.

How big does the machine need to be?

Tripwire doesn't say: its server guide gives no processor, memory or disk figures. Here is what it does settle, and what follows from it.

Your questionThe answer
How many players?The default Survival mode is for 6 players; Versus Survival takes up to 12
Which processor family?x86-64, as far as we can tell: the only Linux file Tripwire names is KFGameSteamServer.bin.x86_64
Do I need to buy anything from Steam?No. Tripwire says the download works without an account that owns the game, and recommends an anonymous login
Which ports?7777 (UDP) for players, 27015 (UDP) so Steam can list you, 20560 (UDP) for Steam; 8080 (TCP) only if you turn the web admin on

Our suggestion, not Tripwire's: begin with a modest x86 machine, play a full game with every slot taken and the maps you like, and keep top open in an SSH window. Upgrade only if the server is actually struggling.

The server that fits

  • Any x86 line. Browse them on the game server page and choose whichever city sits closest to your players: Amsterdam, Bucharest, Miami, New York or San Francisco.
  • Not ARM. We'd leave both machines on our ARM page, the Ampere Altra and the X-Gene cartridge, aside: as far as we can tell from its file name, the game's Linux server only comes as an x86-64 build.
  • Ubuntu. Choose a current Ubuntu release when you order; it installs in one click on our Linux servers.
  • Soon after you order. A ready server is yours in about 30 minutes once the order is approved; payment checks can add time. Instant servers shows what is racked.

Every rack server and blade includes a remote console you can open in a browser, which rescues you if a firewall rule ever locks you out of SSH. Most of our cartridges offer just power on and off.

Getting it installed

Sign in over SSH with your own account. The block switches the firewall on with only SSH allowed (IPv6 covered too), then lets the game in. Next it makes a separate user, zedtime, so the game never runs as root, as Valve's SteamCMD page advises, and installs SteamCMD from Ubuntu's multiverse repository. If a Steam licence screen appears, accept it to carry on. The last line downloads the server.

sudo sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufw
sudo ufw allow OpenSSH
sudo ufw --force enable
sudo ufw allow 7777/udp
sudo ufw allow 27015/udp
sudo ufw allow 20560/udp
sudo useradd -m -s /bin/bash zedtime
sudo add-apt-repository -y multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y steamcmd
sudo -u zedtime bash -c 'cd /home/zedtime && /usr/games/steamcmd +force_install_dir /home/zedtime/kf2 +login anonymous +app_update 232130 validate +quit'

Tripwire's Linux steps write the same commands into a script file and pass it to steamcmd +runscript; one line does the same job. Port 8080 stays shut on purpose: the web admin gets its own section below.

Keeping it running, and up to date

Tripwire says the download step has to be repeated whenever the game is patched. Let systemd, the service manager built into Ubuntu, do that for you: before each start it asks Steam for updates, then launches the game on Burning Paris.

sudo tee /etc/systemd/system/kf2-squad.service > /dev/null <<'EOF'
[Unit]
Description=Killing Floor 2 for the squad
Wants=network-online.target
After=network-online.target

[Service]
User=zedtime
WorkingDirectory=/home/zedtime/kf2
ExecStartPre=-/usr/games/steamcmd +force_install_dir /home/zedtime/kf2 +login anonymous +app_update 232130 +quit
ExecStart=/home/zedtime/kf2/Binaries/Win64/KFGameSteamServer.bin.x86_64 kf-burningparis
TimeoutStartSec=1800
Restart=always
RestartSec=20

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now kf2-squad
  1. Follow the start-up with sudo journalctl -u kf2-squad -f. The first run creates the server's settings files in KFGame/Config; Tripwire says to launch once for exactly that reason.
  2. Then stop it with sudo systemctl stop kf2-squad and move on to the settings.
  3. To install a patch later, run sudo systemctl restart kf2-squad when nobody is playing, because everyone gets disconnected.

The minus sign in front of the update line lets the game start when the update step exits with an error. A hung update still holds the start until TimeoutStartSec=1800 (30 minutes) runs out. Restart=always brings the game back however it stops, because Tripwire doesn't document what the server returns when it crashes. The routine update skips validate; keep that for the first install or for repairing broken files.

Naming it and keeping the admin password private

Most of your settings live in PCServer-KFGame.ini. Tripwire also allows the admin password on the launch line, but please don't: anyone logged in to the machine can read launch options in the process list. The ini file keeps it out of sight. With the server stopped, open it as the game user with sudo -u zedtime nano /home/zedtime/kf2/KFGame/Config/PCServer-KFGame.ini and change these keys where they already appear.

[Engine.GameReplicationInfo]
ServerName=Zed Time Squad
AdminContact=squad@example.com

[Engine.AccessControl]
AdminPassword=pick-something-long-and-random
GamePassword=optional-join-password
  • GamePassword makes players type a password to join. Leave it empty for a public server.
  • Lock the file afterwards: sudo -u zedtime chmod 600 /home/zedtime/kf2/KFGame/Config/PCServer-KFGame.ini.
  • GameLength picks a short, normal or long game (0, 1 or 2: 4, 7 or 10 rounds).
  • Tripwire's other warning: leave the default ini files alone and change only the PCServer- ones.

Reaching the web admin without exposing it

The web admin lets you change maps and modes from a browser, and it starts switched off. To turn it on, find KFWeb.ini (Tripwire names the file but not its folder; find /home/zedtime/kf2 -name KFWeb.ini will show you), and under [IpDrv.WebServer] set bEnabled=true. It listens on port 8080 unless you change ListenPort. You sign in as Admin with your admin password.

Here's the catch: the guide offers no HTTPS setting, so we take the web admin to be plain HTTP, which means your password would travel unencrypted. Keep port 8080 shut and tunnel to it over SSH instead. On your own computer run ssh -N -L 8080:198.51.100.20:8080 yourname@198.51.100.20, with your server's IP in each spot, and open http://localhost:8080 while that window stays open.

Adding Workshop maps

  1. Stop the server first. Tripwire warns that edits made while it runs are overwritten at the next restart.
  2. Open KFGame/Config/PCServer-KFEngine.ini and add a section called [OnlineSubsystemSteamworks.KFWorkshopSteamworks]. Under it, write ServerSubscribedWorkshopItems= followed by the number from the id= part of each map's Workshop address, one line per map.
  3. So that players download those maps from Steam when they join, find [IpDrv.TcpNetDriver] in the same file and add DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload, placed above any other DownloadManagers= line.
  4. Start the server and give it a few minutes to fetch everything. Each map arrives in a folder named after its item number inside KFGame/Cache, under 0/BrewedPC, and its file name without .kfm is what you put in your map rotation.

The guide adds that Linux servers don't create the cache folder by themselves. Run sudo -u zedtime mkdir -p /home/zedtime/kf2/KFGame/Cache before the first start.

One more setting worth knowing: through Server Takeover, players matchmaking for a private game can borrow an idle server and make it private until they leave. If you'd rather keep yours to yourselves, open PCServer-KFEngine.ini, find the [Engine.GameEngine] section and add the line bUsedForTakeover=FALSE.

When this isn't the right fit

  • You were eyeing an ARM machine: Tripwire ships only an x86-64 Linux server, so we'd pick x86.
  • You want a control panel that installs patches, mods and backups for you. This is a whole Linux machine with root, and the game server on it is yours to look after.

You manage the server; we keep the hardware and the network running. So keep a copy of your KFGame/Config folder somewhere other than this machine, since that is where your passwords, map list and Workshop items live. If something on the machine itself goes wrong, our team is on live chat, email and phone 24/7, every day of the year.

Questions people ask

Does the server cost anything on Steam?
No. The server is a separate free download, Steam app 232130. According to Tripwire you can fetch it with an anonymous SteamCMD login; owning the game isn't required.
What do I open in the firewall?
UDP 7777 so players can connect, UDP 27015 so the Steam server list can see you, and UDP 20560, which Tripwire lists as the Steam port. The web admin's TCP 8080 is better left closed and reached through an SSH tunnel.
Can I play Versus or Endless instead of Survival?
Yes. Add the mode to the map on the launch line, for example kf-burningparis?Game=KFGameContent.KFGameInfo_Endless, or choose it under Change Map in the web admin. Versus Survival takes up to 12 players with ?maxplayers=12.
My server's log keeps asking for a Steam Server UID. What now?
Tripwire's guide suggests validating the server files. Stop the game's service, rerun the download command from the install step with validate kept on the end, then start it. The guide also says to make sure no Steam game is open on the same machine, which won't apply to a headless server.
Will it work on an ARM server?
Not as far as we can tell: the only Linux server Tripwire's guide names ends in x86_64, which we read as an x86-64 program, and it mentions no ARM build. Pick one of the x86 machines on the game server page.

Give your squad a server that never sleeps

Pick an x86 machine near your players; a racked one is ready about 30 minutes after your order is approved.

Get a game server

Read next