Left 4 Dead 2 Dedicated Server Tutorial - No-Steam Edition [Windows]

Current Game Version: v2.1.0.0
Updated Post for Full Game!

Left 4 Dead 2 Dedicated Server Tutorial [Windows]

Prerequisites:
Port Forwarding if behind a router.
Learn all this @ www.portforward.com
Turn Off Windows Firewall!

I. Installation:
This tool is used to download and update the Source dedicated server.
2. Run hldsupdatetool.exe and install it into a folder. eg. C:\SRCDS
3. Now go to C:\SRCDS and double click hldsupdatetool.exe. [This will update the tool.]

Create a new text file in C:\SCRDS\ with this code:
update.bat
hldsupdatetool.exe -command update -game left4dead2 -dir .
pause
[This may take a while and you may need to run it more than once to get all files at 100%]

II. Configuration:

Example server.cfg - now with more detailed info.
//##Server.cfg###########################
//Basic server cfg - loaded on each map #
//#######################################

/////////////////////////
//Server info
////////////
hostname YourServerName        //Hostname for server
sv_contact "EmailHere"        //contact email for server sysop

/////////////////////////
//Internet, region, lobby setup
////////////
hostport 27016            //default 27015; Host game server port
sv_lan 0             //Server is a lan server (no heartbeat, no authentication, no non-class C addresses) [enable LAN = 1; disable LAN = 0]
sv_region 0             //The region of the world to report this server in.
sv_allow_lobby_connect_only 0     //default 1; If set players may only join this server from matchmaking lobby, may not connect directly [enable/disable Lobby connections only 1/0]

/////////////////////////
//Game Settings
////////////
mp_disable_autokick 1         //(command)prevents a userid from being auto-kicked (Usage mp_diable_autokick )
sv_allow_wait_command 0        //default 1; Allow or disalow the wait command on clients connected to this server.
sv_alternateticks 0        //defulat 0; (singleplayer)If set, server only simulates entities on even numbered ticks.
sv_clearhinthistory 0        //(command)Clear memory of server side hint displayed to the player.
sv_consistency 0        //default 1; Whether the server enforces file consistency for critical files
sv_pausable 0            //default 0; is the server pausable
sv_pure_kick_clients 0        //default 1; If set to 1, the server will kick clients with mismatchng files. Otherwise, it will issue a warning to the client.
sv_pure 0            //If set to 1, server will force all client files execpt whitelisted ones (in pure_server_whitelist.txt) to match server's files.
//If set to 2, the server will force all clietn files to come from steam and not load pure_server_whilelist.txt. Set to 0 for disabled.

/////////////////////////
//communication
////////////
sv_voiceenable 1        //default 1; enable/disable voice comm
sv_alltalk 1            //default 0; Players can hear all other players' voice communication, no team restrictions

/////////////////////////
//LOGGING
////////////
log on            //Creates a logfile (on | off)
sv_logfile 1        //default 1; Log server information in the log file.
sv_log_onefile 0    //default 0; Log server information to only one file.
sv_logbans 1        //default 0;Log server bans in the server logs.
sv_logflush 0        //default 0; Flush the log files to disk on each write (slow).
sv_logsdir logs        //Folder in the game directory where server logs will be stored.

/////////////////////////
//Bans
//  execute banned.cfgs at server start. Optimally at launch commandline.
//  Put writeip/wrtieid commands in the bottom of server.cfg AFTER banned.cfgs have loaded.
////////////
exec banned_user.cfg    //loads banned users' ids
exec banned_ip.cfg    //loads banned users' ips
writeip          //Save the ban list to banned_ip.cfg.
writeid          //Wrties a list of permanently-banned user IDs to banned_user.cfg.

/////////////////////////
//Master server - "setmaster" - add/remove/enable/disable master servers
////////////
//Usage: setmaster

