Down to the Last Save

make that save roll!

Skip to: Content | Sidebar | Footer

Contact me on Twitter

Left 4 Dead Dedicated Server Setup

6 November, 2008 (19:51) | Console Games, PC Games | By: A Gaming Moose

Big Edit: I updated this post to reflect the upcoming changes for the retail release on the 18th.

So the Left 4 Dead early access demo for the PC and 360 went live today and I figured I should grab it and setup a Left 4 Dead dedicated server. Getting the files was easy, but setting up ( and getting my L4D dedicated server up wasn’t).

I did a lot of searching for how to setup a Left 4 Dead dedicated server and found next to nothing for resources. Thankfully, my prior experience with setting up Source dedicated server helped a little. I figure I will share my steps for setting up a Windows Left 4 Dead dedicated server so maybe it will save somebody else some time.


First off I am using a Windows host, so if you are using linux you will have to change your steps accordingly.

If you are starting from scratch, you will have to grab the hldsupdatetool and install that. Then either by making a batch file, or by using the command line, use this to grab the files for your Left 4 Dead Dedicated server. I will depend on where you installed the hldsupdate tool and where you want to put the files. For me it looks like this:

C:HLServerhldsupdatetool -command update -game l4d_full -dir C:HLServer

This will hit Valves server and grab all the files you need for your Left 4 Dead Dedicated server; this is also how you keep your dedicated server up to date. This is the easy part.

Now what you should do is head to HLServerl4dleft4dead and make two text files named mapcycle.txt and maplist.txt. Then put l4d_hospital01_apartment and l4d_dem_hospital02_subway in both. This will allow your server to switch between the two demo mapsEdit: the maps are all in there now. Now all of the maps should be in there allready.

Next head to HLServerl4dleft4deadcfg and make a text file named server.cfg and put this in as a minimum:

hostname Server Name Here
// Rcon Cvars
rcon_password “your recon password” //Set’s remote control password
// Server Cvars
mp_disable_autokick 1 //Prevents a userid from being auto-kicked
sv_allow_color_correction 0 //Allow or disallow clients to use color correction on this server.
sv_allow_wait_command 0 //Allow or disallow the wait command on clients connected to this server.
sv_alltalk 0 //Players can hear all other players, no team restrictions
sv_alternateticks 0 //If set, server only simulates entities on even numbered ticks.
sv_clearhinthistory 0 //Clear memory of server side hints displayed to the player.
sv_consistency 1 //Whether the server enforces file consistency for critical files
sv_contact “your_admin@whatever.com” //Contact email for server sysop
sv_downloadurl “” //Location from which clients can download missing files

// Lan or internet play, Server region cvars
//sv_lan 0 //Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )
sv_region 255 // Region Codes: 0 – US East coast, 1 – US West coast, 2 – South America, 3 – Europe, 4 – Asia, 5 – Australia, 6 – Middle East, 7 – Africa, 255 – world

// 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.
sv_unlag 1
sv_maxunlag .5
sv_steamgroup //this is your group’s steam group id.. allows members to join from main menu add
//sv_steamgroup_exclusive 1 //to make it exclusive and private
z_difficulty “Impossible” “//this is the difficulty setting

You could probably put more cvars and whatnot in there, but for now this will give you a basic setup that will get you going. Edit: I added the last cvar to make it so anybody can join from the server broswer. I found a list of Left 4 Dead server commands and cvars; It weighs in at a whopping 21 pages. From what I have seen, you could use a Team Fortress 2 config generator, but I am not sure what will work and what wont.

The last step for getting your Left 4 Dead Dedicated server up is to start it,by the command line, a batch file or making a shortcut to the srcds.exe in your left4dead directory. I did it the last way and added this to the end of the Target parameter:

-console -game left4dead +ip “your ip address” +hostport 27015 +map l4d_hospital01_apartment.bsp

All you have to change is the ip address (take out the “” characters) and your Left 4 Dead dedicated server will be up and running in no time. By having the -console in there, it will bring up a console of the server when you double click on the shortcut, making for easy administration. The +map will start your server with the specified map. If you don’t have it, your server won’t work properly. If you want to setup your server for VS, put in a VS map in there ( like l4d_vs_farm01_hilltop.bsp)

If you have any questions, leave a comment or post in this thread in my forums.and I will help you get your Left 4 Dead dedicated server up as best I can.

Also, don’t forget to check out Left 4 Dead 411, they have all the info you need ( like how to open the server browser in Left 4 Dead) and if you want to directly connect to my server you can use tf2.last-save.com as the host name

Video Game Rentals Delivered. Start for only $8.95.

Edit: For Exclusive Versus. Campaign or Survival modes for your Left 4 Dead Dedicated server all you have to do is set the mp_gamemode [coop,versus,survival] is your dedicated server config.

Edit Again: DOA wrote up a very useful guide on setting up a Left 4 Dead dedicated server on Ubuntu

4-21-09
Since the new survial DLC came out, this is how you connect to your own server from the lobby

  • As the lobby leader, bring up the console
  • type “ms_force_dedicated_server ” (enter your own IP and port for your server)
  • Start the game and it will automatically join your own server! It’s that easy!

If you need to contact me for help, you can follow me on Twitter

Here are some related posts

