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”.
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_clearhinthistoryexec 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

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;
- Left4Dead411 for the command list PDF
- Steam Community Forums
- Specifically Steam Forum user Aurien who helped me understand autoexec
- Everyone behind the L4D autoexec script, you guys rock!
- The guys who made the L4Dcommander.com, here is the Google Code Group for them
- How to get rid of the fuck annoying new “lighthouse” background on the menu
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 :/



