Advertisement

Generate a Team Fortress 2 server.cfg

Team Fortress 2 reads server.cfg at startup, but a map change is where settings slip back to their defaults without anyone noticing.

Visual Settings

source Format
Identity

Server name in the browser.

Gameplay

Minutes per map. 0 disables it.

Round wins before a map change. 0 disables it.

Team damage.

Random critical hits. Turning them off is the most common change on community servers.

Both teams hear each other on voice.

How strictly client files must match the server. Higher blocks custom content.

Cheat commands. Several values here reset on map change unless a per-map config reapplies them.

Players & Access

Join password.

Network

Game server login token. Required for public listing, separate from reachability.

RCON & Query

Remote console password.

server.cfg

rcon_password — This is still the example RCON password. Change it, and keep the RCON port off the public internet.
sv_setsteamaccount — Without a game server login token the server will not appear in the public browser, however your ports are configured.
hostname "My TF2"
sv_password ""
rcon_password "changeme"
sv_setsteamaccount 
mp_timelimit 30
mp_winlimit 0
mp_friendlyfire 0
tf_weapon_criticals 1
sv_alltalk 0
sv_pure 0
sv_cheats 0

Advertisement

The server.cfg format

The usual Source syntax: command, a space, then the value. Quote values with spaces, and use 1 and 0 for booleans. A lot of gameplay cvars start with tf_ and apply the moment they are set.

Advertisement

The mistake that wastes an evening

Once the first map is over, per-map and per-gamemode config files run after server.cfg, and some cvars fall back to defaults on every map change unless re-applied. So a value that works on map one and then disappears has been overwritten by one of those files — it was never ignored.

Rather not run the server yourself?

These tools are free and funded by the two hosting services we run. If you want a server that is already set up, here they are.

Advertisement