Left 4 Dead 2

Left 4 Dead 2

226 ratings
L4D2 your dedicated server 30.07.24 up to 32 players installation
By **DeiRowtag and 1 collaborators
Here i give you a fresh installation of Sourcemod / Metamod + plugins to make your server work up to 32 player in any gamemods
You must know it will be like a local server so if you have a bad connection people may lagg, but for those with a good connection it will be just fine, talking from experience.
2
4
   
Award
Favorite
Favorited
Unfavorite
Informations about the server.
  • Defaut setting is 4v4 standard server setting, Admin can choose to increase the players amount or not up to 32 players.

  • The Server will work even if there no human in the game (Versus wont ever stop with ragequit)

  • Server auto change map after the end of one of them.

  • When you launch the server it will be automatically on c5m5 (Parish final) map for whatever reason, just votemap or start from a lobby to get the map you want.

  • The votemap system include also all workshop map you will add.

  • Try out the server before installing any custom map or plugins that come from somewhere else than the files i send here.

  • Not any of the plugins will change the gameplay unless you allow it, everything or almost is locked for admin only so it look like the main game with little upgrades!

  • Starting the server from lobby will allow random public to join it but only up to the standard limit (4 for coop and 8 for versus) you can force player to join via group steam or friend invitation or server browser but no more public random can join it from server list sadly

  • Admin activity is shown to admin anonymously by defaut, it mean if you kick or slay or whatever command you use random pub won't have any notification but you and the admin on your serv will see something like: Admin kicked unkown. Can be config inside the sourcemod/cfg

  • Difference with your own local server is you can leave this one the server will keep working as long you don't close the CMD box.

  • You can run multiple server from the same script.bat as long you open port for each IP

  • Whether it is Linux or Windows the installation is identical, just the core files are different (download links further below)

