← Blog

How to Set Up a High-Performance DarkRP Server on Gmod

Par Benjamin D. · PDG

· Mis à jour le August 12, 2026 · Lecture 11 min

Illustration for the article : How to Set Up a High-Performance DarkRP Server on Gmod
Contents

Setting up a DarkRP server in 2026 is still one of the most popular ways to build a Garry's Mod community, but it is also one of the easiest setups to get wrong. Between the gamemode files, the darkrpmodification addon, Workshop collections, FastDL and admin mods, a clean install saves you weeks of debugging. Here is a complete, field-tested walkthrough.

What a DarkRP server actually needs before you install anything

DarkRP runs on top of Garry's Mod Dedicated Server (SRCDS), which itself is a Source engine binary. That has one very concrete consequence: the game loop is mostly single-threaded. Twelve slow cores will lose to four fast ones every single time. When you compare hosting offers, per-core clock speed and instruction-per-clock performance matter far more than the raw core count printed on the product page.

Hardware and resource planning

Player slotsRAM (with addons)StorageCPU notes
16-243-4 GB15-25 GBHigh single-core clock required
32-485-8 GB25-40 GBDedicated cores strongly recommended
64-100+8-16 GB40-80 GBHeavy Lua optimisation mandatory

Storage is not a detail on DarkRP. A mature Workshop collection with maps, weapon packs, playermodels and props easily crosses 30 GB, and every map change forces the server to read a large amount of data. NVMe SSD storage cuts map load times dramatically compared to classic SATA drives, and it also shortens the window where players see "Loading..." before timing out.

Two paths exist. Either you take a managed Garry's Mod server hosting instance where SRCDS, updates and the panel are already handled, or you deploy everything yourself on a Linux VPS. Both are valid; the second one just means you own the whole stack, including the security work.

Ports to keep in mind

  • 27015/UDP - game traffic and server browser queries
  • 27015/TCP - RCON
  • 27005/UDP - client outgoing port (local, not server-side)
  • 27020/UDP - SourceTV / HLTV if you enable it

Volumetric DDoS attacks are extremely common on Garry's Mod communities, especially once your DarkRP server starts climbing the server list. On Nexus Games, anti-DDoS filtering is included by default on every game server and VPS, so you focus on Lua and gameplay rather than on absorbing floods.



Installing SRCDS and the DarkRP gamemode step by step

1. Install SteamCMD (self-hosted / VPS route)

On a fresh Debian or Ubuntu machine, never run a game server as root. Create a dedicated user first.

sudo dpkg --add-architecture i386
sudo apt update && sudo apt upgrade -y
sudo apt install -y lib32gcc-s1 lib32stdc++6 libtinfo5:i386 curl wget tar screen unzip git

sudo adduser --disabled-password --gecos "" gmod
sudo su - gmod

mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

2. Download the Garry's Mod dedicated server

cd ~/steamcmd
./steamcmd.sh +force_install_dir /home/gmod/gmodserver \
  +login anonymous \
  +app_update 4020 validate \
  +quit

App ID 4020 is the Garry's Mod Dedicated Server. Re-run the exact same command every time an update ships; validate repairs corrupted files after a crash.

3. Install DarkRP and darkrpmodification

This is the step where most beginners break their install. DarkRP goes into gamemodes/, and all your customisation goes into a separate addon called darkrpmodification. You never edit the gamemode files directly, otherwise the next update wipes your work.

cd /home/gmod/gmodserver/garrysmod/gamemodes
git clone https://github.com/FPtje/DarkRP.git darkrp

cd /home/gmod/gmodserver/garrysmod/addons
git clone https://github.com/FPtje/darkrpmodification.git darkrpmodification

Important: the gamemode folder must be named darkrp in lowercase, and the folder darkrpmodification-master must be renamed to darkrpmodification if you downloaded a ZIP instead of cloning. A trailing -master is the single most frequent cause of "my jobs don't appear".

4. Install an admin mod

DarkRP ships no admin system of its own. ULX + ULib is the classic pairing, and it integrates with DarkRP's job whitelist system out of the box.

cd /home/gmod/gmodserver/garrysmod/addons
git clone https://github.com/TeamUlysses/ulib.git ulib
git clone https://github.com/TeamUlysses/ulx.git ulx

Order matters at load time: ULib must be present before ULX initialises. Cloning both before the first boot avoids the issue entirely.

5. First launch

cd /home/gmod/gmodserver
./srcds_run -game garrysmod -console -usercon \
  +gamemode darkrp \
  +map rp_downtown_v4c_v2 \
  +maxplayers 32 \
  +host_workshop_collection 0000000000 \
  -authkey YOUR_STEAM_WEB_API_KEY \
  +exec server.cfg

The -authkey flag is a Steam Web API key and is required for the server to download your Workshop collection. Without it, players join a map the server never mounted properly. If you host on a managed panel, this whole command line is exposed as startup parameters in the interface instead of a raw shell command.

6. Run it as a systemd service

sudo nano /etc/systemd/system/gmod.service
[Unit]
Description=Garrys Mod DarkRP Server
After=network.target

