> For the complete documentation index, see [llms.txt](https://docs.rhqnetwork.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rhqnetwork.biz/rhq-docs-en/game-hosting/l4d2.md).

# Left 4 Dead 2 server

Create and configure a Left 4 Dead 2 dedicated server on RHQ Game Hosting.

Your Left 4 Dead 2 server runs on our game panel (Pterodactyl). The first start downloads the game files through SteamCMD.

{% stepper %}
{% step %}

### Start the server

Open your server in the game panel and press **Start**. Wait until the console shows that the server is running.
{% endstep %}

{% step %}

### Allow direct connections

In the **Files** tab edit `left4dead2/cfg/server.cfg` and add `sv_allow_lobby_connect_only 0`. Without it players can only join through a lobby.
{% endstep %}

{% step %}

### Set the basics

In the same file set `hostname`, `sv_password` and `rcon_password`. Choose the game mode with `mp_gamemode` (for example `coop` or `versus`).
{% endstep %}

{% step %}

### Join

In Left 4 Dead 2 enable the developer console, then type:

```
connect YOUR_SERVER_IP:27015
```

{% endstep %}
{% endstepper %}

## Ports

| Port    | Protocol    | Use                      |
| ------- | ----------- | ------------------------ |
| `27015` | UDP and TCP | Game connection and RCON |

Your assigned ports are always visible in the panel and may differ from these defaults.

## Changing the map

Type in the **Console**:

```
changelevel c1m1_hotel
```

## Plugins

Install Metamod and SourceMod into `left4dead2/addons`, then add plugins to `addons/sourcemod/plugins`.
