TF2 Server Map Rotation: Change Maps & Set Order
In this article
This guide shows you how to manually change maps on a Team Fortress 2 (TF2) dedicated server and how to set up an automatic map rotation. You'll learn the console commands, how to edit the mapcycle file, and how to configure the rotation to suit your community. You'll need access to your server's console (either in-game or via SSH/RDP) and the ability to edit files in the server's tf/cfg directory.
What You'll Need
- Access to your TF2 server console (in-game RCON or a terminal/SSH session).
- File access to your server's
tf/cfgfolder (via FTP or a file manager). - Basic knowledge of text editing (Notepad, nano, vim).
Step-by-Step
- Connect to your server console. If you have physical access, open the console window. If remote, use SSH or RCON (e.g., via HLSW or in-game console with
rcon_password). - Change the map manually. Type
changelevel <mapname>(e.g.,changelevel cp_dustbowl) and press Enter. The server will load the new map immediately, kicking all players briefly. - Set the map rotation list. The rotation is defined in a text file located at
tf/cfg/mapcycle.txt. Open this file with a text editor. - Edit the mapcycle.txt file. Each line should contain exactly one map name, without the file extension (e.g.,
cp_dustbowl, notcp_dustbowl.bsp). Add or remove maps as desired. Save the file. - Enable the mapcycle. The server reads this file when the
mapcyclefilecvar is set. By default, it points tomapcycle.txt. To ensure it's used, set in yourserver.cfgor via console:mapcyclefile mapcycle.txt. - Set the time per map. The rotation advances when the round ends or when the time limit is reached. To control the time, set
mp_timelimit(in minutes) in yourserver.cfg. For example,mp_timelimit 30gives 30 minutes per map. - Force the rotation to start. After editing the mapcycle, you can force the next map by typing
nextlevel <mapname>or simply let the current map end naturally. - Test the rotation. Change to a map, set
mp_timelimit 1temporarily, and wait for the timer to expire. The server should load the next map from the list.
Common Mistakes
- Including file extensions in mapcycle.txt (e.g.,
cp_dustbowl.bsp). The server expects just the map name. - Using the wrong file path – the mapcycle file must be in
tf/cfg/and the cvar must point to it. - Forgetting to set
mp_timelimit– if it's 0, the map will never rotate automatically (only on round end ifmp_winlimitis set). - Editing the file while the server is running – the server may not pick up changes until the next map change or restart.
- Using map names that don't exist – double-check the spelling and that the map is installed on the server.
Tips
- Use
maps *in the console to list all available maps on the server. - For a custom rotation, create a separate file (e.g.,
rotation_custom.txt) and setmapcyclefile rotation_custom.txt. - To skip a map in the rotation, use
nextlevel <mapname>to force the next map. - Set
mp_roundtimefor round-based maps (like attack/defend) to control how long each round lasts. - Consider using
sm_mapif you have SourceMod installed, which provides more flexible map management.
Troubleshooting
Map doesn't change automatically. Check that mp_timelimit is set to a positive value and that the mapcycle file is correctly formatted. Ensure the cvar mapcyclefile points to the right file.
Server crashes when loading a map. The map might be corrupt or missing. Verify the map file exists in tf/maps/ and is not corrupted. Try loading it manually with changelevel.
Rotation order is wrong. The server follows the order in the mapcycle file. If you changed the file, restart the server or force a map change to reload it.
Players get kicked on map change. This is normal; the server reloads the entire map. Use changelevel instead of map to keep the same players.
Frequently Asked Questions
How do I add a map to the rotation?
Add the map name (without .bsp) on a new line in mapcycle.txt. Save the file and either restart the server or change the map to reload the list.
Can I set different time limits for different maps?
No, mp_timelimit is global. You can use SourceMod plugins to set per-map time limits, but not with the vanilla server.
How do I make the rotation skip a map?
Remove it from mapcycle.txt or use nextlevel to force the next map. The server will skip the current map after the next map change.
What is the difference between changelevel and map?
changelevel keeps the current players and their connections; map restarts the server and drops all players. Use changelevel for live changes.
Does the rotation work on dedicated servers only?
Yes, the mapcycle system is designed for dedicated servers. Listen servers (where you play and host) can still use it, but it's less common.
Why does my server ignore the mapcycle file?
Check that the file is named exactly mapcycle.txt (case-sensitive on Linux) and that the cvar mapcyclefile is set to that filename. Also ensure you're editing the correct tf/cfg folder.