DJive
03-26-2008, 12:31 AM
How to run a local server, TF2 - DJive
A few people asked tonight how to host a quick server on your personal PC.
STEP 1: Locate your Server.cfg here.
C:\Program Files\Steam\SteamApps\*name*\team fortress 2\tf\cfg\server.cfg
This is my server.cfg I use for doing map tests. Each line is pretty self explanatory. Feel free to change any of the settings you seem if. all my time limits are set HIGH. the reason is for testing a map nothing is more frustrating then it ending a round and changing to 2fort :p
STEP 2: Copy and paste everything BELOW PHP Code: into a server.cfg txt file. and save to the location mentioned above, or download my server.cfg at bottom.
// this is your server name as shown in the server list
hostname "TF2Maps.net Local Host"
sv_password ""
// your server password. a pair of double quotes means it is not set and anyone can join
// start rcon settings
rcon_password ""
// your rcon password to log into the dev rcon console or HLSW rcon console
sv_rcon_banpenalty 5
// Number of minutes to ban users who fail rcon authentication
sv_rcon_maxfailures 10
// Max number of times a user can fail rcon authentication before being banned
// end rcon settings
// start cvars for balancing un-even teams
mp_autoteambalance 0
// 0 is off and 1 is on. if 1 then should be used in conjunction with the following 3 commands
mp_autoteambalance_delay 60
// Time (in seconds) after the teams become unbalanced to attempt to switch players
mp_autoteambalance_warning_delay 30
// Time (in seconds) after the teams become unbalanced to print a balance warning
mp_teams_unbalance_limit 2
// Teams are unbalanced when one team has this many more players than the other (0 disables)
// end cvars for balancing un-even teams
// start cvars for round and game times
mp_enableroundwaittime 1
// Enable or disable timers to wait between rounds. 0 is off 1 is on
mp_bonusroundtime 20
// Time after round win until round restarts (in seconds)
mp_restartround 20
// Time the current round will restart (in seconds)
mp_stalemate_timelimit 120
// Timelimit (in seconds) of the stalemate round
mp_timelimit 30
// game time per map in minutes
mp_respawnwavetime 1
//
// end cvars for round and game times
// start cvars for win conditions
mp_maxrounds 40
// Max number of rounds to play before server changes maps
mp_winlimit 30
// Max number of rounds one team can win before a server changes maps
// end cvars for win conditions
// start client specific cvars
mp_forcecamera 0
// force dead clients to first person mode disabling freelook. 0 is off 1 is on
mp_allowspectators 1
// enable or disable spectators on the server. 0 is off 1 is on
mp_friendlyfire 0
// 0 is off and clients can do harm to team mates. 1 is on and players can kill or injure team mates
mp_footsteps 1
// footsteps on or off. 0 is off and 1 is on
sv_cheats 1
// allow cheats to be used by the client. 0 is off 1 is on
sv_timeout 300
// the amount of time in seconds that a client is booted for no input
sv_maxspeed 320
// the maximun speed a client can move at
sv_consistency 1
// Force clients to pass a consistency check for critical files before joining server. 0 is off 1 is on
decalfrequency 10
// the pause in seconds between a decal being sprayed
// end client specific cvars
// start cvars for communication
sv_voiceenable 1
// allow players to use a microphone. 0 is off 1 is on
sv_alltalk 1
// toggles whether both teams can hear each others voice comms or not. 0 is off 1 is on. recommend it being off
mp_chattime 10
// players can chat for this amount of time (in seconds) after a game is over
// end cvars for communication
// start download cvars
sv_allowupload 1
// allow custom decals to be uploaded. 0 is off 1 is on
sv_allowdownload 0
// allow files to be downloaded from the server. 0 is off 1 is on
net_maxfilesize 15
// Max download file size. Default is 15
sv_downloadurl "http://www.your_site_here.com"
//redirect download location
// end download cvars
// start bandwidth rates/settings
sv_minrate 20000
sv_maxrate 30000
decalfrequency 10
sv_maxupdaterate 100
sv_minupdaterate 66
sv_mincmdrate 66
sv_maxcmdrate 100
// end bandwidth rates/settings
// start server logging
log off
// enable or disable server logging. on is on off is off
sv_logbans 0
// Log server bans in the server logs
sv_logecho 1
// Echo log information to the console. 0 is off 1 is on
sv_logfile 0
// Log server information in the log file. 0 is off 1 is on
sv_log_onefile 0
// log everything in one file
// end server logging
// start cvars for general operation
sv_lan 0
// is this an internet or LAN server. 0 is internet 1 is LAN
sv_region 0
// server location. -1 is the world, 0 is USA east coast, 1 is USA west coast, 3 europesv_contact blah@blah.com
// contact email for sysop
sv_pausable 0
// enables or disables whether the server can be paused. 0 is off 1 is on
sv_pure 1
// forces all clients on the server to use content that matches what is on the server. 0 is off 1 is on
sv_pure_kick_clients 1
// kicks clients that do not have content that matches what is on the server
// end cvars for general operation
// start execute ban files
exec banned_user.cfg
exec banned_ip.cfg
Awsome. Now. To change your server name look to the first line and change the RED text to a name you choose.
// this is your server name as shown in the server list
hostname "TF2Maps.net Local Host"
Also pay attention to these.
// start download cvars
sv_allowupload 1
// allow custom decals to be uploaded. 0 is off 1 is on
sv_allowdownload 0
// allow files to be downloaded from the server. 0 is off 1 is on
net_maxfilesize 15
// Max download file size. Default is 15
sv_downloadurl "http://your_map_hosting_site.com"
//redirect download location
IF you have a fast download server hosting your file, place the web address here. IF you do not have a fast web map hosting site, change the "0" into a "1" to allow people to download from your server.
Note: http://tf2maps.net offer fast map hosting with a donation.
STEP 3: After you save your server.cfg to "C:\Program Files\Steam\SteamApps\*name*\team fortress 2\tf\cfg" folder start up Team Fortress 2.
Step 4: Bring down console using "~" Key and type ""exec server.cfg""
Step 5: Type in ""map mymapname"" to start your map and server.
Step 6: Now all you need is your IP, which you can grab from here. http://tools.whois.net/yourip/ and add your port onto it. For Example US based mine is 27015 sooo... 12.345.6.78:27015 should be the IP i tell people to connect to.
Step 7: Have fun with the friends.
---
Now this does not cover port forwarding which if you have a router, you will need to do.
A few people asked tonight how to host a quick server on your personal PC.
STEP 1: Locate your Server.cfg here.
C:\Program Files\Steam\SteamApps\*name*\team fortress 2\tf\cfg\server.cfg
This is my server.cfg I use for doing map tests. Each line is pretty self explanatory. Feel free to change any of the settings you seem if. all my time limits are set HIGH. the reason is for testing a map nothing is more frustrating then it ending a round and changing to 2fort :p
STEP 2: Copy and paste everything BELOW PHP Code: into a server.cfg txt file. and save to the location mentioned above, or download my server.cfg at bottom.
// this is your server name as shown in the server list
hostname "TF2Maps.net Local Host"
sv_password ""
// your server password. a pair of double quotes means it is not set and anyone can join
// start rcon settings
rcon_password ""
// your rcon password to log into the dev rcon console or HLSW rcon console
sv_rcon_banpenalty 5
// Number of minutes to ban users who fail rcon authentication
sv_rcon_maxfailures 10
// Max number of times a user can fail rcon authentication before being banned
// end rcon settings
// start cvars for balancing un-even teams
mp_autoteambalance 0
// 0 is off and 1 is on. if 1 then should be used in conjunction with the following 3 commands
mp_autoteambalance_delay 60
// Time (in seconds) after the teams become unbalanced to attempt to switch players
mp_autoteambalance_warning_delay 30
// Time (in seconds) after the teams become unbalanced to print a balance warning
mp_teams_unbalance_limit 2
// Teams are unbalanced when one team has this many more players than the other (0 disables)
// end cvars for balancing un-even teams
// start cvars for round and game times
mp_enableroundwaittime 1
// Enable or disable timers to wait between rounds. 0 is off 1 is on
mp_bonusroundtime 20
// Time after round win until round restarts (in seconds)
mp_restartround 20
// Time the current round will restart (in seconds)
mp_stalemate_timelimit 120
// Timelimit (in seconds) of the stalemate round
mp_timelimit 30
// game time per map in minutes
mp_respawnwavetime 1
//
// end cvars for round and game times
// start cvars for win conditions
mp_maxrounds 40
// Max number of rounds to play before server changes maps
mp_winlimit 30
// Max number of rounds one team can win before a server changes maps
// end cvars for win conditions
// start client specific cvars
mp_forcecamera 0
// force dead clients to first person mode disabling freelook. 0 is off 1 is on
mp_allowspectators 1
// enable or disable spectators on the server. 0 is off 1 is on
mp_friendlyfire 0
// 0 is off and clients can do harm to team mates. 1 is on and players can kill or injure team mates
mp_footsteps 1
// footsteps on or off. 0 is off and 1 is on
sv_cheats 1
// allow cheats to be used by the client. 0 is off 1 is on
sv_timeout 300
// the amount of time in seconds that a client is booted for no input
sv_maxspeed 320
// the maximun speed a client can move at
sv_consistency 1
// Force clients to pass a consistency check for critical files before joining server. 0 is off 1 is on
decalfrequency 10
// the pause in seconds between a decal being sprayed
// end client specific cvars
// start cvars for communication
sv_voiceenable 1
// allow players to use a microphone. 0 is off 1 is on
sv_alltalk 1
// toggles whether both teams can hear each others voice comms or not. 0 is off 1 is on. recommend it being off
mp_chattime 10
// players can chat for this amount of time (in seconds) after a game is over
// end cvars for communication
// start download cvars
sv_allowupload 1
// allow custom decals to be uploaded. 0 is off 1 is on
sv_allowdownload 0
// allow files to be downloaded from the server. 0 is off 1 is on
net_maxfilesize 15
// Max download file size. Default is 15
sv_downloadurl "http://www.your_site_here.com"
//redirect download location
// end download cvars
// start bandwidth rates/settings
sv_minrate 20000
sv_maxrate 30000
decalfrequency 10
sv_maxupdaterate 100
sv_minupdaterate 66
sv_mincmdrate 66
sv_maxcmdrate 100
// end bandwidth rates/settings
// start server logging
log off
// enable or disable server logging. on is on off is off
sv_logbans 0
// Log server bans in the server logs
sv_logecho 1
// Echo log information to the console. 0 is off 1 is on
sv_logfile 0
// Log server information in the log file. 0 is off 1 is on
sv_log_onefile 0
// log everything in one file
// end server logging
// start cvars for general operation
sv_lan 0
// is this an internet or LAN server. 0 is internet 1 is LAN
sv_region 0
// server location. -1 is the world, 0 is USA east coast, 1 is USA west coast, 3 europesv_contact blah@blah.com
// contact email for sysop
sv_pausable 0
// enables or disables whether the server can be paused. 0 is off 1 is on
sv_pure 1
// forces all clients on the server to use content that matches what is on the server. 0 is off 1 is on
sv_pure_kick_clients 1
// kicks clients that do not have content that matches what is on the server
// end cvars for general operation
// start execute ban files
exec banned_user.cfg
exec banned_ip.cfg
Awsome. Now. To change your server name look to the first line and change the RED text to a name you choose.
// this is your server name as shown in the server list
hostname "TF2Maps.net Local Host"
Also pay attention to these.
// start download cvars
sv_allowupload 1
// allow custom decals to be uploaded. 0 is off 1 is on
sv_allowdownload 0
// allow files to be downloaded from the server. 0 is off 1 is on
net_maxfilesize 15
// Max download file size. Default is 15
sv_downloadurl "http://your_map_hosting_site.com"
//redirect download location
IF you have a fast download server hosting your file, place the web address here. IF you do not have a fast web map hosting site, change the "0" into a "1" to allow people to download from your server.
Note: http://tf2maps.net offer fast map hosting with a donation.
STEP 3: After you save your server.cfg to "C:\Program Files\Steam\SteamApps\*name*\team fortress 2\tf\cfg" folder start up Team Fortress 2.
Step 4: Bring down console using "~" Key and type ""exec server.cfg""
Step 5: Type in ""map mymapname"" to start your map and server.
Step 6: Now all you need is your IP, which you can grab from here. http://tools.whois.net/yourip/ and add your port onto it. For Example US based mine is 27015 sooo... 12.345.6.78:27015 should be the IP i tell people to connect to.
Step 7: Have fun with the friends.
---
Now this does not cover port forwarding which if you have a router, you will need to do.