/////////////////////////
//Network Tweaks - Increase network performance
////////////
rate 10000        //default 10000; Max bytes/sec the host can recieve data
sv_minrate 15000       //default "5000"; Min bandwidth rate allowed on server, 0 = unlimited
sv_maxrate 30000    //default "0";  Max bandwidth rate allowed on server, 0 = unlimited
sv_mincmdrate 20    //default 0; This sets the minimum value for cl_cmdrate. 0 = unlimited [cevo=67]
sv_maxcmdrate 33    //default 40; (If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate. [cevo=101]

III. Starting Server:
You can start your Left 4 Dead 2 dedicated server from the command line, a batch file, or by making a shortcut to srcds.exe.

To Create a Startup Shortcut:
1- Go to your C:\SRCDS\left4dead2 directory. Right click on srcds.exe and select 'Create Shortcut'.
2- Right click on the newly created shortcut and select 'properties'. Click the 'shortcut' tab and in the Target line you will see the following: "C:\srcds\left4dead2\srcds.exe"
3- Now we need to add the following parameters to this line to get the server started properly:
Startup Parameters:
Don't forget to put a space between srcds.exe" and -console.
Click OK when finished. Double Click Shortcut to start server.

To create a Startup batch file with extra script to restart server if it crashes:
1- Go to your C:\SRCDS directory and create a new text file named L4D2Server.bat.
2- Add the following line of code to the batch file:
L4DServer.bat
@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds
Save .bat when finished. Double Click L4DServer.bat to start server with crash protection. :)

IV. Cracking Server:
IMPORTANT: To avoid using the matchmaking system and use direct connections instead,
Make sure you have the the following set in your server.cfg:
sv_lan 0
mp_disable_autokick 1
sv_consistency 1
sv_allow_lobby_connect_only 0

Install Rev-Emu and Configure rev.ini:

*NEW* L4D2_RevEmu_Server_Edition_02-18-2012 *NEW*
This is the latest rev emulator for use with L4D2 v2100+.
Includes:
Revolution emulator configured specifically for l4d2 server.
Sample server.cfg files and launch.bat.

Install L4D2_RevEmuto your server's root left4dead2 directory and edit rev.ini as follows:

###########################################################
# For Dedicated Servers:                                  #
# Remove comment from the ClintDLL line:                  #
#                                                         #
# ClientDLL=steamclient_l4d.dll                           #
#                                                         #
###########################################################

Download and install Microsoft Visual C++ 2008 SP1 Redistributable Package: 32-bit or 64-bit

