# How to Configure Your Left 4 Dead Server (/docs/left-4-dead/configure-your-server)



import { Step, Steps } from 'fumadocs-ui/components/steps';

Left 4 Dead server configuration is managed through the `server.cfg` file and optional startup parameters. The server runs on the Source engine, so it uses standard Source dedicated server commands and ConVars.

Configuration File [#configuration-file]

The main configuration file is `server.cfg`, located in the `left4dead/cfg/` directory. This file is executed every time the server starts or a new map loads.

<div className="fd-steps">
  <div className="fd-step">
    Open the XGamingServer panel [#1-open-the-xgamingserver-panel]

    Log in to the [XGamingServer panel](https://panel.xgamingserver.com) and stop your Left 4 Dead server.
  </div>

  <div className="fd-step">
    Navigate to Files [#2-navigate-to-files]

    In the sidebar, click `Files`.
  </div>

  <div className="fd-step">
    Open server.cfg [#3-open-servercfg]

    Navigate to `left4dead` > `cfg` and open `server.cfg`. If the file doesn't exist, create it.
  </div>

  <div className="fd-step">
    Add your settings [#4-add-your-settings]

    Add or modify your desired settings (see the reference tables below).
  </div>

  <div className="fd-step">
    Save and restart [#5-save-and-restart]

    Click **Save** and start your server.
  </div>
</div>

Essential Server Settings [#essential-server-settings]

These are the most commonly configured settings for `server.cfg`:

| Command         | Description                           | Example                          |
| --------------- | ------------------------------------- | -------------------------------- |
| `hostname`      | Server name shown in the browser      | `hostname "My L4D Server"`       |
| `sv_password`   | Password required to join             | `sv_password "secret123"`        |
| `rcon_password` | Password for remote console access    | `rcon_password "admin123"`       |
| `maxplayers`    | Maximum player count                  | `maxplayers 8`                   |
| `sv_lan`        | LAN-only mode (0 = internet, 1 = LAN) | `sv_lan 0`                       |
| `sv_region`     | Server region for browser filtering   | `sv_region 0`                    |
| `sv_contact`    | Admin contact email                   | `sv_contact "admin@example.com"` |

Region Codes [#region-codes]

The `sv_region` value determines where your server appears in regional filters:

| Value | Region              |
| ----- | ------------------- |
| `0`   | US East             |
| `1`   | US West             |
| `2`   | South America       |
| `3`   | Europe              |
| `4`   | Asia                |
| `5`   | Australia           |
| `6`   | Middle East         |
| `7`   | Africa              |
| `255` | World (all regions) |

Gameplay Settings [#gameplay-settings]

| Command               | Description                                    | Default |
| --------------------- | ---------------------------------------------- | ------- |
| `sv_cheats`           | Enable cheat commands (0 = off, 1 = on)        | `0`     |
| `mp_friendlyfire`     | Enable friendly fire (0 = off, 1 = on)         | `0`     |
| `mp_autoteambalance`  | Auto-balance teams in Versus mode              | `1`     |
| `sv_alltalk`          | All players hear each other regardless of team | `0`     |
| `sv_pausable`         | Allow the game to be paused                    | `0`     |
| `sv_voiceenable`      | Enable voice chat                              | `1`     |
| `mp_disable_autokick` | Disable automatic idle kicks                   | `0`     |

Network and Performance Settings [#network-and-performance-settings]

| Command            | Description                                     | Recommended     |
| ------------------ | ----------------------------------------------- | --------------- |
| `sv_maxrate`       | Maximum bandwidth per client (bytes/sec)        | `0` (unlimited) |
| `sv_minrate`       | Minimum bandwidth per client (bytes/sec)        | `3500`          |
| `sv_maxupdaterate` | Maximum update packets per second to clients    | `30`            |
| `sv_minupdaterate` | Minimum update packets per second to clients    | `10`            |
| `sv_maxcmdrate`    | Maximum command packets per second from clients | `30`            |
| `sv_mincmdrate`    | Minimum command packets per second from clients | `10`            |
| `fps_max`          | Server tick rate cap                            | `300`           |
| `net_maxfilesize`  | Maximum file download size (MB)                 | `64`            |

> 💡 **Tip:** For the best experience, set `sv_maxupdaterate` and `sv_maxcmdrate` to `30` for standard servers. Higher values consume more bandwidth but provide smoother gameplay for clients with good connections.

Example server.cfg [#example-servercfg]

Here's a complete example configuration file:

```
// Server Identity
hostname "My Left 4 Dead Server"
sv_password ""
rcon_password "YourSecureRCON"
sv_region 0
sv_lan 0

// Player Settings
maxplayers 8
mp_friendlyfire 0
sv_alltalk 0
sv_voiceenable 1

// Network Settings
sv_maxrate 0
sv_minrate 3500
sv_maxupdaterate 30
sv_minupdaterate 10
sv_maxcmdrate 30
sv_mincmdrate 10

// Server Behavior
mp_disable_autokick 1
sv_pausable 0
sv_cheats 0
sv_consistency 1

// Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
```

Startup Parameters [#startup-parameters]

Startup parameters are configured in the `Startup` tab on the XGamingServer panel. Common parameters:

| Parameter     | Description                    | Example                         |
| ------------- | ------------------------------ | ------------------------------- |
| `+map`        | Starting map                   | `+map l4d_hospital01_apartment` |
| `+maxplayers` | Maximum player count           | `+maxplayers 8`                 |
| `+sv_lan`     | LAN mode                       | `+sv_lan 0`                     |
| `-port`       | Server port                    | `-port 27015`                   |
| `-tickrate`   | Server tick rate               | `-tickrate 30`                  |
| `-ip`         | Bind to a specific IP          | `-ip 0.0.0.0`                   |
| `+exec`       | Execute a config file on start | `+exec server.cfg`              |

> 📝 **Note:** Parameters with `+` set ConVars on startup. Parameters with `-` set engine options. The `+exec server.cfg` parameter ensures your config file runs on server start — without it, your settings in `server.cfg` might not load.

Additional Config Files [#additional-config-files]

You can create additional config files in the `left4dead/cfg/` directory for different purposes:

| File              | Purpose                                      |
| ----------------- | -------------------------------------------- |
| `server.cfg`      | Main configuration, runs on every map change |
| `autoexec.cfg`    | Runs once on server start before server.cfg  |
| `motd.txt`        | Message of the Day shown to joining players  |
| `mapcycle.txt`    | Map rotation list (one map per line)         |
| `banned_user.cfg` | Banned Steam IDs                             |
| `banned_ip.cfg`   | Banned IP addresses                          |

> 💡 **Tip:** Use `motd.txt` to welcome players to your server. You can include HTML formatting for a polished look. The MOTD appears as a popup when players join.

If you get stuck at any time, you can join our [Discord](https://discord.xgamingserver.com/).
