This guide covers how to install SourceMod and MetaMod:Source on your Left 4 Dead 2 server, set up server admins, and manage plugins. For basic server configuration and connection instructions, see the L4D2 Server Setup Guide.
Step 1 — Install MetaMod:Source and SourceMod
SourceMod is the primary admin and plugin framework for Left 4 Dead 2. It requires MetaMod:Source as a dependency. Both must be installed by uploading files to the server's left4dead2/addons/ directory.
Download the Required Files
- MetaMod:Source — Download the latest stable build for Linux from sourcemm.net. Choose the package labelled Left 4 Dead 2 or the generic Source 2009/OB build.
- SourceMod — Download the latest stable build from sourcemod.net. Select the Linux package.
Install MetaMod:Source
- Extract the MetaMod archive on your local machine. It produces an
addons/folder. - Upload the contents of that
addons/folder intoleft4dead2/addons/on your server, merging with any existing files. - The key file placed is
left4dead2/addons/metamod.vdf, which tells the Source engine to load MetaMod.
Install SourceMod
- Extract the SourceMod archive. It also produces an
addons/folder and acfg/folder. - Upload both folders into
left4dead2/, merging with existing content. - The SourceMod files will be placed under
left4dead2/addons/sourcemod/.
Verify the Installation
- Start the server and monitor the console output in GPanel.
- Look for lines similar to:
L4D2: Loading MetaMod:Source v1.x.x L4D2: SourceMod 1.x.x loaded - Join the server and type
sm versionin the in-game console. If SourceMod is active, it will return the installed version number.
Step 2 — SourceMod Directory Structure
Understanding where SourceMod stores its files is essential for managing plugins and configuration.
| Path | Purpose |
|---|---|
left4dead2/addons/sourcemod/plugins/ |
Compiled plugin files (.smx). Drop plugins here to install them. |
left4dead2/addons/sourcemod/plugins/disabled/ |
Move a plugin's .smx here to disable it without deleting it. |
left4dead2/addons/sourcemod/configs/ |
Configuration files for admins, reserved slots, and plugin settings. |
left4dead2/addons/sourcemod/logs/ |
SourceMod and plugin log files. Check here first when troubleshooting plugin errors. |
left4dead2/addons/sourcemod/translations/ |
Language files for localised plugin output. |
Step 3 — Adding SourceMod Admins
Open left4dead2/addons/sourcemod/configs/admins_simple.ini in the GPanel file editor. Add admin entries in the format below, then restart the server.
// Format: "STEAM_0:X:XXXXXXXX" "flag-string" "password" "comment"
// Flag 'z' grants all permissions (superadmin)
"STEAM_0:1:12345678" "z"
STEAM_0:X:XXXXXXXX format in admins_simple.ini.
Common Admin Flags
| Flag | Permission |
|---|---|
z |
Full admin (all permissions) |
b |
Kick players |
c |
Ban players |
d |
Slay/harm players |
e |
Map changes |
f |
Change ConVars |
You can combine flags. For example, "bce" gives kick, ban, and map change permissions without full admin access.
Step 4 — Install SourceMod Plugins
SourceMod plugins are distributed as compiled .smx files. Popular plugins for Left 4 Dead 2 include admin tools, survivor bot control, ready-up systems, and difficulty modifiers.
- Download the
.smxfile for your chosen plugin. Many are available on the AlliedModders forums. - Upload the
.smxfile toleft4dead2/addons/sourcemod/plugins/. - If the plugin includes a configuration file (
.cfg), upload it toleft4dead2/cfg/sourcemod/(create the folder if it does not exist). - Restart the server. SourceMod automatically loads all
.smxfiles in the plugins directory on startup.
.smx file into left4dead2/addons/sourcemod/plugins/disabled/ and restart the server. This is also the recommended first step when troubleshooting plugin conflicts.
Verifying Loaded Plugins
After the server starts, you can check which plugins are loaded by typing the following in the server console (via GPanel Console tab) or in-game console as an admin:
sm plugins list
This lists all loaded plugins with their name, version, and status. Plugins that failed to load will be marked with an error indicator.
Related Articles
- L4D2 Server Setup Guide — Server.cfg configuration, GSLT tokens, game modes, and how to connect
- L4D2 Server Troubleshooting — Common issues with connections, addons, plugins, and server browser listing
- How to Upload Files via SFTP