V. Updating Server:
Before Updating, move the two rev-emu dlls [or SoBeit's dll/ ESt+VUP patched files] out of the bin folder
and rename the originals back.
Update server by running the update.bat created at the beginning of this guide.
Then follow Step IV for Cracking Server.

--------------------------------------------------------

-If you want your server to show up in the in-game server browser,

-After You get your server up and running,
Install SourceMod and MetaMod for plug-ins and better admin control of your server.
See the How-to HERE.

-Keep Players up-to-date with patches and fixes in this post.

--------------------------------------------------------

ENJOY!

--------------------------OLD FILES------------------------------
Here are older Server tools that may/maynot work with current version of L4D2:

L4D2_RevEmu_Server_Edition_02-02-2012
This is the latest rev emulator for use with L4D2 v2098+.

L4D2_RevEmu_Server_Edition_1-22-2012
This is the latest rev emulator for use with L4D2 v2097+.
MediaFire

L4D2_RevEmu_Server_Edition_Jan2012
This is the latest rev emulator for use with L4D2 v2094+hotfix.
MediaFire

L4D2_RevEmu_25122011_fixed
[This is the latest rev emulator for use with L4D2 v2094 and higher.]
MediaFire

L4D2_RevEmu_21122011_fixed
[This is the latest rev emulator for use with L4D2 v2094 and higher.]
MediaFire

[BROKEN] L4D2_RevEmu_20122011 [DO NOT USE]
[This is the latest rev emulator for use with L4D2 v2094 and higher.]
MediaFire

L4D2_RevEmu_28082011
[This is the latest rev emulator for use with L4D2 v2080 and higher.]
MediaFire

L4D2_RevEmu_2050+ [RevCrew_win_28102010]
[This is the rev emulator for use with L4D2 v2051 and higher.
It can be used on client installations as well as dedicated server installations with only a minor change.]
MediaFire

Use ONE of the following depending on your needs:
I - Esteamation+UGSP [formerly VUP] Package for Online Dedicated Servers
II - Rev-emu for Online Internet Dedicated Servers.
III - SoBeit's .dll for offline-LAN servers ONLY.

I- For Online Dedicated Servers use Esteamation+UGP [formerly VUP]:
**UPDATED for use on L4D2 v2.0.1.5 servers. **
2. View INSTALL_l4d2.txt for installation/configuration instructions.

ESteamation_2.0RC2+UGSP2.8_for_Source2007U1 [L4D2 Setup Package.]
[supports: LINUX and WINDOWs, any server version, l4d1 + l4d2]
Complete Esteamation/UGSP package modified for use with Steam3/Source2007U1 servers.
MediaFire

II- For Online Internet Dedicated Servers use the Revolution Emulator:
2. On a fresh installed [or updated] server, go to the bin folder and
rename the origianl steam.dll and steamclient.dll to
steam_l4d2.dll and steamclient_l4d2.dll, respectively.
[Original Steam dll's should be around 2 to 3 MB in size whereas the rev-emu dll's are around 300 KB]
3. Copy Rev.ini  to where srcds.exe is located
and copy rev-files steam.dll and steamclient.dll to the bin folder.
4. Fire up server! Done!

III- For Offline LAN server use SoBeit's fixed steam_api.dll :
Perfect for LAN server with NO internet connection.
2. Go to SRCDS\left4dead2 and backup the original steam_api.dll.
3. Extract SoBeit's steam_api.dll to C:\SRCDS\left4dead2\bin
4. Fire up server! Done!

Note: Using this method Steam Validation is removed and VAC is disabled.
SoBeit's offline_api_all.rar
RapidShare - MediaFire

Rev-Emu Packages and Info:
*NEW* L4D2_Server_RevEmu_9.81R4_Steamclient2009v2
[for dedicated servers only - choose between emu with Looging and emu with No Logging;
rev-client.log will be generated in your root folder]
RapidShare - MediaFire

L4D2_Server_RevEmu_9.81R4_Steamclient2009 v1
Updated rev-emu steamclient.dll works with L4D2 DS.
RapidShare - MediaFire

L4D2_Rev-Emu_9.81R3_mod.zip
Modified by Eydee to work on L4D2 DS.
RapidShare - MediaFire

Here is how the rev.ini is setup for this configuration:
Rev.ini:
###########################################################
#  L4D2_Server_Rev-Emu_9.81R3                             #
###########################################################
#                                                         #
# On a fresh installed server, go to the bin folder and   #
# rename steam.dll and steamclient.dll to steam_l4d2.dll  #
# and steamclient_l4d2.dll, respectively.  Copy Rev.ini   #
# to where srcds.exe is located and copy rev-files        #
# steam.dll and steamclient.dll to the bin folder.      #
#                                                         #
# Make sure to have the following set in server.cfg:      #
# sv_lan 0                                                #
# mp_disable_autokick 1                                   #
# sv_consistency 1                                        #
# sv_allow_lobby_connect_only 0                           #
#                                                         #
################################################satannuts##
###########################################################

[Emulator]
# Supported Languages - English, French, Italian, German,
#Spanish, sChinese, Korean, Koreana, tChinese, Japanese,
#Russian, Thai, or Portugeuse
Language = English
Logging=False
SteamDll=Steam_l4d2.dll
SteamClient = True
SteamUser = SteamPlayer

[Log]
FileSystem=False
Account=False
UserID=False

[steamclient]
PlayerName = SteamPlayer
Logging=False
ClientDLL=steamclient_l4d2.dll

[GameServer]
#AllowOldRev=False
#AllowUnknown=False
AllowCrackedSteam=True
AllowLegitSteam=True

Anonymous said...

I've got a server up and running but I seem to be the only person who can connect to it.

I've set it up as a public server but I'm not familiar with Steam or L4D's server browser (if there is one), so I can only connect via the Steam groups option on the first L4D2 screen and I'm not even sure if my server's showing up anywhere else. But I haven't configured it to be a Steam group server and I've included the "setmaster add" commands to inform Steam that my server's online. Could you please tell me which port/s I need to forward and suggest any other reasons why other players might not be able to connect? I've set "sv_lan 0" so I know it's connectable via internet. Thanks.

Anonymous said...

UPDATE:

I got this working by forwarding ports 27000-27040 UDP/TCP and changing server.cfg and the command line parameters from port 27016 to 27015. I also reinstalled srcds but I think it was the other changes that did it.

All players can now join and my server is listed in the server browser.

Burak Çalık said...

I can't join game.
It says "STEAM validation rejected"

Anonymous said...

Seems that they released one version of rev-emu on CS.RIN.RU and its working!!

http://cs.rin.ru/forum/viewtopic.php?p=647350#p647350

satannuts said...

and repacked it with some info to configure server.

Dookie said...

Does anyone know of a way to create a dedicated server but making it into older versions l4d2.. For example ver2005 instead of ver2006?

I want to try to make a server with sourcemod but can't install it on cracked l4d2.

My only option is dedicated server. I've tried one thing but not sure it is safe. Go into the bin folder and change the configuration to make the ver2005 instead of ver2006. Not sure if this right.

Anonymous said...

Do you know if there is anyway to do this on Unix (Ubuntu)?

Thanks ;)

