Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A reliable Left 4 Dead 2 dedicated server depends on two things: a correctly placed server.cfg and a launch command that actually loads it. The file controls the server name, passwords, public or LAN visibility, lobby behavior, map rotation, game modes, file checks, logging, and voice chat. This guide provides a safe baseline and explains which values must change for private groups, modded communities, or public internet play.

Where server.cfg goes and how it is loaded

Create a plain-text file named server.cfg in the server installation’s left4dead2/cfg/ directory. The complete relative path is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
left4dead2/cfg/server.cfg

On Windows, this is inside the folder where the dedicated server was installed. On GNU/Linux, it is inside the game directory used by your SteamCMD installation. The filename is case-sensitive on Linux, and it must end in .cfg, not .cfg.txt.

Loading is explicit. Start the server with +exec server.cfg; add a map and mode when you want a predictable first session:

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
+exec server.cfg +map c1m1_hotel coop

If a setting appears to have no effect, first verify that the launch command targets the same installation containing the file. A second server directory, a different SteamCMD instance, or a startup script that omits +exec server.cfg can make a correct file look broken.

A safe baseline configuration

Save the following as a starting point. Change the password, hostname, access policy, and consistency options to match your community rather than copying every value blindly.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
// Identity and access
hostname "My L4D2 Server"
rcon_password "generate-a-long-unique-secret"
sv_password ""                 // Set a value for private play

// Public or LAN behavior
sv_lan 0
sv_allow_lobby_connect_only 0
sv_pausable 0

// Rotation and mode policy
mapcyclefile "mapcycle.txt"

// Security and file consistency
sv_cheats 0
sv_consistency 1
// sv_pure 2                    // Optional stricter file policy

// Logging
sv_logfile 1
sv_logbans 1

// Communication
sv_voiceenable 1
sv_alltalk 0

The comments are valid configuration comments. Keep the RCON secret out of public screenshots, repositories, guides, and support tickets. Generate a long, unique value that is not reused for another service.

Identity and access settings

hostname

hostname is the name shown to players in the server browser and connection dialogs. Use a name that identifies the community or purpose without implying an access level the server does not enforce.

rcon_password

rcon_password protects remote console access. Anyone who obtains it may execute administrative commands, so it deserves a unique secret and restricted distribution. Do not confuse RCON authentication with the player password: RCON is for administration, while sv_password controls who may join.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

sv_password

An empty value, sv_password "", leaves the server open to players who can reach it. Set a non-empty value for a friends-only or event server:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sv_password "your-private-session-password"

Players must enter that password when connecting. A private password does not replace firewall rules or an RCON secret; it only adds the game’s join check.

Public, LAN, and lobby-only behavior

Internet visibility with sv_lan

Use sv_lan 0 for the normal internet-facing dedicated-server configuration. LAN mode changes visibility and authentication behavior and is intended for a local network rather than ordinary public matchmaking.

sv_lan 0

Choose sv_lan 1 only when you deliberately want a LAN server. If an internet server is unexpectedly invisible, checking this value is one of the first diagnostics.

Allowing direct connections

sv_allow_lobby_connect_only determines whether a matchmaking lobby is required. Set it to zero to permit direct connections:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
sv_allow_lobby_connect_only 0

With a value of 1, players are restricted to lobby-mediated joins. That can be useful for a controlled matchmaking workflow, but it prevents the direct-connect behavior many self-hosted communities expect. A public server that appears to work only when launched from a lobby should be checked for this setting.

Pausing

sv_pausable 0 prevents ordinary players from pausing the server. Set it to 1 only when your group has agreed on who may pause and how pauses are handled; otherwise an accidental pause can look like a frozen server.

Map rotation and game-mode selection

mapcyclefile

mapcyclefile names the text file used for multiplayer map rotation. The common default is:

mapcyclefile "mapcycle.txt"

Keep the named file in the expected game directory and make sure its map names are valid for the installed content. A malformed or missing rotation file can leave the server on an unexpected map or prevent the intended sequence from being used.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Starting a map in a specific mode

The startup map command can set the initial mode. Include both the map and mode when the mode matters:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
+map c1m1_hotel coop

Documented mode values include coop, realism, versus, survival, scavenge, and holdout. The mode belongs in the launch or map command rather than being assumed from the last session. For example:

Purpose Example command Result
Co-op campaign +map c1m1_hotel coop Starts the campaign map in co-op.
Realism campaign +map c1m1_hotel realism Starts the map with realism rules.
Versus +map c1m1_hotel versus Starts a versus session.
Survival +map c1m1_hotel survival Starts survival mode on the selected map.
Scavenge +map c1m1_hotel scavenge Starts scavenge mode where supported by the map.
Holdout +map c1m1_hotel holdout Requests holdout mode where the installed build and content support it.

Not every map is appropriate for every mode. If a command falls back to another mode or fails to create the expected session, verify that the map and mode combination is supported by the installed game content and any server-side modifications.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security and file consistency

sv_cheats

Keep sv_cheats 0 on a normal public server. Enabling cheats changes gameplay and can permit commands that are unsuitable for an open community. Use a separate test instance when you need to investigate cheat-dependent behavior.

sv_consistency

sv_consistency controls whether clients with mismatched files are accepted. A value of 1 is a deliberate vanilla-oriented baseline, but modded communities may need a different policy. Changing it can affect custom campaigns, skins, scripts, and other content, so announce the rule to players and test the exact collection of files you intend to support.

sv_pure

sv_pure applies a stricter file policy when enabled. The baseline leaves it commented so the operator must choose consciously:

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
// sv_pure 2

