The best Left 4 Dead 2 server configuration for a friends-only group is a conservative, Internet-enabled server.cfg: keep sv_lan 0 and sv_cheats 0, select the running mode with mp_gamemode, set the challenge with z_difficulty, and launch with both +exec server.cfg and a valid +map. Stock co-op supports four human players; larger parties need an unreserved server plus extensions such as SourceMod, MetaMod, L4DToolZ, Left 4 Downtown, or Bebop.
This guide shows where the file goes, how to launch a dedicated server, which settings matter, how to host more than four players, and when managed hosting is easier than maintaining SteamCMD, port forwarding, and plugins yourself.
What file controls a Left 4 Dead 2 dedicated server?
The main configuration file is left4dead2/cfg/server.cfg. On a typical Windows installation, that may be a path such as E:L4D2left4dead2cfgserver.cfg. The file contains console variables, commonly called cvars, that the server reads when it starts.
Put one cvar on each line. Enclose values containing spaces in quotation marks, especially the server name and comma-separated mode lists. A line beginning with // is a comment and is ignored by the server.
// Friendly name shown in the server browser
hostname "Thursday Night Survivors"
// Internet server; use 1 only for a LAN-only session
sv_lan 0
Save the file as plain text with the exact name server.cfg. Windows Notepad can silently add a second .txt extension, so check that the filename is not actually server.cfg.txt. If a setting appears to do nothing, confirm that the file is in the active game’s left4dead2/cfg directory and that the launch command executes it.
What is a good baseline server.cfg for a normal group?
Start with this small configuration, then change only settings your group understands. It keeps a public Internet connection, ordinary co-op rules, voice enabled, and common game modes available without enabling cheats.
hostname "Thursday Night Survivors"
rcon_password ""
sv_lan 0
sv_cheats 0
sv_consistency 1
sv_allow_lobby_connect_only 0
sv_gametypes "coop,realism,survival,versus,scavenge"
mp_gamemode coop
z_difficulty Normal
sv_alltalk 0
sv_voiceenable 1
log on
rcon_password "" disables remote console authentication in this example. If you need RCON, replace the empty value with a long, unique password and do not post it in screenshots or chat. The configuration intentionally leaves out experimental player-limit commands; expanding co-op capacity is a plugin task rather than a single reliable stock cvar.
| Setting | What it controls | Recommended starting value |
|---|---|---|
hostname |
Name displayed to people browsing for the server | "Thursday Night Survivors" |
sv_lan |
Restricts the server to the local network when set to 1 | 0 for Internet play |
sv_cheats |
Allows cheat-protected commands | 0 for ordinary games |
sv_consistency |
How strictly clients’ files are checked against the server | 1 as a compatibility baseline |
sv_allow_lobby_connect_only |
Whether connections must come through a matchmaking lobby | 0 for direct or browser connections |
sv_gametypes |
Modes the server advertises as available | "coop,realism,survival,versus,scavenge" |
mp_gamemode |
Mode that runs when the map starts | coop |
z_difficulty |
Infected difficulty and pacing | Normal |
sv_alltalk |
Whether living and dead players can hear one another globally | 0 |
sv_voiceenable |
Server voice communication switch | 1 |
log |
Server logging | on |
How do I choose the game mode and difficulty?
mp_gamemode chooses what is running now; sv_gametypes only lists modes the server can offer to matchmaking or browser clients. Adding realism to sv_gametypes does not switch a current campaign to Realism. Set both deliberately.
Campaign co-op
Use mp_gamemode coop for the standard campaign with normal item and survivor rules. This is the safest default for a mixed-skill group.
Realism
Use mp_gamemode realism when the group wants the campaign’s tougher identification and damage rules. Include realism in sv_gametypes if players need to select it through a lobby or browser.
Versus, Survival, and Scavenge
The selectable mode names documented for dedicated hosting include versus, survival, and scavenge. Set the matching value in mp_gamemode, and list it in sv_gametypes when it should be available for matchmaking.
Realism Versus
realism_versus is also listed as a selectable mode. It combines the versus format with realism rules, so make sure every player understands the change before using it as the group’s default.
Difficulty values
The server cvar convention is Easy, Normal, Hard, and Impossible. Some interfaces label the upper settings as Advanced and Expert, but the configuration examples use the cvar values shown here.
- Easy: forgiving damage and pacing for new players.
- Normal: a practical mixed-skill starting point.
- Hard: substantially less forgiving; friendly-fire and resource decisions matter more.
- Impossible: intended for groups that already know the campaigns and can coordinate under severe pressure.
Change z_difficulty before loading the next map. If you alter it during a match, the new value may not affect every already-spawned entity until the next round or map.
How do I launch the server so friends can connect?
Start the dedicated executable with the game, port, configuration file, and first map specified. A representative Windows command is:
srcds.exe -console -game left4dead2 -ip 10.0.0.2 +port 27020 +hostip YOUR_DEDIIP +maxplayers 8 +exec server.cfg +map c2m1_highway
Replace 10.0.0.2 with the machine’s local address, YOUR_DEDIIP with its reachable public address when your setup requires it, 27020 with the port you intend to forward, and 8 with the slot count your server actually supports. The map name is an example; c1m1_hotel is the usual opening chapter of the first campaign, and campaign chapter names follow the same cXmY_... pattern.
The +exec server.cfg argument executes the file at startup. The dedicated-server guidance also requires a valid +map; without an initial map, the server may start its process but refuse connections.
- Install the dedicated files. Use SteamCMD or the installation method supplied by your host, and confirm that the executable can see the
left4dead2directory. - Create the configuration. Save
server.cfginleft4dead2/cfg. - Choose an address and port. Use the host computer’s local address for
-ipand a free game port, commonly 27015 or a nearby value. - Forward the port. Create the matching UDP/TCP rule in the router or hosting panel before inviting anyone outside your network.
- Run the command. Watch the console for the map load and for the configuration values being applied.
- Test locally first. Join from the host or another machine on the same network, then test from an outside connection.
Do not copy the sample address literally. A private address such as 10.0.0.2 works only inside the local network; friends on the Internet need the externally reachable address or the host panel’s connection details.
Which ports and network settings matter?
The default game port is commonly 27015, although servers may use a range such as 27015–27020 or another free port selected by the administrator. Forward the exact port in use, not merely the default, and allow the same port through the operating system firewall.
- Internet group: set
sv_lan 0. - LAN-only session: set
sv_lan 1and have everyone connect from the same local network. - Direct connections: keep
sv_allow_lobby_connect_only 0so browser or console joins are not rejected. - Port conflict: choose another port if a second game server or application already owns the selected one.
If the server appears in the local browser but not to remote friends, check the public address, router forwarding, firewall rule, and whether the server is actually listening on the port specified by +port. A successful local join does not prove that Internet routing is configured.
How can I host more than four co-op players?
Vanilla co-op, Survival, and Scavenge are documented as supporting no more than four human players plus bots. Raising +maxplayers alone does not turn a stock campaign into an eight-player server.
Groups larger than four need an unreserved server and server extensions or plugins. Commonly used components include SourceMod, MetaMod, L4DToolZ, Left 4 Downtown, and Bebop. These tools change slot handling and may provide commands for replacing bots, adding survivors, or controlling joins.
What changes for players after the fourth slot?
The server cannot remain lobby-reserved once the group exceeds the normal co-op capacity. The Steam configuration guidance says to unreserve it, then have later players join through the server browser or a direct console connection rather than expecting a normal four-player lobby invitation to manage every slot.
- Install a compatible MetaMod/SourceMod stack and the chosen player-capacity extension.
- Set the server’s slot count to the capacity your extension supports; do not advertise more slots than the host can run reliably.
- Start a map and unreserve the server using the extension’s documented command or configuration.
- Have the first four players join normally, then give remaining players the server’s address and port for browser or console joining.
- Test a full round, including a map transition, before making the server a regular event.
Eight- to 16-player co-op is a deliberately modded format, not a one-line vanilla setting. More survivors can make special infected encounters easier or chaotic, increase CPU and network load, and expose plugin bugs that never appear with four players.
What maintenance does a larger server require?
- Keep MetaMod, SourceMod, and each extension compatible with the current game build.
- Back up
addons,cfg, and custom campaign files before updates. - Read plugin change notes after a game update; a broken extension can prevent the server from starting or remove slots.
- Provide an administrator with a kick, ban, map-change, and restart method.
- Set expectations with players that custom capacity may not match ordinary matchmaking behavior.
Should I use RCON, SourceMod, or a host panel?
Choose administration tools based on who will operate the server and how often rules change. They solve different problems rather than representing interchangeable versions of the same feature.
| Administration method | Best for | Advantages | Costs or risks |
|---|---|---|---|
| RCON | A technically comfortable owner who needs remote console access | Works without an in-game admin menu; can issue server commands remotely | Requires protecting a password; a leaked credential gives broad control |
| SourceMod and MetaMod | Groups needing map votes, kick/ban controls, menus, or expanded slots | Extensible administration and plugin ecosystem | Framework and plugin updates must remain compatible |
| Managed host panel | Groups that prefer a web interface over server maintenance | Convenient restarts, map changes, mode and difficulty controls, and plan-based slots | Recurring fee, provider-specific limits, and less control over files or plugins |
Leave rcon_password empty if no one needs RCON. If you enable it, use a password unrelated to Steam, email, or other accounts and rotate it whenever an administrator leaves the group.
Why can’t my friends connect directly?
Most direct-connection failures come from one of four mismatches: LAN mode, the wrong port, a blocked firewall or router rule, or a server that has not loaded a map and configuration.
The server is LAN-only
Check the console output and server.cfg for sv_lan 1. Change it to sv_lan 0, restart the server, and test from outside the local network.
The forwarded port does not match
Compare the router rule, firewall rule, +port argument, and the port given to friends. Forwarding 27015 while the command uses 27020 will make the server unreachable even though the process is running.
The server is waiting for a map
Confirm that the launch command includes a real map after +map. A typo in a chapter name can leave the process alive without accepting players.
Lobby-only connections are enabled
If you want browser or console joins, set sv_allow_lobby_connect_only 0. A value of 1 restricts entry to matchmaking-lobby connections.
Files fail the consistency check
sv_consistency 1 favors strict file matching. This is useful for exposing mismatched files, but custom campaigns or other non-stock content may require a policy that permits the files your group intentionally uses. Change the policy only after identifying which custom files are involved.
The server appears but a friend is kicked on join
Check the active mode, available slots, and plugin logs. A stock co-op server cannot supply a fifth human slot, and an expanded server may have an extension that failed to load after an update.
How should I configure voice, cheats, and consistency?
For an ordinary friends-only server, keep sv_cheats 0. Cheat mode changes the rules and can affect achievement-oriented play, so enable it only for a session where everyone agrees.
sv_voiceenable 1 leaves voice communication available. sv_alltalk 0 keeps the normal separation between living and dead players; setting it to 1 allows broader communication and can reveal information that the standard game withholds.
sv_consistency 1 is a sensible stock-content baseline. Custom-content groups should decide whether strict matching is worth the join failures it can cause. Do not disable consistency merely to hide an unknown error; identify the conflicting file and document the exception for every player.
What should I compare when deciding between self-hosting and managed hosting?
Self-hosting gives the group control over files, ports, plugins, and restart timing. A managed service trades some control for a web panel and infrastructure that someone else maintains.
| Decision factor | Self-hosted dedicated server | Managed server |
|---|---|---|
| Upfront and recurring cost | Uses your own hardware and connection; electricity and maintenance are your responsibility | Usually a recurring plan fee; exact price and slot limits depend on the provider |
| Network setup | You handle public addressing, router forwarding, and firewall rules | The provider generally supplies the reachable address and panel controls |
| Restarts and backups | You create scripts, schedules, and backups | Often available through the panel, subject to the provider’s features |
| Region and latency | Determined by your machine and Internet connection | Choose among the provider’s available locations |
| Player capacity | Stock co-op remains four; larger groups require compatible extensions | Slots are commonly selected by plan, but expanded co-op still depends on supported plugins |
| Plugin responsibility | You install, update, and troubleshoot every framework and extension | The provider may offer one-click tools or may restrict custom addons |
| Console administration | RCON or local console, configured by you | May include RCON, a web console, or both |
| Custom campaigns and consistency | You control files and the consistency policy | Check whether custom files are allowed and whether the host enforces a policy |
Self-hosting is a good fit when one person is comfortable with SteamCMD, port forwarding, backups, and plugin maintenance. A managed panel is practical when the group wants to change maps, restart quickly, and avoid exposing a home connection or maintaining a mod stack.
What is the safest way to change settings?
Change one related group of settings at a time and record the previous value. This makes a failed join or unexpected rule change diagnosable.
- Stop the server or schedule a restart between play sessions.
- Copy the current
server.cfgand any plugin configuration files. - Edit the cvar, preserving quotation marks and one-setting-per-line formatting.
- Restart with
+exec server.cfgand a valid map. - Confirm the value in the server console and test a private connection.
- Only then invite the full group or add another plugin.
Keep a short change log containing the date, setting, old value, new value, and reason. It is especially useful when a game update changes extension behavior.
What should a reliable group setup look like?
For four or fewer players, use the baseline file, sv_lan 0, sv_cheats 0, mp_gamemode coop, and z_difficulty Normal. Launch with +exec server.cfg and a known map, forward the selected port, and use direct joining only after local testing succeeds.
For five or more players, decide first whether the group accepts a modded format. Install and test the extension stack before game night, unreserve the server, and provide browser or console connection details for players beyond the normal four. If nobody wants to maintain those components, choose a managed server that explicitly supports the required slots and addons.
Frequently Asked Questions
Can I change the difficulty without restarting the Left 4 Dead 2 server?
You can issue a difficulty command from the console, but entities already spawned in the current round may retain their existing behavior. Restarting or changing maps is the dependable way to ensure the new difficulty applies consistently.
How do friends join a server that is not listed publicly?
Give them the server address and port, then have them use the game’s developer console with a connect command in the form connect address:port. They still need a reachable port and a server that has loaded a map.
Do all players need the same custom campaign files?
Yes, every client needs the campaign and dependent assets that the server expects. A consistency check can reject a client with mismatched files, while disabling checks does not download missing content or repair an incomplete installation.
What happens if a dedicated server crashes during a campaign?
Players normally lose the current session unless you have an administrator or host-panel restart process. Keep backups of configuration and plugin files, and test an automatic restart separately so a crash does not create a loop caused by a broken addon.
Is an eight-player co-op server officially supported by the unmodified game?
No. The documented stock limit is four human players in co-op, Survival, and Scavenge. Larger groups rely on server extensions or plugins and should expect different joining behavior and additional maintenance.