Team Fortress 2
Config Generator
Fill in the fields below to generate a ready-to-use server.cfg for your Team Fortress 2 dedicated server. For the full setup walkthrough -- getting the server files, required ports and starting it up -- see the Team Fortress 2 setup guide. Not sure your hardware is up to it? Check compatibility first.
Executed automatically on startup from tf/cfg/server.cfg. The actual player-slot count is set with a -maxplayers N launch flag, not in this file.
Source: Official TF2 Wiki and Valve Developer Community (Valve's own official documentation).
server.cfg preview
hostname "My TF2 Server" rcon_password "" sv_password "" sv_visiblemaxplayers 24 sv_lan 0
Server running but nobody can join?
A wrong or missing setting in this file isn't the only reason players can't connect -- see the connection troubleshooting guide for port forwarding, firewall and CGNAT issues.