How to Set Up A Left 4 Dead Dedicated Server

30 Apr

[Update] OK new update, I have now setup a L4D2 server and can confirm 99% of this guide is still fine, you may want to grab a new version of the autoexec file from the community page (linked in full post) but really that’s about it.

[Update] Most of this stuff is still relevant for Left 4 Dead 2 servers, almost everything in the cfg and autoexec files is the same but I have not done a L4D2 server yet so I cannot offer support, sorry.

Hey Everyone,

This post goes out to everyone out there trying the bloody hardest to find a nice guide to setting up a dedicated server, you’re probably struggling (unless of course this gets popular and you’ve been sent here by Google) but either way getting everything running smoothly on a new L4D dedicated server isn’t exactly the easiest thing in the whole wide world.

I’m pretty techie, I work with computers, the net and servers 5 days a week and I know my way around them, I’m not the pinnacle of knowledge in any respect but I can do shit you know?

When it comes to setting up a dedicated Left 4 Dead server boy was I wrong.

It’s gonna be easy for you though! That’s right I brought all my failings together and made sure you don’t have to make the same mistakes. Behold, the super easier to follow, step-by-step guide to setting up your own dedicated Left for Dead Server.

Before you start download these files, use right click>save target;

The password for the file is “guardianforce”.

download zip How to Set Up A Left 4 Dead Dedicated Server download rar How to Set Up A Left 4 Dead Dedicated Server

Step 1: Get a Server

Rental: Get a server ready to run, I recommend renting because electricity bills alone from running the server will be high and you can get a decent one for between £5-10 a month, that’s nothing. I am not gonna shoehorn a bunch of affiliate links here because I want this guide to have authority but I used a company called GTXGaming who are cheap, friendly and offered me support where they could. Decide for yourself but I do recommend them and can verify they are not some crazy Nigerian scam artists.

Owned: If you install it yourself on a machine you can do this through Steam, no problems here its in the “Tools” tab on your Steam Application. It needs to be moderate spec but your internet connection needs to be able to cope.

Step 2: Setting up the Server

Setting up the Server is pretty easy actually. It all comes down to what you want to do with it. The biggest decision you are needing to make here is Public vs. Private. The difference? Password protection.

In my opinion you should always leave a server public, why? Because the its my server and if I don’t play no-one can attitude is spiteful, you can always kick people when you specifically want to play but you can’t play on it 24/7 and it could be helping someone else out.

Obviously this is your own choice but password protection does sometimes stick an oar in things.

Get the server.cfg file out of the zip or copy the text below and put it in notepad, DreamWeaver or whatever floats your boat. Pretty short right? I will only say this once.

Your config file does not need 10000 lines.

///Server.cfg

hostname “xXx edit me xXx”

//Rcon Settings
rcon_password “xXx edit me xXx”

//Lobby Settings
sv_search_key “xXx edit me xXx”
sv_steamgroup “xXx edit me xXx” // Family Steam Group Number

//Log Settings
sv_logbans 1
sv_logecho 0
//log on

//Difficulty Settings
z_difficulty “Advanced”

//Other Settings
sv_allow_wait_command 0
sv_region 255
sv_clearhinthistory

exec banned_user.cfg
exec banned_ip.cfg

This is pretty much all you need, you just need to edit the parts that have “xXx edit me xXx” in them. Here is what each one does;

  • Hostname: This is the name of your server, for example mine could be “Guardian Force Server”
  • rcon_password: This lets you log in as an admin from the in game console and kick players and the like.
  • sv_search_key: This needs to be a fairly short phrase that is going to be unique to your server, I recommend combining letters and numbers, for example “gfukserver2009″
  • sv_steamgroup: Tags the server to your Group so members can jump straight in, this one is optional place “//” at the start of the line to disable it. Your Steam Group ID can be retrieved by the Group Admin in Community>Group Admin Page>Profile from the Steam application.
  • sv_region: Optional, sets the location for the server, possible values are;
    • America eastcoast – sv_region 0
    • America 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
  • You can also change z_difficulty if you like but its just a default setting and can easily be changed with a vote in game.

That’s it. Save the file and upload it to the root/cfg/ folder via FTP or if your host has a visual editor (like GTX does) then just copy and paste that stuff in there.

For your info “//” comments things out in these files, just like # in htaccess or <!– –> in HTML.

Restart you server with your admin panel if rented or manually if you actually own it.

Step 3: Setting up Your Game

Sadly this is the step so many guides out there are missing out and it’s probably the most vital because without it nothing will bloody work.

OK so your server is running, if you attached your steam ID you will see it pop up in the corner like this while playing

left4dead server id How to Set Up A Left 4 Dead Dedicated Server

