How to Configure Your Team Fortress 2 Server

Complete TF2 server.cfg reference — hostname, GSLT, class limits, competitive settings, MvM, and plugins.

TF2 uses server.cfg in tf/cfg/. TF2 is the most complex Source engine server to configure.

Key Settings

hostname "My TF2 Server"
sv_password ""
rcon_password "secretpass"
sv_lan 0
sv_cheats 0
mp_timelimit 30
mp_maxrounds 0

GSLT Required

Create at Steam Game Server Management with App ID 440. Add +sv_setsteamaccount TOKEN to startup.

Class Limits

SettingDefaultDescription
tf_classlimit_scout00 = unlimited
tf_classlimit_soldier0
tf_classlimit_pyro0
tf_classlimit_demoman0
tf_classlimit_heavy0
tf_classlimit_engineer0
tf_classlimit_medic0
tf_classlimit_sniper0
tf_classlimit_spy0

Competitive Settings

tf_weapon_criticals 0
tf_use_fixed_weaponspreads 1
tf_damage_disablespread 1

Mann vs Machine (MvM)

  • Maps prefixed mvm_ (e.g., mvm_mannhattan)
  • tf_mm_servermode 1 for MvM matchmaking
  • Requires popfiles in tf/scripts/population/
  • tf_mvm_min_players_to_start — minimum to start

Map Rotation

Edit tf/cfg/mapcycle.txt:

cp_dustbowl
pl_badwater
ctf_2fort
koth_viaduct

Prefixes: cp_ (control point), pl_ (payload), ctf_ (capture the flag), koth_ (king of the hill), mvm_ (Mann vs Machine)

Pure Mode

SettingEffect
sv_pure 0Allow all custom files
sv_pure 1Allow whitelisted custom files
sv_pure 2Block all custom files (strictest)

FastDL

sv_downloadurl "https://yoursite.com/fastdl/"
sv_allowdownload 1

TF2 uses FastDL heavily for custom maps, sounds, and sprays.

Plugins

Install MetaMod:Source + SourceMod for admin management. TF2 has a huge SourceMod plugin ecosystem.

Ports

PortProtocolPurpose
27015UDP + TCPGame + RCON
27020UDPSourceTV

How is this guide?

40% Off — Limited TimeGet your Team Fortress 2 server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page