How to Configure Your Team Fortress 2 Server (server.cfg)
Complete TF2 server.cfg reference — hostname, GSLT, class limits, MvM, competitive settings, sv_pure, holidays, and SourceMod.
TF2 is the most complex Source engine server to configure — with class limits, MvM mode, holiday events, and a deep plugin ecosystem.
File Structure
Editing server.cfg
Open the File Manager
In the XGamingServer Panel, click Files in the sidebar.
Navigate to the config
Click tf → cfg → open server.cfg.
Save and restart
Edit, click Save, restart from Console.
server.cfg — Essential Settings
Server Identity
hostname "My TF2 Server"
sv_password ""
rcon_password "YourRconPassword"
sv_contact "admin@example.com"
sv_tags "increased_maxplayers,alltalk"
sv_lan 0Gameplay
mp_autoteambalance 1
mp_teams_unbalance_limit 1
mp_timelimit 30
mp_respawnwavetime 10
tf_weapon_criticals 1 // Random crits (0 = disable for competitive)
tf_damage_disablespread 0 // 1 = fixed damage (competitive)
mp_friendlyfire 0
mp_disable_respawn_times 0 // 1 = instant respawnClass Limits
0 = unlimited, -1 = class disabled:
tf_classlimit_scout 0
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 0Highlander (one of each): set all to 1.
sv_pure (File Consistency)
| Mode | Effect |
|---|---|
0 | Allow all custom files (HUDs, skins) |
1 | Whitelist-based (blocks model replacements) |
2 | Strict — only official content + sprays |
Holiday Events
tf_forced_holiday 0 // 0=calendar, 1=birthday, 2=Halloween, 3=ChristmasPermanent Halloween: tf_forced_holiday 2
GSLT (Required)
TF2 strictly requires a GSLT — without it, the server won't appear in the browser at all.
Create at Steam Game Server Management with App ID 440. Add in the Startup tab.
MvM (Mann vs Machine)
Co-op PvE mode. Set map to mvm_*, configure:
tf_mvm_min_players_to_start 1
tf_mvm_respec_enabled 1Wave definitions (popfiles) are in tf/scripts/population/. Start a mission: tf_mvm_popfile mvm_rottenburg_advanced1
MvM maps: mvm_coaltown, mvm_decoy, mvm_mannworks, mvm_mannhattan, mvm_rottenburg, mvm_bigrock
Map Rotation
Edit tf/cfg/mapcycle.txt:
cp_dustbowl
pl_upward
pl_badwater
ctf_2fort
koth_harvest_final| Prefix | Mode |
|---|---|
cp_ | Control Point |
pl_ | Payload |
ctf_ | Capture the Flag |
koth_ | King of the Hill |
mvm_ | Mann vs Machine |
arena_ | Arena |
Ports
| Port | Protocol | Purpose |
|---|---|---|
| 27015 | UDP + TCP | Game + RCON |
| 27020 | UDP | SourceTV |
Related Guides
How is this guide?
