Skip to content

Team Fortress 2: Server Configuration

Learn how to configure the server name, password, starting map, bots, and other settings for your Team Fortress 2 server.

26 November 20264 min read0 Views0 helpful

Don't have your own server yet? Host your Team Fortress 2 server with ZAP-Hosting from €4.49 / month.Or try 3 days from €0.81

Introduction

With the right configuration, you can turn your Team Fortress 2 server into exactly the server you have in mind: your own name, a password, your favorite starting map, and rules such as time limits, bots, or alltalk. In this guide, we’ll show you which settings are available, where to find them in ZapX, and what you can customize in your own configuration file.

How the configuration works

Your Team Fortress 2 server reads its settings from two sources:

  • Startup parameters: Set the server name, server password, player count, starting map, and Steam server token in ZapX under the Configuration tab, in Startup parameters.
  • Configuration files: Enter all other server commands (Cvars), such as time limits, bots, or friendly fire, in the custom.cfg file in the tf/cfg folder. Open the file in the Files tab.

Your server rewrites the tf/cfg/server.cfg file every time it starts. It contains the values from the startup parameters and then runs your custom.cfg. This means:

Important

Don’t edit server.cfg manually; your changes will be lost the next time the server starts. Always put your own settings in custom.cfg. If the file doesn’t exist yet, simply create it in the tf/cfg folder.

Because custom.cfg runs after the lines from the startup parameters, its settings take precedence. The exceptions are the server name, server password, and RCON password: your server sets these values again after running custom.cfg, so they always use the values shown in the panel.

After you save the startup parameters, ZapX will offer to restart the server right away. Changes to custom.cfg also take effect only after a restart.

Startup parameters at a glance

Startup parameterDescription
Server nameYour server’s name in the server list. Default: ZAP Team Fortress 2 Server
Server passwordPassword required to join. Leave blank for an open server.
Max. playersThe number of players who can play on your server at the same time. Default: 24
Starting mapThe map your server starts with, such as ctf_2fort (default), cp_dustbowl, pl_badwater, or koth_viaduct
Steam server token (GSLT)A Steam Game Server Login Token that allows your server to appear in the server list. See Create a GSLT
Info

For map names and the GSLT, your server accepts only letters, numbers, and _, ., /, and -. It removes other characters, such as spaces, when it starts.

Starting map and game mode

Team Fortress 2 doesn’t have a separate setting for the game mode. The mode is determined by the map prefix:

PrefixGame modeExample
ctf_Capture the Flagctf_2fort
cp_Control Points or Attack/Defendcp_dustbowl, cp_granary
pl_Payloadpl_badwater, pl_upward
koth_King of the Hillkoth_viaduct

Enter the map name without a file extension under Starting map, save, and restart your server. Set which maps come after the starting map in the map rotation: this is the mapcycle.txt file in the tf/cfg folder, with one map per line. See Install mods to learn how to add custom maps and Workshop maps.

Tip

Use the changelevel <kartenname> command in the Console tab to switch maps immediately without restarting the server.

More settings in custom.cfg

In custom.cfg, put each server command on its own line and place text in quotation marks. For example:

cfg
mp_timelimit 30
mp_maxrounds 0
mp_winlimit 0
mp_autoteambalance 1
mp_friendlyfire 0
sv_alltalk 0
tf_bot_quota 0

These are the settings most commonly changed:

CommandDescription
mp_timelimitMinutes per map before the rotation switches to the next map. 0 = no time limit
mp_maxroundsRounds per map before the map changes. 0 = no round limit
mp_winlimitA team’s round wins before the map changes. 0 = no limit
mp_autoteambalance1 automatically balances uneven teams between rounds
mp_friendlyfire1 allows damage to teammates
sv_alltalk1 lets all players hear each other in voice chat, including the opposing team
tf_bot_quotaNumber of bots that fill empty slots. 0 = no bots
tf_bot_difficultyBot difficulty: 0 easy, 1 normal, 2 hard, 3 expert
sv_pureChecks players’ game files: 0 off, 1 important files, 2 strict
mp_tournament1 enables tournament mode with a ready-up screen
sv_cheats1 allows cheat commands; useful only for testing
Warning

Don’t set sv_lan to 1. Your server will then be visible only on the local network and won’t be accessible over the internet.

You can also enter many of these commands while the server is running in the Console tab, for example mp_timelimit 20. However, they apply only until the next restart. Put any settings you want to keep in custom.cfg.

RCON, admins, and plugins

ZapX automatically generates the RCON password for your server and sets it every time the server starts. Any rcon_password in custom.cfg will be overwritten afterward. You can also run commands directly in the Console tab without RCON. Learn more about RCON in RCON.

To get in-game admin rights, an admin menu, and additional features, you need SourceMod and Metamod:Source. The extensions and their settings are located in the tf/addons folder:

Migration: your existing server.cfg

If you brought your own server.cfg, for example when migrating or uploading a file, your server won’t simply overwrite it. When the server starts, it renames the file to custom.cfg. If a custom.cfg already exists, your file is renamed to server_legacy.cfg and run before custom.cfg. This way, your settings are preserved.

Conclusion

Your Team Fortress 2 server is now configured just the way you want it. See Connect to the server to learn how to connect. If something isn’t working as expected, our guide to Common issues can help. If you have any other questions, our support team is available every day! 🙂

Free tools

Team Fortress 2 Tools

View all

FAQ

Frequently asked questions

Your Team Fortress 2 server rewrites the tf/cfg/server.cfg file every time it starts. Add your own settings to tf/cfg/custom.cfg instead. It runs after server.cfg and is preserved.
Go to the Configuration tab and open Startup Parameters. Your server sets the server name and password again after custom.cfg runs, so adding them to custom.cfg won’t have any effect.
Team Fortress 2 doesn’t have a separate setting for the game mode. The mode is determined by the map prefix, such as ctf_ for Capture the Flag or pl_ for Payload. Choose the appropriate starting map.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.