How to Set a Password on Your Left 4 Dead Server

Learn how to password protect your Left 4 Dead server for private sessions and restricted access.

Setting a server password restricts access to only players who know the password. This is useful for private campaign runs with friends, community events, or competitive practice sessions.

Setting Your Server Password

Open the XGamingServer panel

Log in to the XGamingServer panel and stop your Left 4 Dead server.

Open server.cfg

In the sidebar, go to Files and navigate to left4dead > cfg. Open server.cfg.

Set the password

Add or update the sv_password line:

sv_password "YourServerPassword"

Make sure the password is enclosed in double quotes.

Save and restart

Click Save and start your server.

Players will now be prompted to enter the password when connecting through the server browser or via direct connect.

How Password Protection Works

  • Server browser — Your server still appears in the Steam server browser, but with a lock icon indicating it requires a password.
  • Console connect — Players can include the password in their connect command: connect 198.137.23.46:27015; password YourServerPassword
  • Steam invites — Friends who receive a Steam game invite will still need to enter the password when joining.

Removing the Password

Stop your server

Stop your server from the XGamingServer panel.

Clear the password

Open server.cfg and either remove the sv_password line entirely, or set it to empty:

sv_password ""

Save and restart

Click Save and start your server.

Your server will now be open to anyone.

Setting a Password via RCON

If you have RCON access, you can set or remove the password while the server is running:

To set a password:

rcon sv_password "NewPassword"

To remove the password:

rcon sv_password ""

📝 Note: Password changes made via RCON are temporary and revert on server restart or map change. For permanent changes, update server.cfg.

Server Password vs. RCON Password

Left 4 Dead has two separate passwords:

PasswordPurposeConfig Command
Server Password (sv_password)Controls who can join the serversv_password "password"
RCON Password (rcon_password)Controls who can manage the server remotelyrcon_password "password"

These are completely independent. Setting a server password doesn't affect RCON access, and vice versa. Always use different passwords for each.

💡 Tip: For private sessions with friends, set the password before your play session and share it over Discord or a private message. Remove it afterward if you want to keep the server open during off-hours.

If you get stuck at any time, you can join our Discord.

How is this guide?

40% Off — Limited TimeGet your Left 4 Dead server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page