189 Replies to "Left 4 Dead Dedicated Server Setup"

  1. Mandrake says:

    I’ve been trying to run a dedicated server for a day or so, on an old Athlon XP 2800+ with 4 gigs of ram, and it’s barely reaching 40% cpu-load with three players and constant hordes / panic events / special mob spawns by whoever is feeling like playing the director… Oh,and around 100ms ping-times, on a 2M/512k ADSL-line :)

  2. LetGo says:

    my server is running fine. But when i joined the game i hosted. i have this error:

    (From my console)
    Bad sequence (-1 out of 56 max) in GetSequenceLinearMotion() for model ‘infected/smoker.mdl’!

    It seem to keep reloading and make me go back to the same place every few seconds. Any advise?

  3. eycel says:

    thanks for the responce a gaming mose, iv doubled check my ports and they look ok to me, heres a pic of them http://i40.tinypic.com/2ypivlz.gif. As for hamachi thats an alternative to use it over lan , but i want a server that will show up public from my isp.

  4. raymond says:

    so i setted up the server, but for some reason it can’t be played by anyone else cept me. How do i make it public?

  5. raymond says:

    oh and just to tell you guys, i dont know much about computers

  6. raymond: Did you forward the ports needed for the L4D dedicated server?

  7. bigmidgeman says:

    I have the server window running but I’m not sure how to do the last step. When I enter in “-console -game left4dead +ip 192.168.1.101 +hostport 27015 +map l4d_hospital01_apartment.bsp” into the srcds shortcut target I created I get an error message that says ‘-console’ specified in the target box is not valid. Make sure the path and file name are correct.

  8. kiwi says:

    hey tehre. i tried for hours to get my dedicated server up and running, but as the console window comes up I see that it does not recognize single command.

    Please halp! D:

  9. bigmidgeman: You have to put that info in the shortcut to start the L4d Server. Right Click–> Properties–>Target. It goes at the end of of everything in the target box.

    Kiwi: Can you get me a screencap of your console window for me? Thanks

  10. kiwi says:

    gah. Tried using IMG html to show it..
    Here’s a link to the pict@r..

    http://img.photobucket.com/albums/v440/keikunmanga/screencap.jpg

  11. kiwi says:

    gah. sorry! The previous one was when I used another server.cfgsetup. This is the one that you have issued.

    http://img.photobucket.com/albums/v440/keikunmanga/Screencap3.jpg

  12. kiwi says:

    here’s another screencap which is the one that’s closest to being complete I think.

    http://img.photobucket.com/albums/v440/keikunmanga/screencap4.jpg

  13. kiwi: that should all be in your server.cfg file. if you have the shortcut or batch file setup right, it should automatically use your server.cfg

  14. haffey says:

    I keep getting a bunch of error messages. I have no idea what I’m doing wrong. I tried using both ports 27015 and 27016 but I can’t connect. Ports are forwarded correctly.

    Here’s a link to the PrtScrn of my cmd: http://i43.tinypic.com/21agtv7.jpg

  15. chuck says:

    hey im getting a reservation cookie error and it kicks me out of the lobby

  16. haffey: It looks like it is having an issue actually binding that port to the IP. Usually that means that the port is currently in use. Are you running this on your own machine that you play l4d on, or is it on a separate server? Try a really odd port, like 29000 to see if it is a port reservation issue.

    Chuck: is that from within L4D when you try to connect?

  17. haffey says:

    It’s a different computer, but they both are on the same home network and both have the same external IP. I’ll try it with another port.

  18. haffey says:

    I switched it to port 29000 and forwarded that too. I still get the same “socket bind failed ” error.

  19. haffey says:

    Oh, I just changed it to my local IP address and it seems to have worked. I’ll have to see if I can join when I get home though.

  20. Kyle Bentley says:

    Thanks for the tutorial! I’m having a rather odd problem. The setup goes fine, my friends and I are able to play on the server. After a given amount of time (1-2 hours) the server will freeze and drop all the players. In the event log is this:

    Faulting application srcds.exe, version 0.0.0.0, faulting module steamclient.dll, version 0.0.0.0, fault address 0×000185eb.

    It is the same memory address every time. Any suggestions?

  21. haffey: you still having problems?

    Bentley: I would try adding a -verify_all to your update script and see if it re-downloads anything. Sounds like your srcds.exe is corrupt or something.

  22. ICER says:

    “Comment from A Gaming Moose
    Time December 22, 2008 at 9:37 am

    ALi: I know you solved it, but for everybody else out there. You can try deleting a file called clientregistry.blob. That way you can reconnect and re-try to d/l the files needed.”

    This does not work. You have to make a folder in C:\ like Ali said.

  23. Heresy_Fnord says:

    My problem is getting the game “forced” to vs. I’ve tried things listed about. I want my server to be a VS only server. Every time it loads it says “L4D – Co-op – Normal” and when I check it online, it lists 0/4 players instead of 8. So it’s just running a normal campaign mode. What am I missing?

  24. Heresy_Fnord With the recent update you can force it via the mp_gamemode command in the config file. Although it doesn’t matter how it starts up, any lobby can set it to any of the game modes. If you use the ms_force_dedicated command via console you can join with your lobby no problem.

Write a comment





< " />

Bad Behavior has blocked 376 access attempts in the last 7 days.