AUS/NZ
PC PS XBOX GIRL TV STORE
Login:
? Sign Up!
Powered by AMD
E-Sports Communities & Competitions

L4D2 - Server Admin Guide

Started by ZeeBOB on 9:43am 19/11/09. 46,420 views and 12 posts, 0 users reading, last post by Slyke.

Currently reading (0 users):
OP
Joined: 10/2/09
Posts: 367
Defaults: AU - PC: Left 4 Dead
using Firefox 10.0
Rep:
70%
AU Senior Admin
CyberGamer Server Technician
Hi Guys,

So a lot of you have asked me what the commands are to run your new L4D2 servers.... Here is a quick list of things that will help you.

If you are looking for instructions on how to install the Confogl mod, please refer to the confogl installation and configuration pages. The most up-to-date version of the modified CyberGamer confogl package can always be found in the CyberGamer L4D2 Ladder rules at "#1.5 Confogl Configuration Version".

Starting a game on your own server
Method 1 - As you may have discovered you can not open the console from the lobby screen. Instead, from the Main Menu, open console and type 'mm_dedicated_force_servers xxx.xxx.xxx.xxx:xxxxx'. Then start a lobby in the gametype you choose (scavenge, campaign, versus etc) and when you click start it will create that gametype on the server you specified. **Provided your GSP allows these game types, read below for more info

Method 2 - If you have a Steam group, get the group owner to go into its admin page and get the Steam Group ID#



Then in your server.cfg file on your server add a line 'sv_steamgroup xxxxxx' with the group ID. This way the server will list on the main menu for every member of your group. To start a game you can either

    # Pick the game type from the main menu and select the "Play on Steam Group Server" option, pick a server and that game type will be created on that game server
    # From the main menu, simply connect to the server and using rcon set the map and game mode you want - 'rcon map mapname gamemode'
    gamemode - coop, versus, realism, teamversus, teamscavenge
    NOTE: the 'rcon map' command will drop you from the server but the next time you connect it will be in the right mode
    e.g 'rcon map c1m4_atrium teamscavenge' would create a scavenge mode game on the atrium map (finalle map in Dead Center)
    # If your server is password protected (like most servers from GSP's are) type the 'connect' string into console to connect to the server and again type the 'rcon map' commands to set the map you want - 'connect xxx.xxx.xxx.xxx:xxxxx;password xxxxxxx'

Method 3
In your server.cfg file make a new line with 'sv_search_key xxxxxxx' making xxxxxx someting unique but not hard to remember.
e.g 'sv_search_key zeebobisgod'

From the main menu enter the exact same command with the search key specified and when you start the game from a lobby it will attempt to connect to to any server with the matching search key

Example server.cfg
//Left 4 Dead 2 Server.cfg
//This file goes inside your L4D server "cfg" folder
//Usually: \l4d\left4dead2\cfg\ <-- Place inside this folder

//----> Start of editable settings

//This is the name for your Left 4 Dead 2 Server
hostname "ZeeBOB's L4D2 Server"

sv_search_key "zeebobisgod"
//Gametypes sets the gametypes you want your server to run
//----> Versus Only: sv_gametypes "versus"
//----> Survival Only: sv_gametypes "survival"
//----> Coop Only: sv_gametypes "coop"
//----> Realism Only: sv_gametypes "realism"
//----> Team Versus Only: sv_gametypes "teamversus"
//----> Scavenge Only: sv_gametypes "teamscavenge"
sv_gametypes "coop,versus,realism,teamversus,teamscavenge"

//Rcon password - Sets the password for remote rcon admin
rcon_password "whatever"

//Steam group # to assign to server
sv_steamgroup 12345

//Set to 1 to only allow members of the steam group to make the initial connection to this server
sv_steamgroup_exclusive 1

//Allow connections without creating lobby. Set to 1 to allow lobby connections only
sv_allow_lobby_connect_only 0

//Region - This sets the lobby in which your server will be part of
//You will want to set this to the closest location to your server
//eastcoast - sv_region 0
//westcoast - sv_region 1
//south america - sv_region 2
//europe - sv_region 3
//asia - sv_region 4
//australia - sv_region 5
//middle east - sv_region 6
//africa - sv_region 7
//world - sv_region 255
sv_region 5

// Server Logging
sv_log_onefile 0 //Log server information to only one file.
sv_logbans 1 //Log server bans in the server logs.
sv_logecho 0 //Echo log information to the console.
sv_logfile 1 //Log server information in the log file.
sv_logflush 0 //Flush the log file to disk on each write (slow).
sv_logsdir logs //Folder in the game directory where server logs will be stored.

//Server Rates
sv_maxcmdrate 100 //(If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate.

//Allow use of cheats
//0 = Off
//1 = On
sv_cheats 0

//All talk - Allow both teams to use audio chat to speak with each other
//0 = Off
//1 = On
sv_alltalk 0

heartbeat

//----> End of editable settings


Starting your server in a specific game mode (versus/scavenge/realism)

Like a lot of you I have wanted my servers to start up in versus/scavenge/realism mode automatically and not have the client need to set one up via a lobby... The answer:

- Create a new file called versus.cfg (or whatever you want) and make sure it is in the CFG's folder
- In the new cfg file enter the following: map c1m1_hotel versus

NOTE: you MUST specify a starting map before the +exec in your startup line. EXAMPLE:

