# How to Use RCON on Your Left 4 Dead Server (/docs/left-4-dead/rcon)



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

RCON (Remote Console) is built into Left 4 Dead's Source engine and lets you run server commands remotely — either from the in-game console or from external RCON clients. It's essential for server administration.

Setting Up RCON [#setting-up-rcon]

<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">
    Open server.cfg [#2-open-servercfg]

    In the sidebar, go to `Files` and navigate to `left4dead` > `cfg`. Open `server.cfg`.
  </div>

  <div className="fd-step">
    Set the RCON password [#3-set-the-rcon-password]

    Add or update the RCON password:

    ```
    rcon_password "YourSecureRCONPassword"
    ```
  </div>

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

    Click **Save** and start your server.

    > 📝 **Note:** Without an RCON password set, RCON is disabled entirely. You must set a password to use any RCON commands.
  </div>
</div>

Using RCON In-Game [#using-rcon-in-game]

<div className="fd-steps">
  <div className="fd-step">
    Connect to your server [#1-connect-to-your-server]

    Join your Left 4 Dead server.
  </div>

  <div className="fd-step">
    Open the developer console [#2-open-the-developer-console]

    Press the **tilde key** (`~`) to open the console.
  </div>

  <div className="fd-step">
    Authenticate [#3-authenticate]

    Type your RCON password:

    ```
    rcon_password YourSecureRCONPassword
    ```
  </div>

  <div className="fd-step">
    Run commands [#4-run-commands]

    Prefix any command with `rcon`:

    ```
    rcon status
    rcon changelevel l4d_hospital01_apartment
    rcon kick "PlayerName"
    ```
  </div>
</div>

Using an External RCON Client [#using-an-external-rcon-client]

You can manage your server without being in-game using third-party RCON clients:

<div className="fd-steps">
  <div className="fd-step">
    Download an RCON client [#1-download-an-rcon-client]

    Popular options include:

    * **Source RCON** — Lightweight and free
    * **HLSW** — Full-featured server management tool
    * **mcrcon** — Command-line RCON client
  </div>

  <div className="fd-step">
    Enter connection details [#2-enter-connection-details]

    * **Host:** Your server IP (from the XGamingServer panel sidebar)
    * **Port:** Your server port (default `27015`)
    * **Password:** The RCON password from `server.cfg`
  </div>

  <div className="fd-step">
    Connect and send commands [#3-connect-and-send-commands]

    Once connected, you can send any server command directly without the `rcon` prefix.
  </div>
</div>

RCON Command Reference [#rcon-command-reference]

Server Information [#server-information]

| Command        | Description                                                           |
| -------------- | --------------------------------------------------------------------- |
| `rcon status`  | Show server status, all players, Steam IDs, IPs, and connection times |
| `rcon stats`   | Show server performance stats (CPU, FPS, players)                     |
| `rcon version` | Show the server version                                               |
| `rcon maps *`  | List all available maps on the server                                 |

Player Management [#player-management]

| Command                          | Description                                         |
| -------------------------------- | --------------------------------------------------- |
| `rcon kick "PlayerName"`         | Kick a player by name                               |
| `rcon kick #UserID`              | Kick a player by their user ID (from `rcon status`) |
| `rcon banid <minutes> <SteamID>` | Ban a Steam ID (0 = permanent)                      |
| `rcon banip <minutes> <IP>`      | Ban an IP address (0 = permanent)                   |
| `rcon removeid <SteamID>`        | Unban a Steam ID                                    |
| `rcon removeip <IP>`             | Unban an IP address                                 |
| `rcon writeid`                   | Save Steam bans to `banned_user.cfg`                |
| `rcon writeip`                   | Save IP bans to `banned_ip.cfg`                     |

Map and Game Management [#map-and-game-management]

| Command                   | Description                           |
| ------------------------- | ------------------------------------- |
| `rcon changelevel <map>`  | Change to a specified map             |
| `rcon map <map>`          | Restart the server on a specified map |
| `rcon hostname "name"`    | Change the server name                |
| `rcon sv_password "pass"` | Set or change the join password       |
| `rcon maxplayers <num>`   | Change the maximum player count       |
| `rcon say "message"`      | Send a message to all players         |

Server Control [#server-control]

| Command                | Description                                                |
| ---------------------- | ---------------------------------------------------------- |
| `rcon quit`            | Shut down the server gracefully                            |
| `rcon restart`         | Restart the current map                                    |
| `rcon exec <filename>` | Execute a config file (e.g., `rcon exec server.cfg`)       |
| `rcon heartbeat`       | Force the server to re-register with Steam's master server |

Ban Management [#ban-management]

Bans in Left 4 Dead use either Steam IDs or IP addresses.

Banning a Player [#banning-a-player]

1. Get the player's info with `rcon status`:

```
rcon status
```

This outputs a table with each player's user ID, name, Steam ID, and IP.

2. Ban by Steam ID (recommended — survives IP changes):

```
rcon banid 0 STEAM_0:1:12345678
```

The first number is ban duration in minutes. `0` means permanent.

3. Save the ban list:

```
rcon writeid
```

Unbanning a Player [#unbanning-a-player]

```
rcon removeid STEAM_0:1:12345678
rcon writeid
```

> 💡 **Tip:** Always use `rcon writeid` after banning or unbanning. Without it, ban changes are lost when the server restarts. The `writeid` command saves the ban list to `banned_user.cfg`.

Security Best Practices [#security-best-practices]

* **Use a strong RCON password** — At least 16 characters with mixed case, numbers, and symbols. RCON gives full control over your server.
* **Never share RCON credentials publicly** — A compromised password means an attacker can kick all players, change settings, or shut down the server.
* **Use a different password from sv\_password** — The [server join password](/docs/left-4-dead/set-a-password) and RCON password should always be different.
* **Monitor server logs** — Check `Console` on the XGamingServer panel for any unauthorized RCON attempts.
* **Change the password if compromised** — If you suspect an RCON password leak, change it immediately in `server.cfg` and restart.

> 📝 **Note:** You can also use the `Console` tab on the XGamingServer panel for direct server access without RCON. RCON is most useful for managing the server while in-game or from external tools.

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