Anonymous said...

First thing thinks for the guide. And can steam players join the nonsteam server?
I mean like can the join from quick match. (can they find my server)

Anonymous said...

hi hi.. im just asking.. morizuki here... is there any File Checker for the Dedicated Files? can anyone send that kind of file please??

Anonymous said...

can anyone send me the File Checker for this Dedicated Server files? please please..

kirei_morizuki@yahoo.com

kindly send here in my email..

satannuts said...

@morizuki,
There's no need for a file checker.

There's one built into hldsupdatetool:
-verify_all
This will run a check on all yer server files and replace any that fail the checksum test.

Note: this will replace all modified files with origianl ones from Steam.

satannuts said...

@Do you know if there is anyway to do this on Unix (Ubuntu)?

I'm putting together a guide sepecifically for l4d2 on ubuntu...
Its taking some time tho, but should have it posted within a week or so.
I'm noob to linux...

blake. said...

Is the modded rev-emu you have here still the best and most reliable way to go about setting up a non-steam dedicated?

I'm having a crash on map changes and was wondering if this was the latest, or if the Rc4 of rev-emu was newer.. ?

Blake said...

Ah, found out the crash wasn't related to any loader of any kind.

Was just a plugin I had, the downtown one to be more specific.

Anyhoo, now running my dedi with Rev Emu RC4 and a fixed Steam_api.dll file I've had for awhile now. So sure who the credit goes for that one. But the rev emu only worked if I used it.

Thanks for all the guides you've got here, and for keeping them relevant.

Cheers. :D

Chibicon said...

The server works if I make it public, but it won't if I add a password.

Did I do something wrong?

Володя said...

Flawless tutorial! But works not very well. When round ends - all surviors are dead, the server kicks all players(wrote dropped from a game). And nothing happens. Just 4 corpses and if u join to infected, i'll be dropped few moments later again..
Who can help with this?

p.s. i executed server.cfg

Anonymous said...

