Team Fortress 2’s server.cfg is a plain-text file that applies server settings automatically. On a dedicated server, create it in the installation’s tf/cfg directory, add only convars supported by the running build, then restart the server or change the map to load the settings. The file controls identity, access, visibility, content policy, logging and round behavior; it does not replace launch options, plugin configuration or client settings.
Playing with friends? Godlike.Host runs hosted Team Fortress 2 servers from 10 data-center locations, with free DDoS protection.
This guide covers the dedicated-server workflow, a defensible baseline configuration, validation commands and the causes of settings that appear to reset on a map change.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Team Fortress 2 - PC (Collector's) | $24.95 | Buy on Amazon |
| 2 |
|
The Orange Box - PC | $33.93 | Buy on Amazon |
| 3 |
|
Team Fortress Classic | $37.18 | Buy on Amazon |
| 4 |
|
Island Fortress by Game Salute | $34.00 | Buy on Amazon |
| 5 |
|
Team Fortress 2 - Cartoonified Design Decal Sticker - Graphic for Auto, Wall, Laptop, Cell, Truck... | $1.99 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
What server.cfg does
server.cfg is executed by the Team Fortress 2 server as a batch of console-variable assignments. A line such as hostname "My TF2 Server" sets the server name whenever the file is loaded. Because the file is stored with the server installation, the values can be applied consistently after a restart instead of being typed manually in the console.
Lines beginning with two forward slashes are comments. For example, // Public identity is ignored by the game and can document why a setting exists. Keep the file as ordinary text; do not save it as a word-processing document or as server.cfg.txt.
#1 Best Overall
- Nine unique character classes, each providing a completely unique play experience for players of varying skills
- Advanced graphics that offers a unique game environment while providing game information within the visuals
- Support for up to 24 players
- Introduces new multiplayer game modes and support for voice chat
- Automatic updates – Stop wasting time looking for patches or new content
Dedicated server versus listen server
A listen server is created from the player client and normally exists only while that client is playing. A dedicated server runs as separate server software and is the relevant target for a persistent server.cfg. The Official TF2 Wiki distinguishes these two modes; instructions for a dedicated installation should not be assumed to describe a local match started from the game menu.
Where the file goes
Place the file at tf/cfg/server.cfg, where tf is the Team Fortress 2 server directory. On Windows, if the server was installed in C:tf2_server, the resulting path is C:tf2_servertfcfgserver.cfg. On another operating system, the path uses that system’s separators, but the directory names remain tf and cfg.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
If the cfg directory does not contain the file, create a new plain-text file named exactly server.cfg. File extensions must be visible in your file manager while you check this: a hidden .txt suffix is a common reason a configuration seems to be ignored.
Rank #2
- Characters - Advanced facial animation system delivers the most sophisticated in-game characters ever seen. With 40 distinct facial muscles, human characters convey the full array of human emotion, and respond to the player with fluidity and intelligence
- Physics - From pebbles to water to 2-ton trucks respond as expected, as they obey the laws of mass, friction, gravity, and buoyancy
- Graphics - Source's shader-based renderer, like the one used at Pixar to create movies such as Toy Story and Monster's, Inc., creates the most beautiful and realistic environments ever seen in a video game.
- AI - Neither friends nor enemies charge blindly into the fray. They can assess threats, navigate tricky terrain, and fashion weapons from whatever is at hand
Install or update the dedicated server
SteamCMD is the standard way to install or update the dedicated application. The researched installation example uses application ID 232250 and a Windows install directory:
steamcmd +login anonymous +force_install_dir C:tf2_server +app_update 232250 validate +quit
Run the command from the SteamCMD environment, changing the installation directory to the location you actually intend to maintain. The validate option checks downloaded files, so an update can take longer than a routine launch. The application ID and command shown above come from a Steam Community guide published in 2017; after major platform changes, confirm that SteamCMD completes without an error before troubleshooting the configuration file.
Create and edit server.cfg
- Stop the dedicated server before editing so that a running process cannot overwrite or obscure your changes.
- Open the installation’s
tf/cfgdirectory and create a plain-text file namedserver.cfg. - Add one command per line. Put a space between a convar and its value; quote values that contain spaces.
- Use
//comments to label groups, but do not place explanatory text after a command unless it is separated as a comment line that your parser accepts reliably. - Save the file in a text encoding your server accepts, then start the server or change the map.
- In the server console, query important values by entering the convar name without a value. Compare the returned value with the one in the file.
Do not copy a random internet configuration wholesale. Commands can be client-only, removed, renamed or unsuitable for the current build. The live server is the authority: run cvarlist log cvarlist.txt to write the available command inventory to cvarlist.txt, then use that list when deciding what belongs in your file.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #3
A practical baseline configuration
The following groups cover the settings most administrators need. Values shown as choices are decisions for your server, not universal defaults.
| Purpose | Convar | What it controls | How to choose a value |
|---|---|---|---|
| Identity | hostname |
The name presented to players and server browsers. | Use a clear name that identifies the community, location or game mode. |
| Private access | sv_password |
A password required to join. | Use an empty value for a public server; set a strong, shared value for a private event. |
| Administrator access | rcon_password |
Password protection for remote console administration. | Use a long, unique secret. Never reuse a player or operating-system password. |
| Network mode | sv_lan |
Whether the server operates as LAN-only or is advertised for internet play. | Set it to match your network plan; an internet server should not be left in LAN mode. |
| Region reporting | sv_region |
The broad geographic region reported by the server. | Select the region that best describes the machine’s location. |
| Content policy | sv_pure |
Which game files clients may use. | Choose between unrestricted custom content, a whitelist and Steam-supplied content only. |
| Logging | log |
Enables server logging. | Enable it when you need an operational or moderation record. |
| Logging destination | sv_logfile |
Controls writing log output to files. | Enable it when retaining files for diagnostics or administration. |
| Log organization | sv_log_onefile |
Whether output is kept in one file rather than split into multiple files. | Choose the format that fits your rotation and storage practice. |
| Ban records | sv_logbans |
Whether bans are written to the log. | Enable it if you need an auditable moderation history. |
| Displayed capacity | sv_visiblemaxplayers |
The maximum player count shown to browsers. | Set it to the capacity you intend to advertise, not an arbitrary large number. |
| Round limit | mp_maxrounds |
How many rounds a map can run before the map cycle advances. | Pick a value appropriate for the intended mode and session length. |
Example file
This is a compact starting point. Replace the example identity and administrative secret, and adjust the policy and mode values before exposing the server publicly.
// Identity and access
hostname "TF2 Community Server"
rcon_password "Tf2-Admin-9vQ!2xL7#pR4"
sv_password ""
// Network context
sv_lan 0
sv_region 3
// Content policy
sv_pure 1
// Logging
log on
sv_logfile 1
sv_log_onefile 0
sv_logbans 1
// Capacity and round behavior
sv_visiblemaxplayers 24
mp_maxrounds 4
The numeric value for sv_region is installation- and convention-dependent; use the value documented for your deployment and verify it in the live server’s convar list. Likewise, the example’s capacity and round count are illustrative choices, not a recommended player limit for every map or mode.
Rank #4
- For 2-4 players
- Ages 13 and up
- 90 minute playing time
Choosing a sv_pure policy
sv_pure is the main trade-off between custom client content and control over game files. The installation guide describes three modes:
| Value | Policy | Practical consequence |
|---|---|---|
0 |
Unrestricted | Clients may specify any game-file location. This permits the most customization but gives the server the least control over altered content. |
1 |
Whitelist-based | Only content allowed by the server’s pure rules is accepted. This is a middle ground for communities that need predictable files while allowing selected additions. |
2 |
Steam-official content only | Clients are restricted to Steam-supplied content. This maximizes consistency and reduces the surface for unwanted file modifications, at the cost of custom skins, models and similar content. |
Set this deliberately rather than copying sv_pure 0 because it appears in an old example. A public server that values consistent visuals and cheat resistance will generally need a stricter policy than a private event built around custom files.
VAC and launch security
VAC is enabled by default according to the historical installation guide, and that guide says an administrator must add -insecure to the launch options to disable it. Treat -insecure as an explicit launch-configuration decision, not as a server.cfg command. Do not use it on a public server that is supposed to have VAC protection. Because this behavior and platform integration can change with updates, check the server’s current launch output after an update.
Best Value
- Brand: decals
- Material: Vinyl
- Surface recommendation: Metal,Plastic
- Item shape: Rectangular
- Installation type: Stick
Protect rcon_password as you would any administrator credential. Do not post the file in a public repository, paste it into support forums or use the same secret on multiple servers. If the secret is exposed, stop the server, replace it, and review logs for unauthorized commands.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Load, validate and document the configuration
- Start the server with the edited file in
tf/cfg, or issue a map change from the server console. - Watch the console for unknown-command, bad-value or permission errors. One invalid line can make a setting appear absent even when the rest of the file is correct.
- Query each critical convar directly, including
hostname,sv_lan,sv_region,sv_pure,sv_visiblemaxplayersandmp_maxrounds. - Run
cvarlist log cvarlist.txtwhen you need to confirm whether a command exists in this build. Keep the resulting inventory with your administration notes. - Test from the same network type your players will use. A local client can connect to a LAN server even when an internet listing would not work.
Record the date of meaningful edits and the reason for each non-default value in comments. The Nodecraft guide updated September 5, 2024, specifically documents comments beginning with //; clear comments make later troubleshooting much faster.
Why settings seem to reset after a map change
Server settings are loaded before a new map, so a map change is a useful way to reload server.cfg. If a value changes immediately afterward, the file may not be the last configuration source that runs. Use this symptom-based check:
| Symptom | Likely cause | Check and correction |
|---|---|---|
| No settings apply, even after restart. | Wrong path, wrong filename or a hidden .txt extension. |
Confirm the exact tf/cfg/server.cfg path and make file extensions visible. |
| Some lines work while others do not. | Unsupported, misspelled or obsolete convars; malformed values. | Check console errors and compare every command with cvarlist from the running build. |
| A value is correct at startup but changes on a new map. | A map-specific configuration, plugin or later startup script writes a different value. | Search those additional configuration sources, then ensure the desired command runs after the conflicting command. |
| Only passwords or protected settings fail. | The command is restricted, overridden by another administrator tool or not accepted in the current context. | Query the value in the server console and inspect administrative tooling and logs. |
| Players see the wrong server capacity or region. | The displayed value differs from actual capacity, or the convar is not available in this build. | Query sv_visiblemaxplayers and sv_region, then validate the result from a browser listing. |
Make one change at a time and force a restart or map change between tests. Changing several files simultaneously makes it impossible to identify which source won the load order.
Manual files, control panels and maintenance choices
| Approach | Best fit | Trade-off |
|---|---|---|
| Self-managed dedicated server | Administrators who need full filesystem and launch-option control. | You maintain SteamCMD updates, permissions, backups, firewall rules and uptime. |
| Managed game-server panel | Operators who prefer browser-based file editing, scheduled restarts and provider-maintained infrastructure. | The panel may hide launch options or restrict available files and convars; verify that it writes to the actual tf/cfg directory. |
| Listen/local server | Short-lived testing or a private session hosted from a player machine. | It is tied to that player’s session and is not a substitute for persistent dedicated hosting. |
Regardless of hosting method, the validation rule is the same: the running server’s console and cvarlist output outrank static examples. A control panel can change how you edit the file, but it does not make unsupported commands valid.
Free tools Windows power users keep installed
One-click scans. No signup required.
Operational checklist
- Keep a backup of the last known-good
server.cfgbefore changing it. - Store secrets outside screenshots, public repositories and shared chat.
- After every game or plugin update, review console errors and regenerate
cvarlistif a command behaves differently. - Use comments to explain intentional non-default values, especially
sv_pure, logging and round limits. - Test a configuration on a private or password-protected instance before applying it to a public server.
- Check both the value reported by the console and the behavior observed by a connecting client.
A current public configuration example dated April 26, 2026, demonstrates that administrators continue to group identity, access and logging commands in this file. Its exact values should not be treated as universal defaults: your running build, game mode, region and content policy determine the appropriate settings.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