./srcds_run -ip xxx.xxx.xxx.xxx -port xxxxx -console -game left4dead2 -secure -sv_unlag 1 -maxclients 12 -sv_pure 1 +map c1m1_hotel +exec versus.cfg

- In your servers startup line add this variable: +exec versus.cfg

REMEMBER: server.cfg will run on EVERY map change automatically and on server startup so there is no point specifying it in the server startup line, only specify the custom cfg with the game mode you want

REMEMBER: DO NOT put this map command in the server.cfg or your server will just constantly restart as it exec's the server.cfg file and changes the map again and again and again

Notes:
Starting modes are:
- coop - Campaign Mode
- versus - Versus Mode
- survival - Survival Mode
- realism - Campaign Mode (Realism Enabled)
- teamscavenge - Scavenge Mode

Scavenge maps are:
- c1m4_atrium
- c2m1_highway
- c3m1_plankcountry
- c4m1_milltown_a
- c4m2_sugarmill_a
- c5m2_park

If you dont want your server to be able to run any other mode be sure to specify the sv_gametypes command in your server.cfg

More to add as I remember/discover it

Edited 3 times, last edited 20/4/10 - 11:27am by philol.
Posted on Thursday, 19th November 2009
  • CG Contributions:
  • PC CSS Admin
  • Additional:
  • CG Server Technician
  • Premium Tag:
  • Game Server God
Joined: 3/8/08
Posts: 1,275
Defaults: AU - PC: Call of Duty
using Chrome 18.0
Rep:
40%
NW, well done
Posted on Thursday, 19th November 2009
exo
Joined: 9/10/08
Posts: 1,429
Defaults: AU - XBOX360: mw3tdm
using Firefox 12.0
Rep:
32%
Thanks heaps, couldn't figure out how to change game mode :]
Posted on Thursday, 19th November 2009
mattzarini. [GIGA] - Who said anything about 1 frag? Your entire demo is sus.
Joined: 29/7/09
Posts: 114
Defaults: AU - PC: Left 4 Dead
using Chrome 16.0
Rep:
41%
Nice post, thanks very much.

Why oh why oh why do Valve have to change everything, couldn't they have just kept it the same from L4D?
Posted on Thursday, 19th November 2009
Joined: 22/8/09
Posts: 115
Defaults: AU - PC: Left 4 Dead
using Firefox 4.0
Rep:
31%
Kinda looks identical to L4D server config cvars =\

I'm sure it'll be useful to some.
Posted on Thursday, 19th November 2009
Joined: 26/2/09
Posts: 2,252
Defaults: AU - PC: Battlefield
using Chrome 16.0
Rep:
42%
If we have the 510 change to our appid will we be able to play with others who have 550? As I have changed it to get gore, but can I play with people who allready have gore?
Posted on Thursday, 19th November 2009
Joined: 12/3/09
Posts: 173
Defaults: AU - PC: League of Legends
using Chrome 18.0
Rep:
61%
GUF LoL Admin
GUF LoL Admin
nice work there zeebob ive been looking for something like this myself.
Thanks a million.

Also to point out about the sv_search_key command can be used on your launch options for l4d2 making it easier so that you dont have to type it in all the time. command for it is +sv_search_key xxxxx

Altho i didnt use the sv_region in mine and it still worked fine so im not sure if its needed still.
But great work otherwise.

Edited once, 20/11/09 - 10:09am.
Posted on Friday, 20th November 2009
OP
Joined: 10/2/09
Posts: 367
Defaults: AU - PC: Left 4 Dead
using Firefox 10.0
Rep:
70%
AU Senior Admin
CyberGamer Server Technician
Added a new section to the bottom of the post with instructions on how to start your L4D2 server in a specific game mode
Posted on Monday, 23rd November 2009
  • CG Contributions:
  • PC CSS Admin
  • Additional:
  • CG Server Technician
  • Premium Tag:
  • Game Server God
Joined: 12/3/09
Posts: 173
Defaults: AU - PC: League of Legends
using Chrome 18.0
Rep:
61%
GUF LoL Admin
GUF LoL Admin
ZeeBOB can i point out that scavenge and teamscavenge are 2 different game types as is versus and teamversus.
you might wana add them into the list.
Posted on Monday, 23rd November 2009
Joined: 25/3/09
Posts: 477
Defaults: AU - PC: Left 4 Dead
using Firefox 4.0
Rep:
37%
MM:S 1.8 Beta has L4D2 support:
www.sourcemm.net/mmsdrop/1.8/

SM 1.3 Beta has L4D2 support:
www.sourcemod.net/snapshots.php

I've got both of these working in L4D2. However, haven't had a chance to test any plugins.
Posted on Tuesday, 24th November 2009
Keeping the menace at bay through population control.
Joined: 16/12/09
Posts: 1
Defaults: AU - PC: Left 4 Dead
using Internet Explorer 8.0
Rep:
23%
I am SO happy I finally found a forum that explains how to setup the specific game modes for L4D2 dedicated servers; thank you so much!
Posted on Wednesday, 16th December 2009
Joined: 3/9/09
Posts: 235
Defaults: AU - PC: Left 4 Dead
using Firefox 3.6
Rep:
32%
When testing to see if MM or SM are working, make sure you use the rcon commands.

Eg:

rcon meta list
rcon sm version

If you don't, they may report back that they are working, when really they are not.

This commonly happens when you have it installed locally, and it's not working on the server.
Posted on Wednesday, 7th July 2010
 

L4D2 - Server Admin Guide