[Service]
Type=simple
User=gmod
WorkingDirectory=/home/gmod/gmodserver
ExecStart=/home/gmod/gmodserver/srcds_run -game garrysmod -console -usercon +gamemode darkrp +map rp_downtown_v4c_v2 +maxplayers 32 +exec server.cfg
Restart=on-failure
RestartSec=15

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now gmod
sudo systemctl status gmod
journalctl -u gmod -f


Configuring your DarkRP server: jobs, entities, economy and server.cfg

server.cfg essentials

Create garrysmod/cfg/server.cfg. This file holds everything that is not gamemode-specific.

hostname "[EU] Serious DarkRP | Custom Jobs | Active Staff"
rcon_password "use-a-long-random-string-here"
sv_password ""
sv_lan 0
sv_region 3

// Networking
sv_maxrate 0
sv_minrate 100000
sv_maxcmdrate 66
sv_maxupdaterate 66
sv_mincmdrate 30
sv_minupdaterate 30
fps_max 300

// Downloads
sv_allowdownload 1
sv_allowupload 0
sv_downloadurl "https://fastdl.yourdomain.com/garrysmod/"

// Sandbox limits (props kill performance on DarkRP)
sbox_maxprops 40
sbox_maxragdolls 2
sbox_maxvehicles 2
sbox_maxeffects 5
sbox_maxdynamite 0
sbox_maxthrusters 5
sbox_godmode 0
sbox_noclip 0

// Loading screen
sv_loadingurl "https://loading.yourdomain.com/"

Your RCON password must never be a dictionary word. RCON is a remote command channel: whoever holds it owns your server. Generate it properly:

openssl rand -base64 24

DarkRP settings.lua

Open addons/darkrpmodification/lua/darkrp_config/settings.lua. A few values shape the whole economy of your DarkRP server:

GM.Config.startingmoney       = 500
GM.Config.normalsalary        = 45
GM.Config.paydelay            = 300   -- seconds between paychecks
GM.Config.propertytax         = false
GM.Config.propertytaxperc     = 0.01

GM.Config.doorcost            = 40
GM.Config.vehiclecost         = 60
GM.Config.propcost            = 1

GM.Config.deathblack          = true
GM.Config.deathpov            = false
GM.Config.respawntime         = 5

GM.Config.adminsCanSeeAllChat = true
GM.Config.chatsound           = true
GM.Config.voiceradius         = true
GM.Config.dynamicvoice        = true

GM.Config.datatables          = "sqlite"  -- or "mysqloo" with a MySQL module

A salary/paydelay ratio that is too generous destroys progression in three days. Start conservative, watch your economy, adjust weekly. Players notice inflation faster than any admin.

Custom jobs

Jobs live in lua/darkrp_customthings/jobs.lua. Here is a working example with a whitelist and a custom check:

TEAM_BLACKMARKET = DarkRP.createJob("Black Market Dealer", {
    color = Color(120, 20, 20, 255),
    model = {"models/player/monk.mdl"},
    description = [[Sells illegal firearms to whoever pays.]],
    weapon = {"weapon_fists"},
    command = "blackmarket",
    max = 2,
    salary = 60,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = false,
    category = "Criminals",
    customCheck = function(ply) return ply:GetUserGroup() == "vip" or ply:IsAdmin() end,
    CustomCheckFailMsg = "VIP rank required.",
    PlayerSpawn = function(ply)
        ply:SetMaxHealth(120)
        ply:SetHealth(120)
        ply:SetArmor(25)
    end
})

Categories are declared in categories.lua, and every job must reference an existing category name or it silently disappears from the F4 menu.

Shipments and entities

DarkRP.createShipment("AK-47", {
    model = "models/weapons/w_rif_ak47.mdl",
    entity = "weapon_ak472",
    price = 4500,
    amount = 10,
    separate = false,
    pricesep = 600,
    noship = false,
    allowed = {TEAM_BLACKMARKET},
    category = "Rifles"
})

DarkRP.createEntity("Drug Lab", {
    ent = "drug_lab",
    model = "models/props_lab/crematorcase.mdl",
    price = 800,
    max = 3,
    cmd = "buydruglab",
    allowed = {TEAM_BLACKMARKET},
    category = "Illegal"
})

Always confirm the exact entity class name of your SWEP pack. Copy-pasting a shipment referencing a weapon class that does not exist produces an empty shipment box and a very confused player base.

Workshop collection and FastDL

Two distinct mechanisms, and they solve two different problems:

  • Workshop collection (+host_workshop_collection): the client downloads addons from Steam. Fast, cached, ideal for maps, playermodels and SWEP packs.
  • FastDL (sv_downloadurl): an HTTP server serving .bz2 compressed content for anything not on the Workshop, typically custom sounds and materials you made yourself.

Keep the collection lean. Every 100 MB you add is a joining player who might give up before the map loads. Audit it monthly and drop dead or duplicate addons. The official documentation on gamemodes and addon structure is maintained on the Garry's Mod developer wiki.



Performance, security and day-to-day administration

Keeping tickrate stable

