How to Install Metamod:Source and CounterStrikeSharp on CS2
Install Metamod:Source and CounterStrikeSharp on your CS2 server: edit gameinfo.gi, check with meta list, and fix plugins after CS2 updates.
Series · part 2 of 4Your first CS2 server
In this guide 9 sections
To run plugins on a CS2 server you need two things. Metamod:Source is the loader: it starts inside the server and loads other add-ons. CounterStrikeSharp (CS#, often shortened to CSS) is the plugin framework on top of it: almost every CS2 plugin today is made for it. This guide installs both, in that order, and shows how to check that they run.
Quick steps#
- Stop the server.
- Unpack Metamod:Source 2.x (dev build) into
game/csgo. - In
game/csgo/gameinfo.gi, addGame csgo/addons/metamodunder theGame_LowViolenceline. - Unpack CounterStrikeSharp (with runtime) into
game/csgo. - Start the server and type
meta list: CounterStrikeSharp must be in the list.
The full instructions for each step are below.
What you need#
- A working CS2 dedicated server. No server yet? Start here:
- Windows: the Microsoft Visual C++ Redistributable (x64). Without it, CounterStrikeSharp won't load.
- Linux: the ICU library. On Ubuntu or Debian:
sudo apt install libicu-dev.
| Download | Which file | Where |
|---|---|---|
| Metamod:Source | The newest 2.x dev build for your system | Metamod:Source downloads (dev) |
| CounterStrikeSharp | The with-runtime build for your system (Windows or Linux) | CounterStrikeSharp releases |
CS2 changes often, so only the 2.x dev builds of Metamod work with it; the stable 1.x builds are for older Source games. CounterStrikeSharp needs a recent one: its docs ask for build 1467 or newer. The with-runtime build of CounterStrikeSharp includes .NET, which it runs on. On a first install you must use that one.
Install Metamod:Source#
1Stop the server
Stop the server completely before you change any files.
2Copy the files
Unpack the Metamod archive. It contains an
addonsfolder. Copy it intogame/csgo. You should now have:game/csgo/addons/metamod/game/csgo/addons/metamod.vdfgame/csgo/addons/metamod_x64.vdf3Edit gameinfo.gi
Open this file in a text editor:
game/csgo/gameinfo.giFind the
SearchPathsblock and the line that starts withGame_LowViolence. Add one new line right under it:game/csgo/gameinfo.gitextSearchPaths { Game_LowViolence csgo_lv // Perfect World content override Game csgo/addons/metamod Game csgo Game csgo_imported Game csgo_core Game coreOnly add the
Game csgo/addons/metamodline; don't change anything else. The top of the file says not to edit it, but this is the file to edit for Metamod.4Start and check
Start the server and type in its console:
bashmeta versionIf it prints the Metamod:Source version, Metamod is loaded. If it says Unknown command, see [Troubleshooting](#troubleshooting).
Install CounterStrikeSharp#
1Stop the server
Stop it again before copying.
2Copy the files
Unpack the with-runtime archive. It also contains an
addonsfolder: copy it intogame/csgoand let it merge with the Metamod folder that's already there. You should now also have:game/csgo/addons/counterstrikesharp/game/csgo/addons/metamod/counterstrikesharp.vdf3Start and check
Start the server and type:
bashmeta listCounterStrikeSharp should be in the list, roughly like this:
textListing 1 plugin: [01] CounterStrikeSharp (1.0.374) by RoflmuffinThen check CounterStrikeSharp itself:
bashcss_plugins listIt answers with the list of CS# plugins (empty for now). If both commands work, your server is ready for plugins.
What's where#
game/csgo/addons/
├── metamod/ ← the loader
│ └── counterstrikesharp.vdf ← tells Metamod to load CS#
└── counterstrikesharp/
├── configs/
│ ├── core.json ← CS# settings
│ ├── admins.json ← admins
│ └── plugins/ ← plugin settings, one folder each
├── gamedata/ ← data CS# needs to work with the current CS2 build
├── dotnet/ ← the .NET runtime
└── plugins/ ← your plugins go here, one folder eachSettings in core.json#
The main CS# settings are in addons/counterstrikesharp/configs/core.json. The defaults are fine; these are the ones worth knowing:
| Setting | What it does |
|---|---|
FollowCS2ServerGuidelines | Blocks things that break Valve's server rules. Leave it on (true) |
AutoUpdateEnabled | Updates gamedata by itself after CS2 updates. Leave it on |
PluginAutoLoadEnabled | Loads every plugin in plugins/ when the server starts |
PluginHotReloadEnabled | Reloads a plugin when you replace its .dll, without a restart |
PublicChatTrigger / SilentChatTrigger | The characters that start chat commands (! and / by default) |
After CS2 updates#
CS2 updates can break Metamod or plugins, because they work inside the game's code. When plugins stop working after an update, go through this in order:
- Check
gameinfo.gi. An update can put back the original file. If theGame csgo/addons/metamodline is gone, add it again. - Update Metamod. If
meta versionis unknown even with the line in place, download the newest 2.x dev build and copy it over the old one. - Update CounterStrikeSharp. Download the newest release and copy it over your install. Your config files aren't overwritten. Once CS# is installed, you can use the smaller build without runtime, but then you have to keep .NET up to date yourself; the with-runtime build is simpler.
- Update plugins last, when their authors release fixes.
If the server doesn't start at all after an update, rename game/csgo/addons to addons_off and start it. If it starts, the problem is in Metamod, CS# or a plugin, not in CS2.
Troubleshooting#
"meta" is an unknown command#
Metamod isn't loaded. In order:
- Check that the
Game csgo/addons/metamodline is ingame/csgo/gameinfo.gi, underGame_LowViolence, and that an update didn't remove it. - Check that
game/csgo/addons/metamod/exists (notaddons/addons/metamod/). - Download the newest Metamod 2.x dev build; old builds stop working after CS2 updates.
meta list doesn't show CounterStrikeSharp#
- Check that
addons/metamod/counterstrikesharp.vdfexists. If it's missing, copy CounterStrikeSharp again and let the folders merge. - Windows: install the Visual C++ Redistributable (x64).
- Linux: install
libicu-dev(orlibicu/icu-libs, depending on the distribution). - First install? Make sure you used the with-runtime build.
CounterStrikeSharp loads, but every plugin fails after an update#
The game changed and the gamedata is old. Update CounterStrikeSharp to the newest release, and leave AutoUpdateEnabled on so it can fix this by itself next time.
The server crashes on start with Metamod#
Usually Metamod and CS2 don't match after an update. Install the newest Metamod dev build. If it still crashes, start with addons renamed to find out what causes it.
FAQ#
Do I need Metamod for CounterStrikeSharp?#
Yes. CounterStrikeSharp is a Metamod plugin: Metamod must be installed and loaded first.
Is CounterStrikeSharp the same as SourceMod?#
No. SourceMod is for CS:GO and older Source games, and doesn't support CS2. CounterStrikeSharp is the main plugin framework for CS2; plugins are written in C#.
Will plugins get my server banned?#
The framework won't. Some plugins can: Valve bans the GSLT of servers that give players skins, knives, gloves or ranks they don't own. Keep FollowCS2ServerGuidelines on and don't install skin changers.
Do players need to install anything?#
No. Everything runs on the server.
Next steps#
Metamod and CounterStrikeSharp are running. Now add plugins:
How to Install CS2 Plugins (CounterStrikeSharp)Install CounterStrikeSharp plugins on your CS2 server: where the files go, how to configure them, css_plugins commands and fixes when a plugin won't load.Read the guide- Browse CS2 plugins in the plugin library
