This guide shows you how to install MetaMod:Source and SourceMod on your Left 4 Dead 2 server and make yourself an admin. After that you open the admin menu in the game, kick players, change maps and install your own SourceMod plugins. Commands and permissions come from the AlliedModders docs, the developers of SourceMod.

Before you start

  • A Left 4 Dead 2 server in your customer panel. After startup the console shows "VAC secure mode is activated".
  • Your SteamID or the link to your Steam profile.
  • A recent backup under Backups & recovery.

Install MetaMod:Source and SourceMod

SourceMod runs on top of MetaMod:Source. The panel installs both from the official stable Linux builds.

  1. Open Version, plugins & mods → Mods.
  2. The "SourceMod admins" area is at the top.
  3. Click "Install SourceMod". MetaMod:Source is installed as a dependency.
  4. Wait until the panel reports that the installation is complete.
  5. Restart the server.
  6. Type meta version and then sm version in the panel console. Both commands must print a version.

The files go to left4dead2/addons/metamod/ and left4dead2/addons/sourcemod/.

Add yourself as admin

The panel only unlocks the admin list after the installation.

  1. Enter your ID in the "SteamID or Steam profile link" field. Allowed are STEAM_X:Y:Z, [U:1:N], the SteamID64 or a steamcommunity.com/profiles/ or /id/ link.
  2. Use "Name / comment (optional)" for a note of up to 120 characters.
  3. Under "Permissions", pick either "Full admin (z)" or single permissions.
  4. Click "Save admin".
  5. Type sm_reloadadmins in the console or restart the server. SourceMod answers with [SM] Admin cache has been refreshed.

The panel writes its entries into its own block in left4dead2/addons/sourcemod/configs/admins_simple.ini. Other entries in that file stay unchanged.

Available permissions

The letters are SourceMod flags. The panel shows them next to each permission.

Flag Permission in the panel
a Reserved slot
b Open admin menu
c Kick players
d Ban players
e Remove bans
g Change map
h Change server cvars
k Start votes
m Execute RCON
z Full admin

According to AlliedModders, b is required for all admins. z unlocks every permission. For moderators, b, c and d are often enough.

Open the admin menu in the game

Join your server and open the game's developer console. Type sm_admin there. The admin menu appears.

SourceMod commands also work in the chat. A leading ! runs the command, so sm_admin becomes !admin in the chat. With / instead of !, other players do not see the command.

Install your own SourceMod plugins

  1. Download the plugin as an .smx file from its page. Check there whether it needs extra files.
  2. Open Files & worlds → Files and upload the file to left4dead2/addons/sourcemod/plugins/.
  3. Change the map or restart the server.
  4. Check with sm plugins list in the console that the plugin shows up.

SourceMod does not load plugins in the plugins/disabled subfolder. Move a plugin there to turn it off. Logs are in left4dead2/addons/sourcemod/logs/.

Common errors

Message or problem
Cause
Fix
meta version is not recognised
MetaMod:Source is not loaded.
Restart the server. If that does not help, repeat the installation in the panel.
meta list shows Listing 0 plugins
According to AlliedModders, sourcemod.vdf is missing in addons/metamod, or the Windows build of SourceMod is on the server.
Reinstall SourceMod through the panel. The panel uses the Linux build.
The admin menu does not open
The admin list was not reloaded after saving, or the SteamID is wrong.
Type sm_reloadadmins in the console and check the ID in the panel.
"The panel block in admins_simple.ini is damaged."
Someone edited the panel's block in the file by hand.
Check the file in the file manager or restore it from the backup. The panel changes nothing in that case.
A plugin shows as <Failed> in the list
The plugin does not fit or a dependency is missing.
sm plugins info <number> shows the reason. The number is listed in sm plugins list.

If an error persists, copy the first error lines from the console and open a support ticket.

Next steps

How to change maps and set the game mode is covered in Change map and game mode. The basic setup is in Left 4 Dead 2 server setup. Need a server first? Order one on the Left 4 Dead 2 order page.