DarkRP performance problems are almost never hardware problems on a modern platform. They are Lua problems. The usual suspects:

  • Uncapped prop count: players spawning hundreds of physics props destroys the physics step. Cap sbox_maxprops and add prop cleanup on disconnect.
  • Timers running every frame: badly written addons using Think hooks instead of timer.Create.
  • Entity leaks: money printers, drug labs and dropped money entities that are never garbage collected.
  • Unoptimised maps: some community RP maps have terrible visleaf structures and hammer both server and client.

Diagnose in the live console rather than guessing:

// In server console
status
net_graph 1        // client side
lua_run print(#ents.GetAll())
lua_run for k,v in pairs(timer.Simple and {} or {}) do end
gmod_admin_cleanup

Add profiling with a Lua profiler addon when a specific hook is suspected. Hosting on Ryzen 9 CPUs with DDR5 ECC memory gives you the single-core headroom Source needs, but no clock speed compensates for a hook that iterates over every entity sixty times per second.

Security checklist

A DarkRP community is a target: rival servers, disgruntled ex-staff, script kiddies. Baseline hygiene:

  • Long random rcon_password, rotated whenever a staff member leaves.
  • Never give superadmin to more than two or three trusted people.
  • Audit every addon you install. Backdoored DarkRP addons distributed on leak forums are extremely common and usually hide obfuscated RunString or CompileString calls.
  • Restrict lua_run and lua_openscript to console only.
  • Automatic backups of garrysmod/data/, addons/darkrpmodification/, cfg/ and your SQL database.

Quick grep to flag suspicious addons before loading them:

grep -rEn "RunString|CompileString|http.Post|_G\[\"" /home/gmod/gmodserver/garrysmod/addons/ | less

Hardening a self-managed VPS

If you run your own box rather than a managed panel, lock the front door before opening the server.

# SSH key authentication
ssh-keygen -t ed25519 -C "gmod-admin"
ssh-copy-id gmod@YOUR_SERVER_IP

# Disable password login
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart ssh

# Firewall
sudo apt install -y ufw fail2ban
sudo ufw allow 22/tcp
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw enable
sudo systemctl enable --now fail2ban

Volumetric DDoS filtering is handled upstream by the infrastructure, so ufw and fail2ban are there for brute-force and application-level noise, not for absorbing floods.

Backups and update routine

#!/bin/bash
# /home/gmod/backup.sh
DATE=$(date +%F-%H%M)
DEST=/home/gmod/backups
mkdir -p $DEST
tar czf $DEST/darkrp-$DATE.tar.gz \
  /home/gmod/gmodserver/garrysmod/data \
  /home/gmod/gmodserver/garrysmod/cfg \
  /home/gmod/gmodserver/garrysmod/addons/darkrpmodification
find $DEST -name "*.tar.gz" -mtime +14 -delete
chmod +x /home/gmod/backup.sh
crontab -e
# 0 4 * * * /home/gmod/backup.sh

On a managed setup, automatic backups and the file manager in NexusPanel cover the same need without cron, and the live console lets you push RCON commands, restart, or roll back a broken addon in seconds. Sub-user accounts are useful here: give your head admin file access without handing over billing.

Common errors and fixes

SymptomLikely causeFix
Server starts in SandboxGamemode folder misnamedFolder must be gamemodes/darkrp, lowercase
Custom jobs missingdarkrpmodification-master folder nameRename to darkrpmodification
Workshop content not mountedMissing -authkeyAdd a valid Steam Web API key
Players stuck at "Retrieving info"Query port blockedOpen 27015/UDP in firewall
Lua errors flooding consoleConflicting or outdated addonBisect by disabling half the addons at a time

Running a Source game server is only one part of a community setup. Many admins pair their Garry's Mod instance with Discord bot hosting for applications and ban appeals, and you will find more configuration guides on the Nexus Games blog. If you plan to run several gamemodes side by side, the full catalogue is on All our game servers.



Conclusion

A stable DarkRP setup comes down to discipline: clean folder structure, all customisation isolated in darkrpmodification, a lean Workshop collection, audited addons and scheduled backups. Get those right and the server basically runs itself. From there, your time goes into balancing the economy, writing jobs and moderating, which is where a roleplay community actually lives or dies.



FAQ

Why do my custom DarkRP jobs not show up in the F4 menu?

Ninety percent of the time the addon folder is still named darkrpmodification-master after a ZIP download; rename it to darkrpmodification. Otherwise, check that the category value in your job matches a category declared in categories.lua exactly, and read the server console at startup for Lua syntax errors in jobs.lua.

How much RAM and what CPU do I need for a 48-slot DarkRP server?

Plan 6 to 8 GB of RAM with a typical addon pack, and prioritise single-core clock speed since Source is largely single-threaded. Dedicated cores on a Ryzen 9 platform with DDR5 ECC and NVMe storage give you stable tickrate and fast map loads. Adding more cores will not help if a badly coded addon is saturating the main thread.

Do I need FastDL if I already use a Workshop collection?

Only for content that is not on the Steam Workshop, typically your own custom sounds, materials or loading screen assets. Workshop handles maps, playermodels and SWEP packs more efficiently thanks to Steam caching. If you do set up FastDL, compress files to .bz2 and mirror the exact folder structure under your sv_downloadurl path.