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.
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.cfgfile in thetf/cfgfolder. 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:
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 parameter | Description |
|---|---|
| Server name | Your server’s name in the server list. Default: ZAP Team Fortress 2 Server |
| Server password | Password required to join. Leave blank for an open server. |
| Max. players | The number of players who can play on your server at the same time. Default: 24 |
| Starting map | The 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 |
For map names and the GSLT, your server accepts only letters, numbers, and _, ., /, and -. It removes other characters, such as spaces, when it starts.
Team Fortress 2 doesn’t have a separate setting for the game mode. The mode is determined by the map prefix:
| Prefix | Game mode | Example |
|---|---|---|
ctf_ | Capture the Flag | ctf_2fort |
cp_ | Control Points or Attack/Defend | cp_dustbowl, cp_granary |
pl_ | Payload | pl_badwater, pl_upward |
koth_ | King of the Hill | koth_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.
Use the changelevel <kartenname> command in the Console tab to switch maps immediately without restarting the server.
In custom.cfg, put each server command on its own line and place text in quotation marks. For example:
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:
| Command | Description |
|---|---|
mp_timelimit | Minutes per map before the rotation switches to the next map. 0 = no time limit |
mp_maxrounds | Rounds per map before the map changes. 0 = no round limit |
mp_winlimit | A team’s round wins before the map changes. 0 = no limit |
mp_autoteambalance | 1 automatically balances uneven teams between rounds |
mp_friendlyfire | 1 allows damage to teammates |
sv_alltalk | 1 lets all players hear each other in voice chat, including the opposing team |
tf_bot_quota | Number of bots that fill empty slots. 0 = no bots |
tf_bot_difficulty | Bot difficulty: 0 easy, 1 normal, 2 hard, 3 expert |
sv_pure | Checks players’ game files: 0 off, 1 important files, 2 strict |
mp_tournament | 1 enables tournament mode with a ready-up screen |
sv_cheats | 1 allows cheat commands; useful only for testing |
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.
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:
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.
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! 🙂