Team Fortress 2 Dedicated Server: srcds, server.cfg & sourcemod Guide

Data Verified: May 2026

Complete TF2 dedicated server reference. Configure server.cfg, mapcycle, sv_pure, SourceMod/MetaMod plugins, GSLT login tokens, and size hardware for stable 24-32 slot community servers.

Default file locations

Default installation paths for Team Fortress 2 dedicated servers installed via SteamCMD.

Windows

C:\srcds\tf\cfg\

Linux

/home/steam/tf2/tf/cfg/

Pro-Tip: Always stop the server completely before editing configuration files, or the server will overwrite your changes upon restart.

Default ports for port forwarding

Open these on your router and firewall before exposing the server to the internet.

Default ports for Team Fortress 2
ServiceProtocolPort
Game PortUDP27015
Query PortUDP27015
RCON / TelnetTCP27015

Quick start: launch your Team Fortress 2 server

Copy-paste these two commands to install and start a Team Fortress 2 dedicated server. Tested against SteamCMD on a fresh box.

Step 1, Install via SteamCMDSteam App ID 232250

steamcmd +force_install_dir /home/steam/tf2server +login anonymous +app_update 232250 validate +quit

Step 2, Launch the Team Fortress 2 server

cd /home/steam/tf2server && ./srcds_run -game tf +map cp_badlands +maxplayers 24

Step 1, Install via SteamCMDSteam App ID 232250

steamcmd +force_install_dir "C:\tf2server" +login anonymous +app_update 232250 validate +quit

Step 2, Launch the Team Fortress 2 server

C:\tf2server\srcds.exe -console -game tf +map cp_badlands +maxplayers 24

Frequently asked questions

Browse all games →

Host your own Team Fortress 2 server

All hosting guides →

Step-by-step install and deploy walkthroughs (panels, ports, RAM sizing). Pair these with the command reference above.