This guide covers how to configure your Garry's Mod dedicated server hosted with Legion Hosting, including server settings, Workshop collections, popular gamemodes, DarkRP setup, FastDL, and how to connect.
Table of Contents
- Game Server Login Token (GSLT)
- Configuring server.cfg
- Popular Gamemodes
- Workshop Collections
- DarkRP Setup
- FastDL Setup
- Connecting to Your Server
1. Game Server Login Token (GSLT)
Steam requires a Game Server Login Token for public Garry's Mod servers. Without one your server will not appear in the server browser and may be restricted.
- Go to steamcommunity.com/dev/managegameservers and log in.
- Under Create a new game server account, enter App ID
4000(Garry's Mod) and a memo to identify the server. - Click Create and copy the token that is generated.
- Add the token to your startup line or
server.cfgusing the variablesv_setsteamaccount(see below).
2. Configuring server.cfg
The main server configuration file is located at:
garrysmod/cfg/server.cfg
Connect via SFTP, navigate to that path, and open or create server.cfg. Below is a recommended starting configuration with explanations for each key setting.
// ── Identity ──────────────────────────────────────────
hostname "My GMod Server" // Server name shown in browser
sv_password "" // Leave blank for public; set a password to make it private
// ── Slots & Network ───────────────────────────────────
maxplayers 32 // Maximum concurrent players (up to your plan limit)
sv_region 255 // 255 = worldwide
// ── Gamemode ──────────────────────────────────────────
// Set the active gamemode. Common values: sandbox, darkrp, terrortown, prop_hunt, murder
sv_gamemode "sandbox"
// ── Downloads ─────────────────────────────────────────
// FastDL base URL (see FastDL section below)
sv_downloadurl "https://yourcdn.example.com/garrysmod/"
// Allow clients to download custom content from the server directly (slower fallback)
sv_allowupload 1
sv_allowdownload 1
// ── Steam ─────────────────────────────────────────────
sv_setsteamaccount "YOUR_GSLT_TOKEN_HERE"
// ── Misc ──────────────────────────────────────────────
sv_cheats 0
sv_lan 0 // 0 = internet server; 1 = LAN only
server.cfg, or use exec server.cfg in the server console for most settings. Some settings (e.g. maxplayers) require a full restart.
Key server.cfg Settings Reference
| ConVar | Example Value | Description |
|---|---|---|
hostname | "My GMod Server" | Display name in the server browser |
sv_password | "" or "secret" | Server password; leave blank for public |
maxplayers | 32 | Concurrent player slot limit |
sv_gamemode | "darkrp" | Active gamemode folder name |
sv_downloadurl | "https://cdn.example.com/gmod/" | FastDL base URL for client downloads |
sv_setsteamaccount | "ABCDEF..." | Steam GSLT for public listing |
sv_lan | 0 | 0 = internet, 1 = LAN only |
sv_cheats | 0 | Enables/disables cheat commands |
3. Popular Gamemodes
Garry's Mod supports many community gamemodes. The most popular ones are listed below. Each gamemode must be installed as an addon (see the Workshop section) and then set in server.cfg using sv_gamemode.
| Gamemode | sv_gamemode value | Description |
|---|---|---|
| Sandbox | sandbox | Default GMod experience; build, spawn props, use tools. Included by default. |
| DarkRP | darkrp | Roleplay gamemode with jobs, economy, and laws. The most popular GMod gamemode. |
| Trouble in Terrorist Town (TTT) | terrortown | Social deduction — Traitors vs. Innocents. Included with GMod. |
| Prop Hunt | prop_hunt | Hide-and-seek using props as disguises. |
| Murder | murder | One murderer hunts innocents; bystanders must identify the killer. |
4. Workshop Collections
The easiest way to manage addons on a dedicated server is through a Steam Workshop collection. This lets you maintain a single collection on Steam and have the server automatically download and update all addons on startup.
Step 1 — Create a Workshop Collection
- Open the Garry's Mod Workshop and subscribe to the addons you want.
- Go to your Steam profile, click Workshop Items, then Collections, and click Create Collection.
- Add all desired addons to the collection, publish it as Public, and note the collection ID from its URL (e.g.
steamcommunity.com/sharedfiles/filedetails/?id=123456789).
Step 2 — Add to Startup Parameters
In GPanel, go to your server's Startup tab and add or update the following parameters:
+host_workshop_collection 123456789
+workshop_addons 123456789
Replace 123456789 with your actual collection ID. Both parameters are typically used together: host_workshop_collection forces clients to download the collection, and workshop_addons loads the addons server-side.
STEAM_API_KEY variable to a key generated at steamcommunity.com/dev/apikey.
Step 3 — Manual Addon Installation (Alternative)
You can also install addons manually by uploading them via SFTP to:
garrysmod/addons/
Each addon should be placed in its own subfolder, e.g. garrysmod/addons/darkrp/. See the SFTP upload guide for instructions.
5. DarkRP Setup
DarkRP is the most popular Garry's Mod gamemode and requires two addons working together: the base gamemode and a modification addon for customization.
Required Addons
| Addon | Purpose | Workshop ID |
|---|---|---|
| DarkRP | The core gamemode. Place in garrysmod/gamemodes/darkrp/ |
2975506321 |
| DarkRPModification | Your server's custom configuration (jobs, shipments, etc.). Place in garrysmod/addons/darkrpmodification/ |
2975625920 |
gamemodes/ folder, not in addons/. DarkRPModification goes in addons/. Getting these paths wrong is the most common DarkRP setup mistake.
Setting the Gamemode
In server.cfg, set:
sv_gamemode "darkrp"
Customizing DarkRP (DarkRPModification)
All customization is done inside garrysmod/addons/darkrpmodification/lua/darkrp_config/. Key files:
| File | What it controls |
|---|---|
settings.lua | Global DarkRP settings (starting money, salary intervals, prop limits, etc.) |
jobs.lua | Define custom jobs (police, mayor, drug dealer, etc.) with models, salaries, and permissions |
shipments.lua | Define gun dealer shipments and their contents |
entities.lua | Custom buyable entities (money printers, meth labs, etc.) |
categories.lua | F4 menu category organization |
Example: Adding a Custom Job
In jobs.lua inside DarkRPModification, add a block like:
TEAM_MEDIC = DarkRP.createJob("Medic", {
color = Color(0, 200, 100),
model = {"models/player/Group01/Female_04.mdl"},
description = [[You are a medic. Heal the injured citizens of the city.]],
weapons = {"weapon_medkit"},
command = "medic",
max = 3,
salary = 75,
admin = 0,
vote = false,
hasLicense = false,
category = "Citizens",
})
After saving, restart the server. The new job will appear in the F4 menu.
6. FastDL Setup
By default, clients download custom content (addons, maps, sounds) directly from your game server, which is slow and limited by your server's bandwidth. FastDL allows clients to download files from a web server (HTTP/HTTPS) instead, resulting in much faster join times.
How FastDL Works
- You host a copy of the
garrysmod/content directory (or just the changed files) on a web server. - You set
sv_downloadurlinserver.cfgto point to that web server's base URL. - Clients follow that URL to download files at full HTTP speed instead of through the game protocol.
File Format — Compression
Valve's engine supports .bz2 compressed files for FastDL. For each file clients need to download (e.g. maps/rp_downtown_v4c_v2.bsp), you can optionally also place a .bz2 version alongside it. The client will prefer the compressed version if present.
Configuring sv_downloadurl
In server.cfg:
sv_downloadurl "https://yourcdn.example.com/garrysmod/"
The URL must end with a slash and the directory structure beneath it must mirror the garrysmod/ folder structure on the game server. For example, if a map is at garrysmod/maps/rp_downtown.bsp on the server, the FastDL URL should serve it at https://yourcdn.example.com/garrysmod/maps/rp_downtown.bsp.
Forcing Clients to Download Files
To force clients to download a file via FastDL, you must add it to a resource.lua file. Create or edit garrysmod/lua/autorun/server/resource.lua:
-- Force clients to download specific files
resource.AddFile("maps/rp_downtown_v4c_v2.bsp")
resource.AddFile("sound/mycustomsound.wav")
resource.AddSingleFile("materials/mycustommaterial.vmt")
7. Connecting to Your Server
To find your server's IP address and port, check the Network tab in GPanel, or see the How to Find Your Server IP and Port guide.
Method 1 — Direct Connect in GMod
- Open Garry's Mod and click Find Multiplayer Game.
- Click Legacy Browser, then select the Favourites tab.
- Click Add a Server, enter your server IP and port (e.g.
123.45.67.89:27015), and click Add this address to favourites. - Select the server in your favourites list and click Connect.
Method 2 — Steam Server Browser
- In Steam, click View → Game Servers.
- Click the + button and enter your server IP and port.
- Click Add this address to favourites, then double-click it to connect.
Method 3 — Console Direct Connect
- Enable the developer console in GMod Options if it is not already on.
- Press ~ to open the console and type:
connect YOUR_SERVER_IP:PORT
Related Articles
- Garry's Mod Admin Setup (ULX) — Install ULX/ULib, grant admin, manage permissions
- Garry's Mod Troubleshooting — Missing textures, Workshop errors, DarkRP issues, and more
- How to Upload Files via SFTP
- How to Find Your Server IP and Port