This guide walks you through configuring your Team Fortress 2 dedicated server, including server settings, GSLT tokens, map rotation, custom maps with FastDL, and how to connect.
Configuring server.cfg
The main server configuration file is located at tf/cfg/server.cfg. This file is executed every map change and controls core server behaviour. Edit it via the GPanel file manager or SFTP.
Below is a reference configuration covering the most important settings:
// -----------------------------------------------
// server.cfg — Team Fortress 2 Server Configuration
// -----------------------------------------------
// Server identity
hostname "My TF2 Server" // Name shown in the server browser
sv_password "" // Leave blank for public, set for private
// Players
maxplayers 24 // Maximum player slots (TF2 supports up to 32)
// Game rules
mp_timelimit 30 // Minutes per map before auto-rotation
mp_winlimit 0 // Rounds won before map changes (0 = disabled)
mp_maxrounds 0 // Total rounds before map changes (0 = disabled)
// Purity / anti-cheat
sv_pure 1 // 0 = allow all, 1 = whitelist, 2 = pure (no custom content)
sv_cheats 0 // Always 0 on a public server
// Rate / network
sv_minrate 0
sv_maxrate 0 // 0 = unlimited (recommended for modern connections)
sv_mincmdrate 10
sv_maxcmdrate 66
// GSLT token (Steam Game Server Login Token)
// sv_setsteamaccount YOUR_TOKEN_HERE
// Region (optional, helps matchmaking)
sv_region 255 // 255 = world, 0 = US East, 1 = US West, 3 = Europe
// Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0
server.cfg, restart the server or type exec server.cfg in the server console to reload settings without a full restart.
Key Setting Reference
| Setting | Values | Description |
|---|---|---|
hostname |
Any string | Server name displayed in the browser and scoreboard |
sv_password |
Empty / string | Password to join. Leave blank for a public server |
maxplayers |
1–32 | Maximum concurrent player slots |
mp_timelimit |
Integer (minutes) | Time before the server moves to the next map |
mp_winlimit |
Integer (0 = off) | Wins needed by one team to trigger a map change |
sv_pure |
0 / 1 / 2 | 0 = unrestricted, 1 = whitelist enforced, 2 = fully pure |
Game Server Login Token (GSLT)
A GSLT is required to list your server publicly on the Steam server browser and to avoid being flagged. Without a valid token, your server may still run but will not appear in the official list and could encounter VAC issues.
Generating a GSLT
- Log in to your Steam account at steamcommunity.com/dev/managegameservers.
- Enter App ID 440 (Team Fortress 2) in the App ID field.
- Enter a memo (e.g. "My TF2 Server") and click Create.
- Copy the generated token.
Applying the Token
Open tf/cfg/server.cfg and add (or uncomment) the following line, replacing YOUR_TOKEN_HERE with the token you generated:
sv_setsteamaccount YOUR_TOKEN_HERE
Map Rotation (mapcycle.txt)
The server cycles through maps listed in tf/cfg/mapcycle.txt. Each line contains one map name (without the .bsp extension).
// tf/cfg/mapcycle.txt
// One map name per line. Lines starting with // are comments.
cp_dustbowl
cp_gorge
ctf_2fort
ctf_turbine
pl_badwater
pl_upward
koth_harvest_final
koth_viaduct
arena_well
mvm_coaltown
- The order of maps in this file determines the default rotation order.
- If you use MapChooser Extended or RTV plugins, the mapcycle is used as the nomination pool. See the Admin & Plugin Setup guide for plugin details.
- Run
maps *in the server console to list all currently available maps. - Changes to
mapcycle.txttake effect on the next map change without a server restart.
Installing Custom Maps
Custom maps are distributed as .bsp files. Players need to download the map when they first join a server running it.
Uploading the Map
- Obtain the
.bspfile for the custom map (from tf2maps.net or other community sites). - Upload the file to the
tf/maps/directory on your server via SFTP. - Add the map name (without
.bsp) totf/cfg/mapcycle.txt.
Enabling Fast Download (sv_downloadurl)
Without a fast download URL, players must download maps directly from your game server at low speed, causing long loading times. Setting up a web-accessible mirror lets clients download maps via HTTP instead.
If you have a web host, upload compressed map files (.bsp.bz2) to a public directory and set the following in server.cfg:
sv_downloadurl "https://yourwebsite.com/tf2fastdl/"
sv_allowupload 0
sv_allowdownload 1
tf/maps/custom_map.bsp must be available at https://yourwebsite.com/tf2fastdl/maps/custom_map.bsp.bz2. Compress maps with bzip2 before uploading.
How to Connect
To find your server's IP address and port, see the How to Find Your Server IP and Port guide.
Method 1: In-Game Server Browser
- Launch Team Fortress 2.
- From the main menu, open Find a Game then select Community Servers.
- Click Add a Server and enter your server IP and port in the format
IP:PORT. - Click Add This Address to Favorites, then double-click the server to connect.
Method 2: Developer Console
- Enable the developer console in TF2 settings under Advanced if not already active.
- Press ~ (tilde) to open the console.
- Type the following command and press Enter:
connect YOUR_SERVER_IP:PORT
If your server has a password set, use:
connect YOUR_SERVER_IP:PORT; password yourpassword
Method 3: Steam Connect URL
You can share a direct join link with players using the steam://connect/ protocol:
steam://connect/YOUR_SERVER_IP:PORT
Related Articles
- TF2 Admin & Plugin Setup — SourceMod/MetaMod installation, admin accounts, plugin management
- TF2 Troubleshooting Guide — Common issues with GSLT, SourceMod, VAC, and server visibility
- How to Find Your Server IP and Port
- How to Upload Files via SFTP