Is there any way we can somehow alter or patch a dedicated server that you hire to work the same way for cracked versions of the game?
The problem I have when I host is that even with adsl2+ the maximum upload speed is 1mbps and it does not look like that is enough to handle 8 players. 7 is fine but at 8 the ping will consantly spike to 1500ping.

Blake said...

Hey satannuts,

Were you still working on a Linux L4D2 Cracked Dedicated guide?

It would be sweet to see it up here.
Even if it's not complete. :D

Ron said...

Thank you dude for the excellent tutorial ... thank u

cheers...

Newsboy said...

Hey people i cant find my server's IP can anyone help me?

Anonymous said...

I am running a lan server using SoBeit's fixed steam_api.dll.
Everything seems ok with my server but noone cant connect to it...Everytime someone tries to connect it crashes back to console and i get this message :
"
Connecting to public(192.168.1.5:27016)
Sending UDP connect to public IP 192.168.1.5:27016
Invalid protocol, expecting 2010, got 2011

Whats wrong???

satannuts said...

Invalid protocol, expecting 2010, got 2011

rahman said...

Iwas try to update may server version to 2.0.1.1 and i use the L4D2_Server_RevEmu_9.81R4_Steamclient2009v2
also L4D2_Rev-Emu_9.81R3_mod.zip

but my server always crash if the players joint into my server

my questions is are u cracked the steam.dll and steamclient.dll

satannuts said...

@rahman
Run the Update adain to v2.0.1.1 to start fresh and -
USE ONLY ONE OF THE REV_EMU FIXES.

I'd suggest the one with steamclient2009 v2.

Follow the steps to rename the original files then copy over the rev-emu files.

Anonymous said...

i don't understand the instructions below

2. On a fresh installed [or updated] server, go to the bin folder and rename the origianl steam.dll and steamclient.dll to steam_l4d2.dll and steamclient_l4d2.dll, respectively.
[Original Steam dll's should be around 2 to 3 MB in size where as the rev-emu dll's are around 300 KB]
3. Copy Rev.ini to where srcds.exe is located
and copy rev-files steam.dll and steamclient.dll to the bin folder.
4. Fire up server! Done!

i just wanted to make sure that the instructions above is related to step one of this guide

so step one is download the rev-emu package done that step 2 on a fresh install or updated server thats referring to the server you installed using update.bat right? step 3 copy rev.ini to where you installed hldsupdatetool.exe and used updated.bat so to a location like this for example: C:\SCRDS\left4dead2? and step 4 fire up server thats fine

it's just step 2 and 3 thats confusing, basically this guide has no relation to the other guide is that correct? cause the other guide also has rev.ini as well as srcds.exe

Anonymous said...

in my server script it says
BOpenService failedServiceStart: failed to startexec: couldn't exec server.cfg

what does that mean?

how does it work because in this guide it doesn't talk about server.cfg it only talks about that in the other guide

what do i do?

Anonymous said...

when i host i can only see the server

how do i make it so that the public can see my servers as well?

i tried port forwarding but still doesn't work

Karan said...

Please do a guide for linux L4D2 dedicated server. Would Be Gr8! thx
:)
akaran10

Manix said...

About same thing happens here, when I host a server, my friends can't see it in steamgroup servers, only I see it! And when they try to connect via console with my ip, they get "Couldn't connect after 10 tries" or something like that. I do not use any routers nor firewall so I'm really wondering what's the problem! I tried to change hostport in shortcut and in server.cfg from 27016 to 27015 as said by the first one who commented but it didn't help neither. This was a fresh install and update of the dedicated server. So I can join my server but my friends can't. The sv_lan setting is set to 0 of course. I only used the rev_emut with steamclient2009 v2. Could you please help me with that issue? Thanks!

asdf said...

Fantastic guide!

Only one question:

What are system requirements for running a 4-player co-op L4d2 dedicated server?

Thanks!

LuiS.JS said...