Anyway, you can click this to join it and play but it won’t let you actually create a lobby or choose what gametypes and maps you want to play (or even what character you are!)

For that we need to do some extra stuff. First thing first, turn on the console if you don’t already have it on, its in Options>Keyboard Options and on a UK keyboard the ¬ key brings it up, that’s the one under Escape.

The console allows you to “do stuff” in the game, this can range from kicking a player to changing difficulty and maps.

It’s pretty easy to use and a full list of commands can be found here or in the PDF (l4d_cvar_list) I included in the ZIP download at the start. The guys at Left4Dead411.com put this together so credit to them for doing so, it’s a little hard to read to be honest but if you’re looking to do something specific just search this PDF.

OK quit Left 4 Dead and Steam an go to the following drive on your PC;

  • C:Program Files (x86)Steamsteamappscommonleft 4 deadleft4deadcfg (for 64 bit computers)
  • C:Program FilesSteamsteamappscommonleft 4 deadleft4deadcfg (for 32 bit ones)

This will bring you into your L4D configuration files, be careful what shit you touch in here, listen to whats need and don’t touch anything else.

  • Sort the files alphabetically, A –> Z
  • Look for the file autoexec.cfg, it is likely not going to be there.
  • If it is make a backup, just in case.
  • If its not continue..

I have included two versions of this file, “autoexec – advanced” and “autoexec – basic”, if you want all the (awesome) bonuses modifications this legendary script provides you then use advanced, if you would rather not modify the game slightly (I promise, its 100% safe and easy to control) then take basic.

The autoexec script was put together by these guys, they are completely awesome and deserve loads of credit so make sure you know its them and not me who made this. There are plenty of details on the advanced functions but changing the glow effects is an especially useful one to use.

  • Open the autoexec in whatever code program you want, you only need to change the sv_search_key value, its in the top 15 lines of either document and has xXx edit me xXx specially in there for you.
  • You need to change the “edit me” to whatever value you previously put in the sv_search_key field inside the server.cfg document. Double check spelling!
  • Save the file, rename it to autoexec.cfg and place it in the previously mentioned directory.

What does this do? It means every time you create a lobby then press “start game” it will automatically join your server, no messing around, no typing stupid commands in that console, it’s all automatic.

Seriously if you knew how much trouble it can be to go from a full lobby with settings you like to hit your server without this then you would be super grateful.

Step 4: Playing

Everything else is easy peasy from here on in, to start a game with your mates do the following.

  • Create a lobby
  • Choose your gametype
  • Choose the map
  • Choose difficult (if relevant)
  • Get your mates to join the lobby
  • Choose characters (optional)
  • Press Start Game
  • Server connection is not always instant give it a few seconds to get going. It will be quicker than searching for one when its peak times, 100x over.
  • Enjoy!

Step 5: Customisation

OK so half the fun of having your own server is messing about and making it your server.

The biggest step you can take visually is customizing the message of the day (motd) and the host banner. To do this I recommend you have your own web hosting.

Inside the ZIP at the start of this documents are templates for doing both, they are already sized for best fit so don’t change their size or you will end up with stretched stuff on screen when in the game.

Depending on how good you are at HTML coding and photoshop depends on what you can do here, I have included GFUKs examples which I made in 10 minutes on photoshop with the promo materials on the official L4D site.

The whole process is easy, simply;

  • Open the host or motd PSD or JPG in whatever you like and have fun designing your banner.
  • Save it as a JPG
  • Upload it to somewhere that allows hotlinking, your own server would be good but image hosting sites will do at a push.
  • Open the host or motd.html file and edit the src attribute inside to point to your image.
  • If you want to code real text you can by setting the image as a background and putting stuff on top.
  • Place the HMTL file online somewhere via FTP
  • Change the relevant file (host.txt or motd.txt) to point to the new file, just one line e.g. “http://www.mysite.com/l4d/motd.html”
    • Can be done via control panel on your rental server
    • Can be done via FTP, the files are in the root as txt files.
  • Next time you load up the server you get your designs, easy as pie and can look really nice and maybe even promote your Guild am little.

Step 6: Admin

I have already given you the PDF with all the commands but this site http://l4dcommander.com/ is pretty good.

It lets you web access (remember Shift+Tab in game) your control panel and has a nice interface etc.

The commands I will pull to your attention are;

  • rcon_password xxx : enter first to “log-on” to server (not need in l4dcommander)
  • mp_scrambleteams : scrambles teams for vs.
  • multiplayerendgame : Ends current game for everyone
  • mp_switchteam : Switch vs. team
  • changelevel xxx : Change map to specified one
  • mp_gamemode xxx :Change gamemode to coop | versus | survival
    • for some reason does not work when going from survivial to coop, not sure why. Can easily change in lobby however
  • kickid xxx : Kick a player via ID
  • kill xxx: Kill a player ^.^
  • killserver: shutdown server

