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 0GSLT Required
Create at Steam Game Server Management with App ID 440. Add +sv_setsteamaccount TOKEN to startup.
Class Limits
| Setting | Default | Description |
|---|---|---|
tf_classlimit_scout | 0 | 0 = unlimited |
tf_classlimit_soldier | 0 | |
tf_classlimit_pyro | 0 | |
tf_classlimit_demoman | 0 | |
tf_classlimit_heavy | 0 | |
tf_classlimit_engineer | 0 | |
tf_classlimit_medic | 0 | |
tf_classlimit_sniper | 0 | |
tf_classlimit_spy | 0 |
Competitive Settings
tf_weapon_criticals 0
tf_use_fixed_weaponspreads 1
tf_damage_disablespread 1Mann vs Machine (MvM)
- Maps prefixed
mvm_(e.g.,mvm_mannhattan) tf_mm_servermode 1for 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_viaductPrefixes: cp_ (control point), pl_ (payload), ctf_ (capture the flag), koth_ (king of the hill), mvm_ (Mann vs Machine)
Pure Mode
| Setting | Effect |
|---|---|
sv_pure 0 | Allow all custom files |
sv_pure 1 | Allow whitelisted custom files |
sv_pure 2 | Block all custom files (strictest) |
FastDL
sv_downloadurl "https://yoursite.com/fastdl/"
sv_allowdownload 1TF2 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
| Port | Protocol | Purpose |
|---|---|---|
| 27015 | UDP + TCP | Game + RCON |
| 27020 | UDP | SourceTV |
Related Guides
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