Uncommenting a strict value may improve consistency for an unmodified server while rejecting client files required by a modded community. There is no universally correct value: decide whether vanilla integrity or custom content compatibility is the priority, then test a clean client and the clients using your approved mods.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Logging and voice communication

Operational and ban logs

sv_logfile 1 enables server information logging, and sv_logbans 1 records bans. Keeping both enabled gives administrators an audit trail when diagnosing crashes, connection disputes, or moderation actions. Confirm that the process has permission to write its log directory and rotate or archive logs so a long-running server does not exhaust disk space.

Voice settings

sv_voiceenable 1 enables in-game voice. With sv_alltalk 0, voice remains restricted by team where the game mode uses teams. Set sv_alltalk 1 only when you intentionally want players on opposing teams to hear one another:

Setting Value Effect
sv_voiceenable 1 Voice chat enabled.
sv_voiceenable 0 Voice chat disabled.
sv_alltalk 0 Uses team-restricted voice behavior.
sv_alltalk 1 Allows voice across team boundaries.

Networking rates and the tickrate warning

Do not advertise a reliable 100-tick L4D2 server simply by adding -tickrate 100. Valve Developer Community guidance says the -tickrate command-line parameter is unavailable in newer builds of several Source games, including Left 4 Dead and Left 4 Dead 2, and was disabled because changing tickrate could create timing problems. Treat that switch as unavailable unless the exact build you operate documents otherwise.

The same guidance identifies sv_minrate and sv_maxrate as controls for limiting client-requested data rates. Rate values are deployment-specific: bandwidth, hosting capacity, player count, and the server build all matter. Set and validate them for your environment rather than copying a number presented as a universal performance guarantee. The available documentation does not establish a benchmarked latency or player-capacity improvement for any particular rate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Installing and launching the dedicated server

The documented SteamCMD setup uses application ID 222860. Installation paths differ between Windows and GNU/Linux, but the important deployment relationship is the same: the executable, the left4dead2 directory, cfg/server.cfg, and the startup script must belong to the same instance.

  1. Install or update the dedicated-server files with SteamCMD application ID 222860.
  2. Open the installed game directory and create left4dead2/cfg/server.cfg if it does not already exist.
  3. Paste the baseline configuration, replace the RCON secret, and choose the password, consistency, voice, and mode policies.
  4. Save the file as plain text and verify that the operating system did not append an extra extension.
  5. Launch the server with +exec server.cfg; add +map and the desired mode when a deterministic start is required.
  6. Check the console output and log files for parse errors, missing maps, permission failures, or evidence that a different installation was launched.

Port selection and firewall or router rules are outside server.cfg, but they determine whether an otherwise correct internet server can be reached. Open and forward the ports required by your deployment, then test from a network that is not the same LAN. A local test can succeed even when external clients are blocked.

Configuration choices by server type

Decision Public community Private group Modded community
Internet or LAN sv_lan 0 sv_lan 0 for remote friends; LAN mode only for a local network sv_lan 0 unless the server is strictly local
Join path sv_allow_lobby_connect_only 0 for direct joins Direct joins plus a non-empty sv_password Direct joins unless the community intentionally requires lobbies
Cheats sv_cheats 0 Usually 0; use a separate test server for cheats Keep 0 unless the server’s rules explicitly require otherwise
Consistency Document a vanilla-oriented policy Choose for the group’s installed content Test sv_consistency and sv_pure against every approved mod
Voice Voice enabled, team-only by default Choose team-only or cross-team voice by agreement Document whether cross-team communication is part of the mod’s rules

Troubleshooting: when a setting appears not to work

The server starts with old values

  • Confirm the file is exactly left4dead2/cfg/server.cfg under the active installation.
  • Confirm the launch command contains +exec server.cfg and is not pointing to another game directory.
  • Check for spelling errors, unmatched quotation marks, or a second command later in the startup script that overrides the value.
  • Restart the server after editing; do not assume an already running map has re-read every startup setting.

Players cannot connect directly

  • Set sv_allow_lobby_connect_only 0.
  • For an internet server, verify sv_lan 0.
  • Check firewall, router forwarding, host port selection, and whether external testing is being performed from outside the LAN.
  • If the server is private, confirm that the player is using the current sv_password.

The wrong mode or map starts

  • Put the intended +map and mode in the actual launch command.
  • Check that mapcyclefile names the rotation file you edited.
  • Verify map spelling and that the selected mode is supported by the installed content.

Players are rejected after enabling consistency

  • Determine whether the client has custom files that conflict with the server policy.
  • For a modded community, test a documented sv_consistency or sv_pure policy rather than disabling checks without understanding the trade-off.
  • Use the server log to correlate the rejection with a file or content mismatch.

Final pre-publication checklist

  • The file is saved at left4dead2/cfg/server.cfg in the active installation.
  • hostname identifies the server and rcon_password is unique and private.
  • sv_password matches the intended public or private access policy.
  • sv_lan 0 is set for normal internet hosting.
  • sv_allow_lobby_connect_only 0 is set when direct connections are required.
  • mapcyclefile points to the rotation file you actually maintain.
  • The launch command includes +exec server.cfg and, when needed, +map plus a mode.
  • sv_cheats 0 is retained for ordinary public play.
  • Consistency and pure-file rules have been tested with the clients and mods you support.
  • sv_logfile 1 and sv_logbans 1 are enabled and writable.
  • Voice and cross-team communication settings match the server rules.
  • Firewall, router, and host-port settings have been tested from an external network.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.