Team Fortress 2 Dedicated Server Setup: SteamCMD, GSLT & Browser Fixes
TF2 hosting is straightforward until a server appears locally but not in the public browser, or a token gets copied into the wrong place. The durable setup is a free SteamCMD server, a private GSLT passed at launch, and a small server.cfg that defines the community's rules.
Install the free server app
Use SteamCMD app 232250; anonymous login is sufficient and owning TF2 is not required on the server machine:
steamcmd +force_install_dir /opt/tf2 \
+login anonymous +app_update 232250 validate +quit
The tool provides the Source dedicated-server executable for Windows and Linux. Keep it in a directory owned by a non-root service user and update it during a maintenance window. The server app ID and the game app ID are deliberately different.
Create and protect the GSLT
A public community server should use a Steam Game Server Login Token. Create it at Steam's game-server account page using game ID 440 (TF2), not 232250. Give each server instance its own token and keep it out of chat, screenshots, backups shared with players and source control.
Pass the token to srcds with +sv_setsteamaccount. A minimal Linux launch looks like this:
cd /opt/tf2
./srcds_run -console -game tf -secure \
+map ctf_2fort +maxplayers 24 -port 27015 \
+sv_setsteamaccount YOUR_GSLT
Configure the game and map
Put persistent rules in tf/cfg/server.cfg, then load that file with +exec server.cfg or the panel's startup field. Start with the stock map and no plugins; add SourceMod, Metamod and custom maps only after a vanilla join succeeds.
| Check | Reason |
|---|---|
-game tf | Runs the TF2 game directory instead of another Source mod. |
+map ctf_2fort | Proves the server can load a stock map. |
+maxplayers 24 | Sets the slot count; choose a value your CPU and plugins can sustain. |
-port 27015 | Defines the game/query port; forward the value you actually use. |
-secure | Keeps Valve Anti-Cheat enabled for a normal public server. |
Why the browser is empty
- Join locally or by direct IP first. If direct connect works, the process and map are healthy.
- Confirm the configured port is allowed through the host firewall and router. Do not assume every server still uses 27015 if you run multiple instances.
- Check the launch log for an invalid, expired or already-used GSLT.
- Make sure the server is not hidden by the client's empty/full/password/friends filters.
- Wait for the Steam server browser to refresh after a restart or update.
Update without breaking the community
Stop the process, back up tf/cfg and plugin configuration, run app_update 232250 validate, then start the server with the same map, GSLT and rules. If a patch changes SourceMod or a plugin, test once with plugins disabled before reopening the public server.
Sources
- Official TF2 Wiki: Linux dedicated server
- Official TF2 Wiki: Windows dedicated server
- Official TF2 Wiki: dedicated-server configuration
- Valve Developer Community: Steam Game Server Accounts
Want the token-safe startup, updates, map rotation and DDoS protection handled for you? Reserve a Team Fortress 2 server plan; the hosting page explains the current launch status and takes no payment before the door opens.