Skip to main content

Download

https://www.leaderos.net/plugin/cs2

Source Code

https://github.com/leaderos-net/cs2-leaderos-connect

Requirements

This plugin requires CounterStrikeSharp to be installed.

Installation

1. Download the plugin

Download the latest release as a ZIP file from the link below and extract it: https://www.leaderos.net/plugin/cs2

2. Upload the plugin

Copy the LeaderosConnect folder from the extracted ZIP into your server’s CounterStrikeSharp plugins directory:
game/csgo/addons/counterstrikesharp/plugins/LeaderosConnect/
The folder should contain:
LeaderosConnect/
├── LeaderosConnect.dll

3. Configure the plugin

Start your server once to auto-generate the config file, then open it:
game/csgo/addons/counterstrikesharp/configs/plugins/LeaderosConnect/LeaderosConnect.json
Fill in your credentials:
{
    "WebsiteUrl":        "https://yourwebsite.com",
    "ApiKey":            "YOUR_API_KEY_HERE",
    "ServerToken":       "YOUR_SERVER_TOKEN_HERE",
    "DebugMode":         false,
    "CheckPlayerOnline": true,
    "ConfigVersion":     1
}

4. Required server configuration

Add this to your game/csgo/cfg/server.cfg:
sv_hibernate_when_empty 0
Without this, the server enters sleep mode when no players are connected and stops processing game ticks. This prevents commands from executing on an empty server.

5. Restart your server

Restart your server. The plugin is now active. Run leaderos_status in the server console to confirm everything is working.

Configuration

OptionDescription
WebsiteUrlThe URL of your LeaderOS website (e.g., https://yourwebsite.com). Must start with https://.
ApiKeyYour LeaderOS API key. Find it on Dashboard > Settings > API.
ServerTokenYour server token. Find it on Dashboard > Store > Servers > Your Server > Server Token.
DebugModeSet to true to enable verbose debug logging, or false to disable it.
CheckPlayerOnlineSet to true to queue commands for offline players and deliver them on next login. Set to false to execute commands regardless of whether the target player is online.

Console Commands

All commands require @css/root admin permission when run by an in-game player. They can be run freely from the server console (RCON).
CommandDescription
leaderos_statusDisplays the current connection state, socket ID, channel, last pong time, and queue size.
leaderos_reconnectForces an immediate WebSocket disconnection and reconnection.
leaderos_debugToggles debug mode on or off at runtime.