Team Fortress 2 server guide
A Team Fortress 2 server is a Source dedicated server with a small, fixed set of launch settings and one config file. Hostboi writes the name, the join password and the RCON password for you on every boot, so the Startup tab is the place to change those; everything else — SourceMod, maps, extra cvars — is a file you upload.
Change server settings
Section titled “Change server settings”- Open your server in the panel and go to Startup.
- Change the fields you need and save.
- Restart from Console.
| Field | What it does |
|---|---|
| Server Name | The name shown in the server browser. |
| Default Map | The map loaded at start. ctf_2fort by default; cp_dustbowl, pl_badwater and koth_harvest_event are common choices. |
| Max Players | 24 by default. |
| Server Password | Join password. Leave blank for a public server. |
| Admin (RCON) Password | Password for remote console. Each server is created with its own random one; clear it to turn RCON off. |
| Game Server Login Token (GSLT) | Your Valve token, covered below. |
| Client Port | The second port TF2 uses. It has to match an allocation on your server. |
| SourceTV Port | The port for SourceTV spectators and demos. It also has to match an allocation. |
| Auto Update | Updates the server files when the server starts. On by default. |
Server Name, Server Password and Admin (RCON) Password are written into tf/cfg/server.cfg at every
start. Editing those three lines in the file yourself does not survive a restart — change them on Startup. Your
own cvars (friendly fire, respawn times, mp_ settings and so on) can go in the same file below those lines, and
those are left alone.
Add a Game Server Login Token
Section titled “Add a Game Server Login Token”A new server starts without a token: it logs in to Steam anonymously, with a new server ID each time it starts. A Game Server Login Token (GSLT) is free, belongs to your Steam account, and gives the server a fixed identity, so it keeps the same ID across restarts and Valve can tie it to you. Valve asks community servers to use one.
- Sign in at steamcommunity.com/dev/managegameservers and pick Team Fortress 2 from the app list.
- Create the token and copy it. It is 32 characters, letters and numbers.
- Paste it into Game Server Login Token (GSLT) on Startup and restart.
The general walkthrough for these tokens, including what to do if one leaks, is in
Game keys and tokens. Players can always join by address with connect host:port in the developer console, token or not.
Make yourself an admin
Section titled “Make yourself an admin”TF2 has no admin menu built in. You have two options.
RCON — no addons needed.
- Copy Admin (RCON) Password from Startup (each server gets its own random one). If you change it, restart.
- In TF2, enable the developer console, then run
rcon_password <the password>and after thatrcon <command>, for examplercon statusorrcon changelevel cp_dustbowl.
SourceMod — the usual route for a community server. Our setup installs the game only, so you upload the plugin stack yourself:
- Take a backup first, then stop the server.
- Download MetaMod:Source and SourceMod from AlliedModders for Linux. Upload both into
tf/so thattf/addons/metamod/andtf/addons/sourcemod/exist. - Start the server and check Console.
meta versionshould report MetaMod, andsm versionshould report SourceMod. If neither answers, the files are in the wrong folder. - Join the server, type
statusin your own console, and note your Steam ID in theSTEAM_0:1:23456form. - Stop the server, open
tf/addons/sourcemod/configs/admins_simple.iniin Files and add a line such as"STEAM_0:1:23456" "99:z". Thezflag grants every SourceMod command;99is the immunity level. - Start the server, run
sm_reloadadminsin Console, then typesm_adminin your game console. The admin menu should appear.
Never put a Steam password anywhere in this process — SourceMod admin rights are granted by Steam ID, not by login.
Where your files are
Section titled “Where your files are”| Path | What is in it |
|---|---|
tf/cfg/server.cfg |
The main config. Read at startup. |
tf/cfg/ |
Any other .cfg you want to exec from the console. |
tf/maps/ |
Custom maps (.bsp, plus the .nav if the map ships one). |
tf/addons/ |
MetaMod and SourceMod. |
tf/addons/sourcemod/configs/ |
admins_simple.ini and the rest of the SourceMod config. |
Upload custom maps into tf/maps over SFTP and restart. Players download the map from your server
when they join, so a very large map means a slow first connection for everyone.
Change the map
Section titled “Change the map”- Now, for everyone:
changelevel cp_dustbowlin Console, orrcon changelevel cp_dustbowlfrom your game console. - With SourceMod:
sm_map cp_dustbowl, which also works from the admin menu. - Permanently: set Default Map on Startup and restart.
Setting a map that is not in tf/maps fails, and the server keeps the current one.
Useful console commands
Section titled “Useful console commands”From the panel’s Console (or your game console with rcon in front):
status— players, Steam IDs and connection state.changelevel <map>— change map now.kick <name or userid>— disconnect a player.say <text>— print a message in chat as the console.sv_password <password>— set a join password for this session only.meta list— show whether MetaMod plugins loaded.
Common problems
Section titled “Common problems”- The token does not seem to work. TF2 does not print an error for a bad token; it quietly logs in
anonymously instead. After a restart, look in Console for the
gameserver Steam IDline:[A:...]means anonymous (no token, or Steam did not accept it),[G:...]means your token is in use. Check that the token was made for Team Fortress 2 (App ID 440) and pasted without spaces. - SourceMod commands do nothing. MetaMod is missing or was uploaded one folder too deep.
meta versionin Console is the quickest check. - Players cannot connect but the server looks fine. Client Port and SourceTV Port must match ports allocated to your server; if you changed one to a number you do not own, the server starts and then fails to bind.
- Everyone is dropped after a TF2 update. Clients are on the new build and the server is not. Restart with Auto Update on and watch Console for the update finishing.
- Password set but nobody is asked for it. The value was edited into
server.cfgwhile the server was running. Set it on Startup and restart instead.