@satannuts
Will this guide work for dedicated servers for version 2.0.2.0? Thanks!

Anonymous said...

Amm... Iv got the latest 2.0.4.9 and I cant get the server working with the second "sorbeit" method.. we only need it for LAN, so is it me or is it not just working with the current versions?

Anonymous said...

ok i have the dedicated server in my tools already but how do i get it to connect with other people. tacodch@yahoo.com

Anonymous said...

this really drives me nuts :when I use "changelevel" command in the dedi's console to start any custom campain the game kicks me out from the server.then I need to restart the game to join in. after "changelevel" I'm getting this in the console "Missing Vgui material vgui/loadingscreen_deadcity_widescreen". although it works when I use "map" command in the console but I have to reconnect each time when I'm starting a new level

I'm unable to put my server on the css.setti.info master list, but I think "Unable to load Steam support library, this server will operate in LAN mode only." has something to do with it.
Any halp?

cybertank378 said...

@ Shadow86 use the esteamtion for the server and use the rev emu for the client

and configurate

Now it's showing a new error; the server won't start at all!

"The procedure entry point SteamAPI_UseBreakpadCrashHandler could not be located in the dynamic link library steam_api.dll"

Anonymous said...

i created a server but i can not join why? i have the 2.0.5.8v in l4d2

PoliceMatrix said...

here is an up to date guide on how to play left4dead2 on garena non steam online updated april 2011
All updates and patches are here

Anonymous said...

Hi, first thanks for all the work you do for all us who want to made a server of left 4 dead 2.

Second, i want to ask you if exist a complete list of ALL comands that the admin need to know for be an optimus admin.

Third, ask you if a can make other questions if i need it.

Thanks for all

my skype cybertank378

jake ranger said...

my server won,t open at all so if any 1 can me plz email me at jakeranger1@hotmail would very thankfull

Anonymous said...

How do I create a versus server?

I can teach U

Anonymous said...

Is there a way to support more than 4 people in a LAN environment? I can't seem to find anything conclusive, though I assume 4 is the max per server. Anyone here able to clarify?

Anonymous said...

Combining black and red on you page makes the red invisible for colour blind people.

burnm3w1thf1r3 said...

I'm new to running servers and such. I was able to create a server and connect to it. What I want to do is learn how to admin it, and make a modded server, with specified cheats or guns, or allowing costume/sound mods. Can anyone help? I've tried researching it but have come up short.

Jonas Francisco said...

when I run the update.bat file it says "No installation record found at -dir-", then "Checking local files and building download list for depot 551 left 4 dead 2 common version 159 "
After that it tries to connect to content server for version 159, and keeps "Retrying in 30 seconds".
After several atempts it changes the version, instead of 159 it says 39, yet it keeps retrying, then it just closes.
Am i doing something wrong? Any ideas?

Rakesh Khuntia said...

Hi.. Thanks for posting this blog. One of my friend is doing the same. I will forward your link to him. Or you can get in touch with Dedicated Hosting, Dedicated Hosting in Delhi, Dedicated Hosting in India

Sonia Gupta said...

There is guarantee of satisfaction for the customers as service is provided dedicate without any restriction as wishes by the customers. Though, the escorts are young but are highly professional with expertise knowledge to make the clients happy. Delhi call girls are selected from the high society of Delhi and neighboring areas. The top qualities of the escorts are beauty, sexy, modern, open-minded, ethical, and attractive personality to allure the customers. Delhi Call Girls are highly expert in mingling with new clients and rich people to enjoy and go out in the night. The tourists coming to the city like to enjoy the nightlife and escort can be a great company for them. Escorts are totally different from a normal prostitute offering sex for only money. The escort girls are also call girl in Delhi but deliver the service willing to get full enjoyment to satiate their thirst for sex. It is provided to real gentlemen after hiring from the agency at the convenient of hotel room.

Blogger said...

DreamHost is definitely the best hosting provider for any hosting plans you require.