How to Set Up a DarkRP Server: Complete Guide
A proper DarkRP setup from scratch typically takes 2-4 hours. Rushing it leads to addon conflicts and config mistakes that are harder to fix later. This guide walks through each step in the right order.
What you need before you start
A Steam account that owns Garry's Mod
The dedicated server files (app ID 4020) download anonymously, but running a GMod server requires a Steam account with the game in its library.
A place to run the server
A local machine (not ideal for a community -- you need to be online for it to run) or managed hosting. For a server that stays up around the clock, managed hosting is simpler.
Basic file management familiarity
You will be working with folders and config files. Nothing requires coding knowledge to follow this guide, though editing job definitions in Lua is required for customisation beyond the defaults.
Time
A first DarkRP setup from scratch, done properly with addons and configuration, typically takes 2-4 hours. Rushing it leads to addon conflicts and config mistakes that are harder to fix later.
Installing the Garry's Mod dedicated server
SteamCMD is Valve's command-line tool for downloading dedicated server files. You do not need to own GMod on the account you use for SteamCMD -- the server files download anonymously.
- Install SteamCMD from the Valve developer wiki. On Linux: download and extract the SteamCMD package. On Windows: download the zip and extract it.
- Run the install command:
steamcmd +login anonymous +app_update 4020 validate +quit. App ID 4020 is the GMod Dedicated Server. The validate flag checks files after download. - The download is several gigabytes. Let it finish completely before continuing.
- After installation, the server directory contains a
garrysmod/subfolder. Everything in this guide lives insidegarrysmod/.
On a managed host like Zeros Host, this step is done for you when you create the server. The GMod server is provisioned and running within about 30 seconds.
Installing the DarkRP gamemode
DarkRP is not bundled with the GMod dedicated server. You download it separately.
- Clone or download the DarkRP repository from
github.com/FPtje/DarkRPintogarrysmod/gamemodes/darkrp/. The folder name must be exactlydarkrp(lowercase). - Clone or download
darkrpmodificationfromgithub.com/darkrpmodification/darkrpmodificationintogarrysmod/gamemodes/darkrpmodification/. This is where all your customisations live. - Never edit the core
darkrpfolder. Put all changes indarkrpmodification. Core DarkRP updates will overwrite changes you make in the main folder. - Set the startup parameter to use DarkRP:
# Example startup parameters ./srcds_run -game garrysmod +gamemode darkrp +map rp_downtown_v4c_v2 +maxplayers 32
Both DarkRP and DarkRP Modification are also available on the Steam Workshop. The GitHub method gives you more control over versions and faster updates.
Configuring darkrpmodification
The darkrpmodification folder is where you do almost all configuration. Key files:
lua/darkrp_config/config.luaMain configuration: starting money, payday interval and amount, whether cash drops on death, player info visibility. Review these first.
lua/darkrp_config/disabled_defaults.luaTurn off default DarkRP features you do not want (default drugs, shipments, vehicles, etc.).
lua/darkrp_modules/Optional feature modules. Remove a module folder to disable it.
lua/darkrp_customthings/Define your custom jobs, shipments, entities, and ammo here. These are the files you will edit most often.
Adding jobs and shipments
Jobs are defined in lua/darkrp_customthings/jobs.lua inside darkrpmodification. Each job is a Lua table.
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20),
model = {"models/player/Group01/Male_04.mdl"},
description = "A regular citizen of the city.",
weapons = {},
command = "citizen",
max = 0, -- 0 means unlimited
salary = 45,
admin = 0, -- 0 = all players, 1 = admins only
vote = false,
hasLicense = false,
isPD = false,
})Shipments are defined in lua/darkrp_customthings/shipments.lua. Each shipment defines a weapon class, price, amount, and which job can buy it. Entities (money printers, drug labs) go in lua/darkrp_customthings/entities.lua.
Installing ULX admin mod
You need an admin mod to manage players and enforce rules. ULX is the most widely used for GMod DarkRP servers. Install it alongside ULib (required by ULX):
- Download ULib from
github.com/TeamUlysses/uliband place it ingarrysmod/addons/ulib/. - Download ULX from
github.com/TeamUlysses/ulxand place it ingarrysmod/addons/ulx/. - Start the server. Once it is running, from the server console (not in-game), run:
ulx adduser YourSteamName superadmin.
SAM is an alternative to ULX with a different interface. See the ULX vs SAM comparison guide if you want to evaluate both options before choosing.
Workshop content and FastDL
Players need the same content (models, materials, sounds) that your server uses. Without it they see errors or missing models.
Workshop collection method. Create a Steam Workshop collection containing all addons your server uses. Add +host_workshop_collection COLLECTIONID to your startup parameters. Players are prompted to download the collection when they join.
resource.AddWorkshop method. In a Lua file in garrysmod/lua/autorun/server/, call resource.AddWorkshop("ADDON_ID") for each addon. This queues the downloads server-side for connecting players.
Mod Manager. The Zeros Host panel includes a built-in Mod Manager that handles Workshop collection setup without manual config file editing.
Common errors and fixes
Gamemode not found / server uses default gamemode
Check that the darkrp folder name is exactly "darkrp" (lowercase) and that the +gamemode darkrp startup parameter is set.
Lua errors on startup (module not found, attempt to index nil)
A Lua script has an error. Read the full error in the console -- it gives the file name and line number. Usually an addon that is incompatible with the current DarkRP version, or a missing dependency.
Players see ERROR models or pink/black squares
They are missing Workshop content. Ensure your Workshop collection is correct and the collection ID is in startup parameters, or add resource.AddWorkshop calls for each addon in a server autorun file.
Can't make myself superadmin in-game
Run the ulx adduser command from the server console (the terminal or the panel console), not from the in-game chat. In-game chat commands are not recognised before you have admin rank.
DarkRP is loading but jobs are not showing up
Check jobs.lua in darkrpmodification for Lua syntax errors. A single error in the file prevents all jobs from loading. The server console will show the specific error and line number.
Skip the SteamCMD setup
On Zeros Host, the GMod server is provisioned and running in about 30 seconds. No SteamCMD, no server configuration -- just the panel, your addons, and your players. Start a free trial with no card required.
See GMod hostingFrequently asked questions
Do I need to own Garry's Mod to run a DarkRP server?
Yes. The dedicated server files download anonymously via SteamCMD, but running a GMod server requires a Steam account that owns Garry's Mod in its library. You do not need to use that account to log in to SteamCMD -- just associate it with the server when required.
Where do I put the DarkRP gamemode files?
Clone or download the DarkRP repository into garrysmod/gamemodes/darkrp/ (the folder name must be exactly "darkrp" in lowercase). Clone darkrpmodification into garrysmod/gamemodes/darkrpmodification/. All your customisations go in darkrpmodification -- never edit the core darkrp folder directly.
What startup parameter sets DarkRP as the gamemode?
Add +gamemode darkrp to your server startup parameters. On a managed host this is usually a dropdown or text field in the server settings. You also need to set the map (e.g. +map rp_downtown_v4c_v2) and a maximum player count.
How do I add custom jobs to DarkRP?
Jobs are defined in lua/darkrp_customthings/jobs.lua inside the darkrpmodification folder. Each job is a Lua table with fields including name, color, model, description, salary, max, command, and weapons. Do not edit the jobs.lua file in the core darkrp gamemode folder.
Why can't players connect after I installed DarkRP?
Common causes: the server is not set to use the darkrp gamemode in startup parameters, the darkrp folder name is wrong (must be lowercase), or Workshop content is not configured so players are missing models and textures. Check the server console for Lua errors on startup -- these usually point directly to the problem.
How do I make myself superadmin on a fresh DarkRP server?
The method depends on which admin mod you install (ULX or SAM). For ULX: join the server, then from the server console (not in-game) run ulx adduser YourSteamName superadmin. For SAM: use the sam_setrank console command. You must run these commands from the server console, not from in-game chat.