Left 4 Dead 2

Left 4 Dead 2

View Stats:
Tendie Mar 9, 2022 @ 6:20pm
How to host a public server?
So like many of you I HATE Lewd4Dead and other servers that add BS like "RPG" elements, buy commands and other nonsense... I came to the conclusion that the best option was to run my own dedicated server, so I downloaded L4D2 Dedicated Server, copied the custom campaign I want to play to the addons folder, ran it with the game open, Server shows under Steam Group Servers in main menu, trying to join it says session no longer available... try to create a lobby and select it as server results in a STEAM Validation Rejected error, found somewhere that you need to run the game first, then start the server, I closed and restarted both even though I had done it this way the first time, met with STEAM Validation Rejected again. Later on I found some ancient post from 2010 on some forum mentioning that this is because I can either play or host the server with my account, not both at the same time, made a secondary account, bought the game, added both accounts as friends, ran the server from a VM... it shows the local IP address as server's IP with all VMWare's network modes... (192.168....), it doesnt show under steam Group and I can't join via IP (failed after 10 tries), installed it on a secondary physical PC, ran it, shows local IP as server IP, can't join via IP (10 tries), doesn't show on steam group server either, reinstalled it on my main PC to see what IP does it have there.... local IP. AGAIN.
Enabled port forwarding from 27015 to 27020 as seen on some leddit post, tried again, same BS, no dice.... can someone point me in the right direction please?
Last edited by Tendie; Mar 9, 2022 @ 6:25pm
< >
Showing 1-3 of 3 comments
EmzElf Mar 20, 2022 @ 8:00am 
You don't need to buy any commands they're freely available on lots of websites to find, it's actually simple to set up via the Developer Console, you just open a map using the map commands. You type map and then one of the several map commands you can find googling,

A few you might have to find in the Developer Console for 1 or 2 campaigns as they might now be on any websites for some reason i know i have to find the ones for Crash Course and they're easy to identify which map by the code at the start like C2, C3, C4 etc... i suggest you put them all into Notepad.

First i would enable cheats before though because the next commands you'll need it enabled so enter sv_cheats 1 in the console from the main menu, then once you're in your map forward ports and type status to see your ip, server ip, ports and player id. This link may also be helpful in helping you set up the server https://help.steampowered.com/en/faqs/view/65A6-0A32-20EF-16E4

Then you can enter this...

Allow players to connect to your local server -
sv_allow_lobby_connect_only 0 or 1

This command, if set to 1, will only allow players to connect to your server from the
matchmaking lobby, and will not be able to connect directly
(e.g. through Steam invite or connect command).

If you want a player to be able to connect to your server mid-game, set this command
to 0. This allows connections via Steam invite, server browser and via the connect command. To get to the Server Browser enter openserverbrowser which should pop up as you type it.


Then make sure you know other commands too like bind F4 disconnect to quickly disconnect if you need to and the kick and kill commands in case you need to do that to any players, so kick #player name# eg; kick bill/zoey/louis and do the same for the kill command.

Then you can type respawn or respawn bill/zoey/louis or respawn_all if the game is unfair, someone is using cheat software to spawn things making you die or just killing players, and you should be all set :)
Last edited by EmzElf; Mar 20, 2022 @ 8:59am
EDSHOT Mar 23, 2022 @ 10:53pm 
dont install dedicated servers from steam client it causes too many problems.
you need to use steamcmd to download the l4d2 dedicated server.

once dedicated server is running and binded to an ip address (192.168.1.32) and port (27015) you logon your router and port forward 27015 for ip address 192.168.1.32

to create a lobby and force joining your server you have to run command
mm_dedicated_force_servers 0.0.0.0|192.168.1.32:27015

because joining directly doesnt work on pure and creating a lobby is easier with that command. you have to run the command with the 0.0.0.0|192.168.1.32:27015
part very important since this tells l4d2 that the server is behind NAT

you can look at my guide for more information since i cannot really just say how to fix everything with one little post
https://steamcommunity.com/sharedfiles/filedetails/?id=2718357873

also never toggle sv_cheats on a public server.
TrisXD Mar 24, 2022 @ 11:58am 
just search online game, not quick play
and i often play realism cuz it less moding
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Mar 9, 2022 @ 6:20pm
Posts: 3