TF2 Server Setup Guide

TF2 Server Setup Guide

Team Fortress 2 Logo

Setting up a TF2 Server is very easy as valve has always thought ahead on server settings before releasing again.  You can setup a TF2 server multiple ways but for this guide the windows portion will be using a very easy installation tool created by a community member to setup the server for Windows.  For the linux portion we will be using the standard steamcmd setup.

TF2 Firewall Ports:

UDP: 27015
TCP: 27015
UDP: 27020
UDP: 27005 (Only needed if clients are reporting problems)

Make sure you have a public IP address as always or port forward to your private IP.

TF2 server hardware requirements are very low.  for a 32 man server a single 2.4Ghz processor and 1GB of ram is all that is needed.  If you add many mods and customizations to the TF2 dedicated server you will need more ram.

TF2 Windows Server Setup

Download the program created by vojmar212!1123&authkey=!AKEI_th9vK0FMdw&ithint=file%2c.exe

Choose the newest version as it is updated very often.

Generate a server config file using this tool

Copy the configuration file that you downloaded to the directory where you stored you server from the vojmar212 program.

You can now run your server



64bit Debian based (ubuntu): lib32gcc1 & ia320libs

sudo apt-get install lib32gcc1 ia32-libs

ARCH command: pacman -Syy lib32-gcc-libs

Download and install SteamCMD

Login and download server files using the SteamCMD tool

login anonymous
force_install_dir ./tf2 (or whatever directory you want the files in)
app_update 232250 validate

Start the server with settings you wish.. example”

./tf2_server/srcds_run -steam_dir steamcmd/ -steamcmd_script steamcmd/ -console -game tf +map cp_dustbowl -maxplayers 16

Admin Rcon Commands for when the server is running and needs administration.

changelevel <mapname> – Changes the map.
cvarlist – View complete cvar list.
exec – Execute config file.
map <mapname> – Changes the map and restarts the server.
Starts a new server if entered on the main menu – useful for bypassing the “Create New Server” dialog and map drop-down menu
maps – Display list of maps.
rcon_password <password> – gives player access to rcon commands.
nextlevel <mapname> – Sets the next map to be played.
rcon <command> – Executes an rcon command.
rcon_address <ip address> – Sets the server address to send rcon commands to (if not set, console sends the command to the server that the player is currently in instead)
phys_pushscale <number> – Determines how far player corpses can be “pushed” when killed

Commands players can use

bind <key> <command> – Binds a key to a command.
bind <key> – Replies with the command the key is bound to.
unbind <key> – Unbinds a key.
dropitem – Drop the flag or intelligence.
explode – Commit suicide. (by exploding into gibs)
kill – Commit suicide.
+attack – Mouse 1 auto attack enable. (-attack will disable)
+attack2 – Mouse 2 auto attack enable. (-attack2 will disable)
fov_desired 75-90 – Set desired field of view. (higher values show more of the battlefield at the cost of fps) (can also be changed from advanced video Options)
jointeam red/blue/auto/spectator – Force team. (use this if you are stuck in “dead spectator” mode when too many people attempt to join a team at the same time)
jpeg – Take a jpeg screenshot.
noclip – Allows the players to fly and the server through walls. Sv_cheats must be set to 1.
retry – Retry connection to last server.
status – Display map and connection status.
viewmodel_fov <number> – Sets distance in which your weapons are drawn, higher values show more of the weapon and arms but may show missing parts. (can also be changed from advanced Options)
r_drawviewmodel 0/1 – Turns viewmodels on and off. (can also be changed from advanced Options)
restart – Restarts the current server.
find <command> – A search function that displays all commands with a searched term.
hurtme <number> – Deals a given amount of damage (can be negative for extra health) – sv_cheats 1 only
zoom_sensitivity_ratio <number> – Sets the ratio of sensitivity while zoomed in with the Sniper Rifle with accordance to actual sensitivity.
net_graph <1-4>
Depending on the input value, different amounts of information will be shown such as ping, fps, lerp, packet loss, etc.
thirdperson – Places your view in a camera behind your character – sv_cheats 1 only
thirdperson_mayamode – If active, turning in third person does not move the camera – sv_cheats 1 only
thirdperson_platformer 0/1 – If active, the mouse controls the camera while movement is controlled relative to it.
If thirdperson_mayamode isn’t active, walking towards the camera will ‘push’ your view away.
firstperson – Return to first person perspective.
If thirdperson_platformer is still set to 1, you will not be able to move the camera during taunts.
currency_give <amount> – Gives a specified amount credits in Mann vs. Machine – sv_cheats 1 only
snd_restart – used to reset sound in any game mode. In Mann vs Machine, it can be used if you can hear the sound of a Sentry Buster when there isn’t one spawned. Another use is if the Medi Gun Übercharge 100% crackle sound stays with you after dying, or if a teleporter or ticking Payload cart can be heard when there isn’t one near you.
player_ready_toggle – readies/unreadies the player in Mann vs. Machine
taunt_by_name (name) – Runs a specified taunt, given the exact name of a taunt in the player’s current taunt loadout, without having to open the taunt menu.

