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

server.cfg
autoexec.cfg
mapcycle.txt
pure_server_whitelist.txt

Editing server.cfg

Open the File Manager

In the XGamingServer Panel, click Files in the sidebar.

Click tfcfg → 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 0

Gameplay

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 respawn

Class 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 0

Highlander (one of each): set all to 1.

sv_pure (File Consistency)

ModeEffect
0Allow all custom files (HUDs, skins)
1Whitelist-based (blocks model replacements)
2Strict — only official content + sprays

Holiday Events

tf_forced_holiday 0   // 0=calendar, 1=birthday, 2=Halloween, 3=Christmas

Permanent 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 1

Wave 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
PrefixMode
cp_Control Point
pl_Payload
ctf_Capture the Flag
koth_King of the Hill
mvm_Mann vs Machine
arena_Arena

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