Down to the Last Save make that save roll!

6Nov/08186

Left 4 Dead Dedicated Server Setup

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

Posted by A Gaming Moose

Comments (186) Trackbacks (5)
  1. ^ NON STEAM DEDICATED SERVER

  2. so for the server.cfg txt file do we delete all the side notes like //Set’s remote control password or do we keep all those notes

  3. gunot: You can delete them if you want to. They are just there to let people know what that command does.

  4. Ok. Has anyone got the sv_search_key to work? I have the sv_steamgroup working and can see it now at the main menu. But I’m still having issues making a lobby that can connect to it. I tried sv_search_key and it tells me that there is no dedicated server that matches my search criteria. I could very possibly be doing it wrong though. Here is how I have it set up.

    In my server.cfg I added a line like this:
    sv_search_key weeman

    And then I create a lobby and make it public. When it fills up, I enter the consol and type sv_search_key weeman, and then hit start. And every time I do that I searches for a while and comes back with no results and asks me if I want to host it locally.

    Am I missing something, or is sv_search_key just bugged? And if so is there any other way to join or force a lobby to my dedicated server?

  5. @plop and others re: autobalance

    as far as I can tell, this is caused by people who leave their character choice on “random” and do not pick a character. If you have a full game and everyone picks a character there shouldn’t be any floaters, but OTOH, I think when you quick join, it’s always as random character.

  6. Weeman: It works for me. i added -console -sv_search_key enter-your-search-key-here

    There is a nice guide here: http://www.tacticalgamer.com/left-4-dead/130717-tacticalgamer-coms-left-4-dead-server-guide.html

    I had a rather long search key to begin with, but shortned it to 5-6 lowercase letters.

    In my server.cfg i added 3 lines:
    sv_tags
    sv_search_key
    sv_allow_lobby_connect_only 1

    Read somewhere that some server admins had to remove the sv_tags from their server.cfg before it worked, but above configuration works for me and my mates.
    ————————————–

    Monkey: Thanks for the suggestion – i’ll try that in future games.

    /PloP

  7. Somehow my exampel search key was removed :(

    sv_tags cnl4d SOME_SEARCH_KEY
    sv_search_key cnl4d SOME_SEARCH_KEY

  8. I got my sv_search_key to work. The trick is that you can’t have the sv_steamgroup enabled ( from what I could see online) and to keep the search key short and unique. NOTE: Once you put the search key on the servers, they kinda become custom servers. Nobody else can create lobby on them so there is no need to password them

  9. Do u have any idea why i can’t join or host a game online so i can play with my friends?

  10. “If your getting the ‘couldn’t exec server.cfg’ and your certain all the files are in the right place. Just make sure windows isn’t hiding file extensions and naming your server.cfg.txt without showing it :(

    School boy error and yes I feel like a noobling”

    I figured out that windows is naming my file server.cfg.text. How do i prevent windows from doing this. I think this is the reason i keep getting the “couldn’t exec server.cfg” message, but i dont know how to prevent this. I could really use some help and yesi am a huge newb ;_;.

  11. Ryan: All you have to do is go to (in My computer or in any explorer window) Tools–>Folder Options–>View and there will be a checkbox to “Hide known file extensions.

    That should do it!

  12. I completed everything and I can connect to my own server but when i host a lobby and attempt to connect to my server it says server host could not be found or something and host locally? Is there port forwarding involved? if so can i get the exact range and application name?

  13. Hey guys, I ead through every sinle comment in hopes of solving my problem.
    Nope, didnt seem like anyone could solve their problems here.

    I found this thread which helped me solve the problem with you or everyone else not being able to connect.

    Hope it helps you guys.

  14. I followed the steps, but when I want to play lan (sv_lan is 1), the connection fails after 10 retries. Is there anything I missed (port forwarding on the router isn’t necessary if the connection is pc to pc, isnt it?)
    thx very much
    ronny

  15. the error it says is
    WSAEADDRNOTAVAIL about my LOCAL ip, I entered the “online” ip to start the server though….

  16. ronny, have you done the commands:

    sv_allow_lobby_connect_only 0
    net_start

    ?

  17. I saw a question earlier in the thread about machine specs required for this, but I only saw a couple of replies about using what amounts to really powerful machines. What is the minimum spec (CPU/Ram) people have used that has given acceptable results.

  18. Handy but how do you change the logo of your server ?

  19. you can change that in the MOTD.txt ( and there should be something like a banner.txt. You host the image someplace and place a link to it in that txt file.

  20. Heres a picture of my cmd prompt after using the srcd in lfd http://i41.tinypic.com/2u8bf3a.gif, you can zoom in on it by using windows magnafieing icon. All seems ok in the cmd prompt but, the server wont show in the external ip lists of servers in hlws. I can only connect to it localy(lan).

  21. Matt: I think the minimum you would want to use is a P4 at 2.0 GHZ and a gig of ram.

    eycel: Double check that you have the ports forwarded. Also, I saw that you had hamachi running, maybe it is trying to connect through that?

    You can contact me on Twitter: http://twitter.com/brownrob

  22. 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 :)

  23. 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?


Leave a comment

(required)