Credit & Resources

I got a bit of help on my journey and while it took me a while to put all this together a few other people deserve credit;

That’s it, have fun on your server! Let me know with comments if you want any more or if I owe you credit and forgot :/

30 Responses to “How to Set Up A Left 4 Dead Dedicated Server”

  1. Kristoffer Strayhorn 10. May, 2009 at 7:31 pm #

    I tried using your autoexec and the console is saying unknown commands on all the glow commands..not sure why

  2. Diablos 11. May, 2009 at 8:17 am #

    Hey Kristoffer, did you definitely use the full autoexec and not the simple one?

    Other than that I would make sure that a) you didn’t accidently change the keybind in the autoexec or comment it out b) you have not already bound something to the F11 key

  3. Wickie 22. May, 2009 at 2:01 am #

    Hey Diablos,

    Thanks for taking the time and effort to get this posted for everyone. You’re right,. it’s hard as hell to piece this all together from all the multiple places online and half isn’t out there.
    FYI, I found your post on Google! :D

    /Salute

  4. Diablos 23. May, 2009 at 10:10 am #

    NP Wickie, glad you found the guide useful, have fin on your dedicated server!

  5. Juice 31. May, 2009 at 12:42 am #

    Very nice guide and very informative. The only question I have is this. We’re using Gameservers.com to host our L4D server and the config file on the site doesn’t quite look the same. Our server ID is there but near the bottom of the config file. The way you have it set up in here, will it work for our server config file as well?

  6. Diablos 02. Jun, 2009 at 4:45 pm #

    Hey Juice, thanks for the interest in the guide. To answer you question you should be able to overwrite the config file and leave the special bit at the bottom, I would keep a backup just in case but IMO there is no reason this should effect it.

  7. PeaceinChaos 06. Jun, 2009 at 8:33 pm #

    great guide, it helped me a lot. but now when joining the server through lobby, everyone but me gets dropped from the game. any thoughts?

  8. Diablos 07. Jun, 2009 at 9:18 am #

    Hey PiC, I can think of two things that could cause this.

    1) Do you have a password set on the server, if so every player who joins will need to input it or they will be blocked from joining.

    2) Are you using the force connect command inside the console, this only connects you to the server and will not bring your lobby. You must use sv search and then press connect on the actual l4D UI.

    The only other thing it could be is that you didn’t get a server with enough slots or they have ping restrictions which you server is not meeting.

  9. Kelly Brown 12. Jun, 2009 at 7:57 pm #

    The best information i have found exactly here. Keep going Thank you

  10. Ewang 18. Jun, 2009 at 1:29 am #

    So my server is up and running just fine. Thx for your info on this writeup. It was awesome.

    I just have 1 question. How do I or my friends select characters on their way into my game. I have them just type connect IP Addy then it connects to my server and the server automatically picks Zoey, or Francis, or Bill for them. How do you work around this?

  11. Diablos 18. Jun, 2009 at 6:24 pm #

    Hey Ewang;

    You should be able to chose characters while your in the lobby, the option is on the left but you have to let everyone chose there characters before you press “search for server”.

  12. Ewang 19. Jun, 2009 at 8:59 pm #

    Hi Diablos,

    I cannot even get to the lobby. My friends connect straight to my game by typing connect IP at the console. They do not get to enter the lobby.

  13. Diablos 20. Jun, 2009 at 2:55 pm #

    You won’t be able to chose characters if you connect via IP, if you as lobby leader use the sv_searchkey command or utilise the autoconfig file featured in the guide you will be able to start a lobby, choose characters and then when you start the game it will go to your server :)

  14. obiwan 06. Jul, 2009 at 5:01 am #

    Where is the root/cgf file?…could you help me with this step pls..thx

  15. Diablos 07. Jul, 2009 at 7:08 pm #

    Hey Dude,

    sorry I have been busy not had change to reply right away.

    To get this file you need to FTP into your server (or access it through some server control panels), navigate to the root of the L4D server then find the folder called “cfg”, the stuff you need is in there.

  16. Nitroxsage 12. Jul, 2009 at 9:35 am #

    hey I am fine time I get to the copy and paste it to my root config part can I get some help

  17. Diablos 12. Jul, 2009 at 11:05 am #

    I am not sure what you’re trying to say here dude,

    If you’re looking for the config file you need to either get an FTP program like FileZilla and FTP into your server to obtain the file OR use your game server control panel to do it, not all servers have this option however.

    Understand that root>config is the path to finding the file not the file itself, root just means the place where files start or the top level.

  18. mikeraz 03. Sep, 2009 at 3:41 am #

    heyy great tutorial. helped me with every thing except i have two problems. it will not let me acess any command in console (i have full admin and tried the rcon pw) and i cant get my banner up. your bullets were a little confusing. can you help me thx

  19. Eddie C. 13. Oct, 2009 at 5:15 am #

    Very informative and thanx for all the tips…had another question about addon maps. We putt the vpk files into the addons folder and the addons list updates the maps are on but we can’t play them. Maps don’t even show up in the vote.

  20. Diablos 13. Oct, 2009 at 6:20 pm #

    Hey Eddie, unfortunately we have not had much time to experiment with add-on maps so I can’t help you with this one, I am sure the guys over at the Steam forum can answer some of your questions, you can find them at http://forums.steampowered.com/forums/forumdisplay.php?f=130

  21. PoisonPanik-aw- 20. Oct, 2009 at 4:37 pm #

    Question, Can someone point out to the obviously blind guy where the download link for the “autoexec – advanced” and “autoexec – basic” files are? I clicked on the credit to these guys link but I didn’t see an option in their download for advanced or basic.

  22. PoisonPanik-aw- 20. Oct, 2009 at 5:16 pm #

    Ok, so the blind guy figured it out but now it doesn’t seem to work for me.

    Attempted both files.

    sv_search_key “dead” (should the “” be there in the file or not?)

    The extra stuff in the advance file worked fine but haven’t been able to connect to my clan’s server.

  23. Diablos 20. Oct, 2009 at 5:39 pm #

    Hey PoisonPanic,

    You need the quotes as I remember but “dead” is a bit obvious, try setting it to something more unique then remove the quotes if it still doesn’t work.

    You have made sure that your server.cfg has the same name in it too right?

  24. PoisonPanik-aw- 21. Oct, 2009 at 1:04 pm #

    LOL, yeah i know dead was obvious. I was shooting for an easy example. I’ll double check the server file again. Could have missed a ” or something there. Thanks for the info!

  25. Raserith 27. Nov, 2009 at 1:27 am #

    okay, first off. is this all the same in L4D2?
    second, is there some way to communicate with the players in game? i mean, you can use the console to view what they say, but can you talk back to them?
    maybe something like sv_message or something?

  26. Diablos 28. Nov, 2009 at 5:32 pm #

    I have not actually tried setting up a Left for Dead 2 Server yet but Docta did and I am told it is at least very similar. Unfortunately I do not know the answer to your questions :(

  27. Mark 02. Dec, 2009 at 11:15 pm #

    Got everything running but can’t seem to get it to connect to my server unless I just click on the server, in which case you can’t select the player, map….
    I know it’s connecting to the autoexec.cfg as I put an echo in it and see that come up when I select console in the game. I also see the glow working with F11. I also notice that when I just click the server I get my system IP address (I built the server local on my box). When I connect via lobby I get 127.0.0.1 which leads me to believe its just ‘making’ a local server which isn’t the one I want.
    I’ve tried every version of “123Server” with quotes and without quotes for the sv_search_key on both the Server.cfg and autoexec.cfg but can’t seem to get it connect to my dedicated server. Since it’s on the same box I even copy/pasted it several times. Can’t understand where I’m going wrong as I know it’s reading the file and I know the server is running and can be attached to.

    Thanks,

    Mark

  28. Diablos 06. Dec, 2009 at 2:46 pm #

    Hey Mark,

    Sorry it took me a while to get back on this one.

    I can only imagine it’s something to do with being on the same IP, connecting to a dedicated server usually means going to a different IP and maybe L4D has to see that. Since I have never tried to set one up on the same machine I can;t say much more than that.

    Best advice wou;d be try changing the search key to something more unique.

  29. wong 08. Mar, 2010 at 11:45 am #

    Hi. Do you know how to set the server to a versus game type only? My server was rented and it always starts the game in a campaign mode (advance difficulty).

    ##Commented Edited for Privacy## – Diablos

  30. Diablos 08. Mar, 2010 at 10:28 pm #

    Hey Wong,

    Firs thing to do is to check your server slots, you need 8 slots, not 4 to play versus and some server sell 4 player only pre setup servers.

    If you are sure you have 8 then the next thing is to add this line to your server config, this si the L4d2 version.

    sv_gametypes “coop,versus,realism,teamversus,teamscavenge”

    that means your server will allow all game types.

    If you are still having trouble try starting a lobby up with versus and sv search key into your server (described in the full post) which should set it to versus when you join.

    If this STILL doesn’t work last resort is to rcon into the server while in a normal game, bring up the console and use the “changelevel” command to a versus map (these are in your L4D folders or you can see a list on your server depending on your host)

Leave a Reply