If you have questions or any other information needed you can comment below or join my discord I will answer asap!
https://discord.gg/8yeSQAF6C2
Download + Main installation + Starting server
You have to download Left4Dead2 Dedicated Server from your steam tool library (it's free)


Here is directly a download link including sourcemod and metamod + the server launch script.
Everything is pre-installed you just have to follow the guidelines below to get it working.
If the link doesn't work anymore just comment please.

Windows version: Server-windows10.01.21.rar, Password is: sourcemod2020
https://drive.google.com/file/d/1yrUnXHp729ZtDdtijgZLGxHtxSSTQGcw/view?usp=sharing
Linux version: sourcemod-linux-2024.rar, Password is: sourcemod2020
https://drive.google.com/file/d/1RuzkNrplNu-F6Ib3gsRAczrtpsY7sGx9/view?usp=sharing

Open the winrar file and then:
Copy paste the script.bat inside the folder
steamapps\common\Left 4 Dead 2 Dedicated Server





Copy paste the Addons + Cfg folder inside here if it ask you to replace, click yes.
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2



How to start your server: Just start the "script.bat" and something like that should appear and load

If you close it, your server will shut down. it work exactly like the console ingame but for your server, you can input command inside like "_restart" to restart your server. 2 box will open, one empty and one full of text, the empty one is something that will automatically restart your server in case it crash, if you close it server won't restart.
Admin permission
So your server is ready BUT you won't have any admin acces, to create admin permission it's really simple:

Go inside your folder
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\configs
Open with any text editor "admin_simple.ini" like below

Scroll down untill you see this and replace the "exemple" with your nickname or anyone nickname and add your steam ID or anyone else steam ID to give you or him full permission.


CAUTION you can look for how to lower permission level, 99:z give 100% full power (inside the server) mean if one of your admin want to kick/ban you they can (you can still unban yourself easily but it's annoying to be kicked from your own server no?)

reservation......a.....Reserved slot access.
generic............b.....Generic admin; required for admins.
kick..................c.....Kick other players.
ban..................d.....Ban other players.
unban..............e.....Remove bans.
slay..................f......Slay or harm other players.
changemap.....g......Change the map or major gameplay features.
cvar.................h......Change most cvars.
config...............i......Execute config files.
chat..................j......Special chat privileges.
vote.................k......Start or create votes.
password.........l......Set a password on the server.
rcon.................m....Use RCON commands.
cheats.............n.....Change sv_cheats or use cheating commands.
root..................z.....Magically enables all flags and ignores immunity values.

give the letters above to your people to grant them each permissions related to each letters instead of the "z", exemple: "abckgh"

You can add as much admin as you want.

How to find everyone's steam ID? i recommend this site: steam xyz
copy paste your profile link to the box and take the first line "STEAM ID"
https://steamid.xyz/


How to check if it work? go in your server and type "!admin" or "/admin" you should see a menu on your screen.
Autoexec and how to increase players
Here is a command for all your admins to make life easy.
It's located in your game folder and not your server this time.

Steam\steamapps\common\Left 4 Dead 2\left4dead2\cfg

Open the "autoexec.cfg" in a text editor and add those lines anywhere:

alias "4v4" "sm_rcon exec 4v4" alias "5v5" "sm_rcon exec 5v5" alias "6v6" "sm_rcon exec 6v6" alias "7v7" "sm_rcon exec 7v7" alias "8v8" "sm_rcon exec 8v8" alias "9v9" "sm_rcon exec 9v9" alias "10v10" "sm_rcon exec 10v10" alias "11v11" "sm_rcon exec 11v11" alias "12v12" "sm_rcon exec 12v12" alias "13v13" "sm_rcon exec 13v13" alias "14v14" "sm_rcon exec 14v14" alias "15v15" "sm_rcon exec 15v15" alias "16v16" "sm_rcon exec 16v16"

So it look like this:



Why doing that?
You have to know that on defaut the server will be 4v4 as a normal server, people will still be able to join you but will be stuck in spectators so just input in your console something like "5v5" or "8v8" or "12v12" whatever up to "16v16" to increase player limits depend how much you need.
if you do not use it you must type in console "sm_rcon exec 4v4" or "sm_rcon exec 6v6"......

In coop or survival players will auto join survivors so you can play up to 16 players coop
In versus player will join whatever the team they want, they can change by saying "!teams" in the chat, here you can play up to 32 players.

IMPORTANT
So that the survivors can join they need bots to take, for that you will have to write in the console "sm_createplayer" or directly in the chat "!createplayer" as the server will spawn bots depending on the number of players you have ask.

Exemple you put "6v6" so the server will consider 6 survivors + 6 infected (4 by defaut) the server will spawn 2 more bots.
If you put "4v4" again then the server will automatically delete all bots after a while to be back on a 4 survivors vs 4 infected.
Open your PORTS
I can't help much here because it's different in every country and operators.
you must open port 27015 and 27016 in NAT/PAT for highest efficiency.
People won't be able to join your server if ports are closed.

Google how to open ports with your own internet provider!

This is mine (french)
name: l4d2 / l4d3 (doesn't matter)
port: 27015 / 27020 (internal / external)
les deux mean both = UPD/TCP you only need UPD
Make sure to open the ports for the machine the servers are running on!


You don't need so many ports, i recommend to open 27015 and 27016 and if you want to use more servers then go on.


Common issue when hosting the servers on a dedicated machine: you will have to allow port in your firewall by going inside the firewall of the machine then Advanced Settings then the following:

Server name + Steam group + Lobby launch
These 3 steps are used to start your server once you're in-game:

Edit your server name in the cfg folder - "server.cfg" just put whatever you want it is what people will see through steam group server or server browser.
Change the 3 green text into your own name.



Create a steam group (optional) and invite your friend or anyone so they can see your server in the steam group server in main menu.
You must input the Group ID inside the "server.cfg" located in
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\cfg
sv_steamgroup "Group ID"
To find this ID you must be admin of the group or ask the admin, it will be shown on the main page when editing it.

I created a group where you can all put your server so everyone in the group can see it, feel free to use it.
https://steamoss.com/groups/l4d2rds


Start your server from any lobby:

Input in your console when you are the lobby leader
"mm_dedicated_force_servers yourip:port"

How to find your server ip? just type "status" in console from your server or from the "script.bat" box.
Under the green line will be your public IP needed to launch your server.
HERE the serv is fully ready
From now it will be only optionnal stuff to make it easier, perfect and more understandable.
Common bug
  • If you install the server on a different machine you need to install left4dead2 (if you use steam cmd) in order to get all the files and a proper installation.
    Once the installation is done you can uninstal the game.



  • If you can't connect to your server at all you may need to allow srdc.exe in your firewall.
  • It can also come from a problem from steam like a compatibility option or beta version? Make sure to check if your steam if properly installed and running


  • Connection lost after 10 retries is most likely a port forwarding problem.
Server config: server.cfg
If you go in your server path cfg/server.cfg you can tweak game cvar, add or remove whatever you want if you know what you are doing, here some example of what's exist in the file:

if you put "//" in front of any line it will disable the line, here it will improve infected and survivors bots behavior and also spawn more tank/witch over maps so if you don't want any of those just add the //

//Infected improvement sm_cvar tank_stuck_time_suicide 30 //seconds before tank suicide if stuck sm_cvar director_tank_force_offer 1 sm_cvar director_force_witch 1 sm_cvar director_force_tank 1 sm_cvar director_tank_max_interval 600 sm_cvar director_tank_min_interval 200 //default 500 sm_cvar director_threat_max_separation 5000 sm_cvar director_threat_min_separation 500 //default 5000 sm_cvar director_threat_radius 500 //default 1000 sm_cvar director_max_threat_areas 8 //default 4 sm_cvar versus_tank_flow_team_variation 0.0

//Survivors bot improvement sm_cvar sb_friend_immobilized_reaction_time_normal 0 //bot reaction time when human get caught normal sm_cvar sb_friend_immobilized_reaction_time_hard 0 //bot reaction time when human get caught hard sm_cvar sb_friend_immobilized_reaction_time_expert 0 //bot reaction time when human get caught expert sm_cvar sb_friend_immobilized_reaction_time_vs 0 //bot reaction time when human get caught vs sm_cvar sb_max_team_melee_weapons 2 //bot take melee sm_cvar sb_melee_approach_victim 1 //bot use melee sm_cvar sb_sidestep_for_horde 1 //allow bot to seek better position for shooting infected sm_cvar sb_battlestation_human_hold_time 1 //How long the nearest human must hold their place before SurvivorBots will re-evaluate their Battlestations sm_cvar sb_normal_saccade_speed 115 //Better Aimbot sm_cvar sb_combat_saccade_speed 350 //Better Aimbot sm_cvar sb_toughness_buffer 30 //How much hp before a bot heal himself sm_cvar sb_separation_range 100 //distance between each survivors sm_cvar sb_max_scavenge_separation 750 //SurvivorBots wont scavenge items farther away from the group than this
How to update sourcemod/metamod
Sometimes newer update and plugins are only working on newer update of sourcemod/metamod so you will have to update them, it is quite easy: make sure to take windows because that where this current server is built for

google: sourcemod download
https://www.sourcemod.net/downloads.php
google: metamod download
https://www.metamodsource.net/downloads.php?branch=stable

once you have downloaded both, copy addons folder from metamod into sourcemod folder then go in addons/sourcemod/config and delete "admin_simple.ini" because you don't want to remove your admin permission from that file.

Final step, copy the "addons" folder in to your server merging it with the existing "addons" folder and replace everything, boom you updated sourcemod/metamod.

You don't need to update every single time a new branch come out, i would recommend to do it at least once or twice a year or if one of your plugin require it.

How to see your current version: type in the black box "sm version" and you will see this:
Custom map + Versus map collection
How to install custom map to your server?

Subscribe to the map you want via the workshop then go inside your game folder (not server)
Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\workshop

Copy all the MAPS (not your skin or any weird stuff you have downloaded)

Paste all the MAPS in this location (your server)
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\workshop


BONUS here a collection of custom map from a friend that work in VERSUS
https://steamoss.com/sharedfiles/filedetails/?id=1131624513


BONUS INFORMATION
Be carefull downloading some maps like "the hive" will change some skin or sound in all the maps of your server and even can make common infected buggy.

You don't want to download / check the update all the time for all the map you own?
Copy paste all of them inside your addons folder (YOUR game NOT the server)
Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons

Then unsubscribe from them all, you can still use maps but you won't have the check for update loading when you start your game but you won't receive anymore update either so make sure to keep those you want updated subscribed.
How to edit your plugins
You must go there
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\cfg\sourcemod


Then open any plugin you want to modify with a text editor if the creator allow it and change whatever you want, don't forget to restart your server to save changes!


In this Fortspawn exemple i can change if it's enabled on defaut or not, if it's admin only or not and how much you can spawn per map (i changed to 999)

Everything with "//" are just comments, changing this line won't affect anything.
8 players lobby
Use this mod to be able to start a lobby with 8 player in any game mode, random pub will also be able to join your server up to 8 players instead of 4.

The mod tell you to add -insecure in launch option BUT you won't need it because the server has VAC disabled already.

You have to be at least 2 players to start the lobby for 8 since it will look like a versus game but no worries it won't be a versus (unless you start in versus lobby)

https://steamoss.com/sharedfiles/filedetails/?id=546656726&searchtext=8+player+lobby
Plugins list + Commands
Here you can download plugins, just find whatever you want and follow installation instruction from creators:
http://www.sourcemod.net/plugins.php?cat=0&mod=6&title=&author=&description=&search=1

Be carefull some plugins may cause crash and various change in the server.

You can config almost every plugins you add in this location:
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\cfg\sourcemod
You must restart you server everytime you install / change anything in order to work.



I added in the location below some useful plugins feel free to remove or add more
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\plugins

l4d_superversus.smx
Used to have the 32 players as l4dtoolz(not a plugin)

l4d_sm_respawn.smx
Admin: type !respawn "nickname" to respawn a player on your crosshair
exemple: "!respawn deir" will respawn myself where im looking at.

l4d2_bwa_teamspanel.smx
Anyone: can type !teams to switch teams, you also have acces in admin menu to force switch/swap

sm_goto.smx
Admin: type "!bring nickname" to teleport someone to your crosshair and "!goto nickname" to teleport yourself to someone position.

voteblocker.smx
This will prevent anyone to votekick Admin by blocking the vote, after 10 tries they will be instant kick

l4d2_iammo.smx
Admin: Create a new menu in admin menu (!admin) to grant anyone infinite ammo

L4DSwitchPlayers.smx
Allow admin to force switch player in any game mode even coop or survival you can be infected (little bit buggy), difference with !teams that won't allow you to switch to infected if it's not Versus.

l4d_gear_transfer.smx
Anyone included bots: can transfer kit,pills,throwable to anyone by pressing RELOAD key

l4d_gamemodechanger.smx
Admin type !gamemode to switch between campaign, versus or survival.

poof.smx
Grant a total invisibility by saying !poof (!poof again to be visible)


DISABLED plugin that i use/used in my own server, i deactivated them for you
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\plugins/disabled
Just copy paste them back in the plugin folder to activate them back.

[L4D2] Defib using bots.smx
Bot will auto defib any dead players if they own a defib.

scavengebotsds.smx
Allow bots to hunt and fill gascan on Dead center and many custom maps (Dark carnival Remix for exemple)

fortspawner.smx
Admin menu that give permission to spawn/delete any items like cars or bigger stuff like bridge or stairs: say "!fortspawn_menu" for more info i redirect you the creator page
https://forums.alliedmods.net/showthread.php?p=1208693

helicopter_l4d2.smx
Anyone: type "!h" to spawn a copter with missile and gatling (very powerful)

l4d_fyzb_en_v20.smx
Anyone: type "!fyzb" to be able to jump like a hunter (walk + jump)

l4d_gun_cabinet.smx
Admin: type "!gun_cabinet" to open a menu to spawn cabinet full of guns
CAUTION it will be saved forever on the map even if you reload/restart server
to remove it type in console "sm_gun_cabinet_wipe" the cfg file will be erased.
CAUTION can cause CRASH on some custom maps!!

l4d_lamp.smx
Admin: type "!lamp" to open a menu to spawn any kind of working lamp if you're scared in dark. Can be saved permanently on maps.

l4d_machine.smx
Anyone: type "!machine" to spawn an automated minigun that will kill every infected passing in their sight. Extremely powerful.
CAUTION can cause CRASH on some custom maps!!

l4d2_fireworks.smx
Fireworks will be more beautiful.

lerptracker.smx
Will show lerps of anyone when the player connect or change it, anyone can type "!lerps" to check it

advertisements.smx
Send a message of your choice every minutes in chat (you can config this message in config folder - advertissement.txt)

l4d_randomize_tank_witch_settings.smx
Change the tank and witch speed and HP (config in cfg/sourcemod)

Not installed but you might use BOT improvement:
https://forums.alliedmods.net/showthread.php?p=2804907
Director config (infected spawn setting)
To config your own director (spawning rate and more..) go to this folder
steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\cfg\sourcemod
and open VScriptDirectorUnlocker.cfg

Here you can write new value to spawn more or less infected like my exemple below:

Here i will have 8 Special Infected at once maximum and maximum 2 of each type, but you can add 10 or 15 SI and 0 spitter or 4 boomer for exemple..the possibilities are infinite.

Go to this link to see more of this director option (CAUTION it may cause laggs and bugs if you touch something without knowing.)

https://developer.valvesoftware.com/wiki/L4D2_Director_Scripts#DirectorOptions

If you don't do anything the director will have défaut settings.
Running the same server multiple times
Yes it is possible to run the script.bat multiple time as long your ports are opens, it will auto select a free port:



If your connection and computer can handle it and if you have enough friends then you can host up to 192 players on 6 different servers............and even more

All the server will have the same plugins but they will all be on different IP.
SteamCMD servers
This is not necessary for your own server if you use L4D2 Dedicated server!

You can have multiple server with the exact same installation process as above by downloading the SteamCMD instead of the L4D2 dedicated server, why is it useful? because there you can do complete different server instead of launching the same one with same setting (make a survival one, a coop one, a versus one for example..)

Installation instruction and all details:
https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD

This very usefull guide, with much more details:
https://steamoss.com/sharedfiles/filedetails/?id=276173458

Here a quick and simple installation instruction:

First of all, unzip and run the SteamCMD.exe somewhere, anywhere, i choose to put it in the same directory of my dedicated server.

Then an CMD box will appear asking you some stuff, first it ask you how you want to login, just login anonymously, type:

login anonymous


Now it will ask you the installation directory and the game server you want to install, just type this:

This one you need to change D:\Games.. to your OWN directory
force_install_dir D:\Games\steamapps\common\Left 4 Dead 2 Server 02
and then this
app_update 222860 validate

This is my directory i have multiple servers.


Wait for the process to download and install everything, it can take a while, when it's finished just quit the box.

Now your new server is created you just need to do all the step above for the main installation but instead of using Left 4 Dead 2 Dedicated server you will now use this new server (you can copy paste all file in addons / cfg and the script.bat if you already installed them)
Don't forget to remove firewall restriction from it.

This to update and install more CMD servers, just put it in your steamCMD directory.
https://drive.google.com/file/d/1Yd3gRoLFrMW1iIX5qqgp2wKNU_q_UoJS/view?usp=sharing
Then config the 3 red bubble, and press update/install.



Here are mine as exemple;
476 Comments
**DeiRowtag  [author] 20 Dec, 2024 @ 9:47am 
@twitch it should be automatically created
미국산고래 20 Dec, 2024 @ 7:10am 
There seem to be a lot of errors.
Is there anyone available yet?
미국산고래 20 Dec, 2024 @ 7:08am 
The list of servers shows up to 8people for access.
twitch.tv/CyberZoio 18 Dec, 2024 @ 11:18am 
Do I need to create the VScriptDirectorUnlocker.cfg director file having only sourcemod installed or is it generated by some additional smx plugin?
**DeiRowtag  [author] 10 Nov, 2024 @ 12:23pm 
i do not know the mutation name tho if you find it you can just add it
Atunes Cleo 10 Nov, 2024 @ 6:45am 
Here:
{LINK REMOVED}
Atunes Cleo 10 Nov, 2024 @ 5:39am 
Good morning, sorry for the delay.
I'm going to create from scratch the server, but as far as I remember, you could change to a mutation depending on the number we put in the configuration.
https://steamoss.com/app/550/discussions/0/35221584438977259/
But the tank run does not appear there
**DeiRowtag  [author] 9 Nov, 2024 @ 9:22am 
gotta see if that mutation have a specific name you can add it into the server.cfg
Atunes Cleo 9 Nov, 2024 @ 8:49am 
good morning, I want to make a dedicated server exclusively for tank run.
But at the moment of changing mutation I don't see the tank run option.
Do I need the tank rush plugin to make it tank run only?
**DeiRowtag  [author] 29 Sep, 2024 @ 5:59am 
Try connecting through ip, make sure in the server console (not the game) you have the required slots open