General / Panel

Editing server.cfg: CS2, GMod, TF2 & Left 4 Dead 2

Last updated on August 10, 2026
source-engineserver-cfgrconcs2gmodtf2l4d2configuration

CS2, Garry's Mod, TF2, and Left 4 Dead 2 are all Source-family engines, so they share the same configuration mechanism: a server.cfg file that the engine automatically executes every time the server starts. Spawnly generates a working default for you on first boot — this article covers where to find it per game and what's safe to change.

Where each game's server.cfg lives

GamePath (relative to File Manager root)
Garry's Modgarrysmod/cfg/server.cfg
Counter-Strike 2game/csgo/cfg/server.cfg
Team Fortress 2tf/cfg/server.cfg
Left 4 Dead 2left4dead2/cfg/server.cfg

Open the file from the Files tab like any text file, edit it, and save — changes apply the next time the server (re)starts.

What's already in there by default

Spawnly pre-fills a minimal working config so RCON and basic settings function out of the box. For example, GMod's default looks like this:

hostname "Spawnly Garry's Mod Dedicated Server"
sbox_maxprops 150
sbox_maxragdolls 5
sbox_maxnpcs 10
sbox_maxballoons 10

CS2, TF2, and L4D2 get an equivalent minimal file with a hostname line and game-appropriate defaults (CS2 also sets sv_cheats 0 and team-balance rules; TF2 and L4D2 include a blank sv_password).

What you can safely add

Any standard console command (cvar) for that engine can go on its own line in server.cfg — common ones include hostname (server browser name), sv_password (join password), and per-game gameplay cvars like GMod's sbox_* limits shown above. Each game's own modding community documents the full cvar list; server.cfg is simply where you place them so they run automatically on every boot.

You don't need to set rcon_password yourself — Spawnly already generates and manages it internally so the Console tab can send commands to your server. Adding your own rcon_password line would override that and break the Console tab.

Next steps

None of these four games have an automated Steam Workshop mod manager on Spawnly — see each game's own Installing Mods article (Garry's Mod, Counter-Strike 2, Team Fortress 2, Left 4 Dead 2) for how content and admin plugins actually get installed.

Still need help?

Our support team is available in our Discord community.

Join Discord Support
Support & Help