Skip to main content

Download

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

Source Code

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

Installation

1. Download the addon

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

2. Upload the addon

Copy the leaderos_connect folder from the extracted ZIP into your server’s addons directory:
garrysmod/addons/leaderos_connect/

3. First restart

Restart your server. This will generate the config file at:
garrysmod/addons/leaderos_connect/lua/leaderos/config.lua

4. Configure the addon

Open config.lua and fill in your credentials:
LeaderOS.Config = {
   WebsiteURL   = "https://yourwebsite.com",
   APIKey       = "YOUR_API_KEY_HERE",
   ConnectToken = "YOUR_SERVER_TOKEN_HERE",
   DebugMode    = false,
   CheckOnline  = true,
   FreqMinutes  = 2,
}

5. Configure server.cfg

Add the following line to garrysmod/cfg/server.cfg:
sv_hibernate_think 1
Important: This is required. Without it, Lua timers do not run when no players are on the server, and the addon will not poll the queue.

6. Final restart

Restart your server. The addon 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).
APIKeyYour LeaderOS API key. Find it on Dashboard > Settings > API
ConnectTokenYour server token. Find it on Dashboard > Store > Servers > Your Server > Server Token
DebugModeSet to true to enable debug logging, or false to disable it.
CheckOnlineSet to true to check if players are online before sending commands, or false to skip this check.
FreqMinutesHow often (in minutes) the addon polls the command queue.

Console Commands

CommandDescription
leaderos_statusDisplays the current configuration and timer status.
leaderos_reloadReloads the config file, restarts the timer, and triggers an immediate poll.
leaderos_pollTriggers an immediate queue poll without restarting the timer.
leaderos_debugToggles debug mode on or off.