theotherdan Jul 5, 2013 @ 11:58pm
SteamCMD Help
I am working with the new SteamCMD format for my Source Servers. I have Garry's Mod up and running as normal. But when I went to load Left 4 Dead 2, I found a left4dead2.exe instead of the normal srcds.exe. Does anyone know have a batch file or command to run the server? I have spent about 2 hours looking for this information and found nothing but how to update. Thanks!
Showing 1-7 of 7 comments
< >
isabella Jul 6, 2013 @ 4:32am 
1./ Download

2./ Unzip to a directory, for example 'C:\hlserver'

3./ Create a file called l4d2_ds.txt in the folder where you install the tool, i.e. 'C:\hlserver'
Edit the file with this text:

@ShutdownOnFailedCommand 1 //set to 0 if updating multiple servers at once
@NoPromptForPassword 1
login anonymous
//for servers which don't need a login
//login anonymous
force_install_dir C:\hlserver\left4dead2
app_update 222860 validate

4./ Create a file called update.bat in the folder where you installed the tool, i.e. 'c:\hlserver'
Edit the file with this text:

steamcmd +runscript l4d2_ds.txt

5./ Run the update.bat to start the download, wait till it finishes. NOTE: You may need to run the file *multiple* times until the message "Success! App '222860' fully installed." displays.

6./ Create a file called server.cfg in 'C:\hlserver\left4dead2\left4dead2\cfg'
Edit the server.cfg with the following (if you already have a server.cfg just use that instead of the text below):

// Start of editable settings

//This is the name for your Left 4 Dead 2 Server
hostname "insertservernamehere"

//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 "changethisnow"

//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 255

// 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.

//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


// End of editable settings

7./ Create a file in 'C:\hlserver\' called l4d2_ds.bat
Edit the file with this text (note you can change the -port and or Internal -ip or +map to what you need / want):

C:\hlserver\left4dead2\srcds.exe -console -game left4dead2 +sv_pure 1 -tickrate 33 -ip -port 27015 + "map"c5m1_waterfront.bsp

8./ Run the file l4d2_ds.bat to start your server.

NOTE: One thing i read is to close your steam client when doing the update via SteamCMD, i think it has to do with the login option when installing the server.
Last edited by isabella; Jul 6, 2013 @ 4:38am
theotherdan Jul 6, 2013 @ 9:49am 
theotherdan Jul 6, 2013 @ 1:19pm 
I cannot thank you enough, but I do have another question...I was able to run the server and I found many folks creating lobbies on the server. But if I try to create a lobby, I end up with "session not availiable" or an error stating that no games are running. Is there any paramters or commands I need to run? I want to have a private server for my friends and I. Thank you !!!
Mile Jul 6, 2013 @ 1:38pm 
cool man
isabella Jul 6, 2013 @ 2:40pm 
1./ Go to: C:\Program Files (x86)\Steam\SteamApps\common\left 4 dead 2\left4dead2\cfg then make a file named autoexec.cfg (using notepade or another text editor, make sure the file is named "autoexec.cfg" not "autoexec.cfg.txt" or it won't work.

In the autoexec.cfg file add the following line: mm_dedicated_force_servers 87.2xx.2xx.7xx5:27015 then save the file. (NOTE: change the IP address and the Port numbers to your own and make sure it is your External IP address not your internal - a.k.a WAN not LAN)

Now start the game, and make a new lobby and make sure you are the lobby leader the above command will force the search for your server IP and port as in the mm_dedicated_force_servers command.

2./ If you don't want a autoexec.cfg you can just do the following:
You enable your console by going to options->keyboad->advanced->enable developers console. Then press the ~ sign on your keyboard.

Execute this command in console BEFORE making a lobby: mm_dedicated_force_servers 87.2xx.2xx.7xx5:27015

Using method 2 above you will have to re enter the mm_dedicated_force_servers each time you load the game, once you exit it won't save the changes in other words. Using Method 1 is a more permanent solution, and would require you to either remove the autoexec.cfg or editing it as needed,

If you dont want to use the autoexec.cfg becaues of using normal servers (but want to use it later and not have to re type the command or IP and Port) then just add // infront of the mm_dedicated_force_servers command and this will comment it out and ignore the command then save it and remove the comment later before loading the game to re enable it.
isabella Jul 6, 2013 @ 2:53pm 
Also the session not available msg you got is because someone else had joined the server or the server got "reserved" for someone elses lobby. I will post up later on how to avoid this - right now i need breakfast.
theotherdan Jul 6, 2013 @ 5:46pm 
Sounds great! I think the main issue is there reserved slot on the server as the rest is working fine...
Showing 1-7 of 7 comments
< >
Per page: 15 30 50
Date Posted: Jul 5, 2013 @ 11:58pm
Posts: 7