Windows dedicated server

From TF2 Wiki

Share/Save/Bookmark(Redirected from Windows Dedicated Server)
Jump to: navigation, search

This is a setup guide that allows you to install a basic TF2 server. In the below example the server is installed onto the C drive in a folder called 'hlserver'.


Download and install the HLDS Update Tool

  • Download HldsUpdateTool.exe and run it to install the updater tool.
  • Choose where to install it to, for example 'c:\hlserver'. Make sure that the install path is different from the directory where HldsUpdateTool.exe has been downloaded to, otherwise it gives the error that another HldsUpdateTool.exe installer is in use.

Create an updating batch file

  • Create a file called update.bat in the folder where you installed the tool, i.e. 'c:\hlserver'
  • Edit the file with this text:
HldsUpdateTool.exe -command update -game tf -dir "c:\hlserver" -verify_all -retry

Start the download/update

  • Run the update.bat to start the download, may take several hours as dedicated server content is currently 2.6GB
  • You may need to run the file *multiple* times until the message "HLDS installation up to date" displays.

Create/update server files

  • Create a file called server.cfg in 'C:\hlserver\orangebox\tf\cfg'
  • Edit the file with these details
hostname "Your_Servers_Name"
rcon_password "Your_Rcon_Password"
sv_contact ""
mp_timelimit "30" 
sv_alltalk 0
sv_lan 0  
sv_rcon_maxfailures 5
sv_rcon_banpenalty 1440
exec banned_user.cfg
exec banned_ip.cfg
log on
sv_log_onefile 0
sv_logfile 1
sv_logbans 1
sv_logecho 1
sv_allowdownload 1
sv_allowupload 1
mp_autoteambalance 1 
mp_teams_unbalance_limit 1
mp_allowspectators 1
  • edit the files motd.txt, maplist.txt and mapcycle.txt all found in the 'C:\hlserver\orangebox\tf' folder
  • maplist.txt is the list of maps your server will cycle through. You can still manually change the map to the desired map even if its not in the mapcycle.txt
  • maplist.txt is the list of maps what will show up on your motd page inside the server.

Create a batch file to run the server

  • Create a file in 'C:\hlserver\' called tf.bat
  • Edit the file with this text:
orangebox\srcds.exe -console -game tf +map ctf_2fort +maxplayers 24
  • Run the file tf.bat to start your server

Optionally you can create a command file to auto-launch your server if it fails or crashes

  • open notepad
  • Create a file called start_tf.cmd
  • add this to the file and save
@echo off
echo Protecting srcds from crashes...
title TeamFortress watchdog
echo (%date%) (%time%) srcds started.
start /wait C:\hlserver\orangebox\srcds.exe -console -game "tf" +ip -port 27015 +map MAPNAMEHERE +maxplayers 24 +exec server.cfg
echo (%date%) (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds
  • Run the file and when or if your server crashes it will auto-launch its self.


Further reading

Adding sourcemod and meta mod

useful admin tools include sourcemod and metamod, visit these webpages for more information

See also

Linux dedicated server

Dedicated server configuration

Personal tools