This is some example of how you can set your server.cfg file to run your server.  Make changes to it as you want.  copy and paste it into a notepad file and save it as server.cfg and copy the file to your TF2 server directory.


// General Settings //

// Hostname for server.
hostname TF2 Server

// Overrides the max players reported to prospective clients
sv_visiblemaxplayers 24

// Maximum number of rounds to play before server changes maps
mp_maxrounds 5

// Set to lock per-frame time elapse
host_framerate 0

// Set the pause state of the server
setpause 0

// Control where the client gets content from
// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only
sv_pure 0

// Is the server pausable
sv_pausable 0

// Type of server 0=internet 1=lan
sv_lan 0

// Collect CPU usage stats
sv_stats 1


// Execute Banned Users //
exec banned_user.cfg
exec banned_ip.cfg


// Contact & Region //

// Contact email for server sysop

// The region of the world to report this server in.
// -1 is the world, 0 is USA east coast, 1 is USA west coast
// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa
sv_region 0


// Rcon Settings //

// Password for rcon authentication
rcon_password yourpw

// Number of minutes to ban users who fail rcon authentication
sv_rcon_banpenalty 1440

// Max number of times a user can fail rcon authentication before being banned
sv_rcon_maxfailures 5


// Log Settings //

// Enables logging to file, console, and udp < on | off >.
log on

// Log server information to only one file.
sv_log_onefile 0

// Log server information in the log file.
sv_logfile 1

// Log server bans in the server logs.
sv_logbans 1

// Echo log information to the console.
sv_logecho 1


// Rate Settings //

// Frame rate limiter
fps_max 600

// Min bandwidth rate allowed on server, 0 == unlimited
sv_minrate 0

// Max bandwidth rate allowed on server, 0 == unlimited
sv_maxrate 20000

// Minimum updates per second that the server will allow
sv_minupdaterate 10

// Maximum updates per second that the server will allow
sv_maxupdaterate 66


// Download Settings //

// Allow clients to upload customizations files
sv_allowupload 1

// Allow clients to download files
sv_allowdownload 1

// Maximum allowed file size for uploading in MB
net_maxfilesize 15


// Team Balancing //

// Enable team balancing
mp_autoteambalance 1

// Time after the teams become unbalanced to attempt to switch players.
mp_autoteambalance_delay 60

// Time after the teams become unbalanced to print a balance warning
mp_autoteambalance_warning_delay 30

// Teams are unbalanced when one team has this many more players than the other team. (0 disables check)
mp_teams_unbalance_limit 1


// Round and Game Times //

// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers!
mp_enableroundwaittime 1

// Time after round win until round restarts
mp_bonusroundtime 8

// If non-zero, the current round will restart in the specified number of seconds
mp_restartround 0

//Enable sudden death
mp_stalemate_enable 1

// Timelimit (in seconds) of the stalemate round.
mp_stalemate_timelimit 300

// game time per map in minutes
mp_timelimit 35


// Client CVARS //

// Restricts spectator modes for dead players
mp_forcecamera 0

// toggles whether the server allows spectator mode or not
mp_allowspectators 1

// toggles footstep sounds
mp_footsteps 1

// toggles game cheats
sv_cheats 0

// After this many seconds without a message from a client, the client is dropped
sv_timeout 900

// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time?
mp_idlemaxtime 15

// Deals with idle players 1=send to spectator 2=kick
mp_idledealmethod 2

// time (seconds) between decal sprays
decalfrequency 30


// Communications //

// enable voice communications
sv_voiceenable 1

// Players can hear all other players, no team restrictions 0=off 1=on
sv_alltalk 0

// amount of time players can chat after the game is over
mp_chattime 10

// enable party mode
// tf_birthday 1

coming soon

Leave a Reply