Logo

Install a Garry's Mod DarkRP server

Install a Garry's Mod DarkRP server

Deploy a Garry's Mod server with the DarkRP gamemode on a Linux VPS. This guide covers SteamCMD install, gamemode configuration, Workshop addons and server hardening.

Introduction

Garry's Mod (GMod) remains one of the most played sandbox games in the world, and DarkRP is its most popular Roleplay gamemode. Compatible with thousands of Workshop addons, it offers a jobs system, economy, property ownership and the full classic RP suite.

Prerequisites

  • Debian 12 or Ubuntu 22.04+ VPS at VeryCloud (32-bit compatible for Steam libs)
  • 2 GB RAM minimum, 4 GB recommended for 32+ players
  • 20 GB disk (Workshop addons add up fast)
  • Root SSH access
  • A Steam Game Server Token (free, created below)

Step 1: System and dependencies

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

Step 2: Create a dedicated user

sudo useradd -m -s /bin/bash gmod
sudo passwd gmod
sudo su - gmod

Step 3: Install SteamCMD

mkdir -p ~/steamcmd && cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar xzf steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gz

Step 4: Download Garry's Mod Server

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

Install is about 1 GB and takes 5-10 minutes.

Step 5: Get a Steam Game Server Token

Go to: https://steamcommunity.com/dev/managegameservers

  • App ID: 4020
  • Memo: My GMod server
  • Create Account

Get the Login Token (format XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX).

Step 6: First startup (basic Sandbox)

cd ~/gmodserver
./srcds_run -game garrysmod -console -port 27015 +maxplayers 16 \
  +gamemode sandbox +map gm_construct \
  +sv_setsteamaccount YOUR_STEAM_TOKEN

The server starts, but it's basic sandbox. Let's install DarkRP.

Stop with Ctrl+C or by typing quit in the console.

Step 7: Install DarkRP

cd ~/gmodserver/garrysmod/gamemodes
git clone https://github.com/FPtje/DarkRP.git darkrp
git clone https://github.com/FPtje/DarkRPModification.git darkrpmodification

Note: darkrpmodification is the addon containing YOUR modifications (custom jobs, shipments, laws). The darkrp folder must never be edited so updates stay easy.

Move darkrpmodification to the right place:

mv ~/gmodserver/garrysmod/gamemodes/darkrpmodification ~/gmodserver/garrysmod/addons/darkrpmodification

Step 8: Download a DarkRP map

DarkRP works on specific maps (rp_*). The most popular is rp_downtown_v4c_v2. Download it from garrysmods.org or Workshop.

Place the map:

# If downloaded locally, upload via SFTP to:
~/gmodserver/garrysmod/maps/

Or use resource downloader / workshop (see step 11).

Step 9: Configure the server

nano ~/gmodserver/garrysmod/cfg/server.cfg

Content:

hostname "My DarkRP Server - VeryCloud"
sv_password ""
sv_lan 0
rcon_password "RconPassword"
sv_region 3  // 3 = Europe

// Network performance
sv_minrate 30000
sv_maxrate 0
sv_minupdaterate 22
sv_maxupdaterate 66
sv_mincmdrate 22
sv_maxcmdrate 66

// Anti-spam and tickrate
fps_max 67
gmod_physiterations 4

// Console / chat
sv_alltalk 0
sv_voiceenable 1

// Authentication
sv_steamaccount YOUR_STEAM_TOKEN

Step 10: Launch DarkRP

Launch with the correct gamemode:

cd ~/gmodserver
./srcds_run -game garrysmod -console -port 27015 \
  +maxplayers 32 \
  +gamemode darkrp \
  +map rp_downtown_v4c_v2 \
  +sv_setsteamaccount YOUR_STEAM_TOKEN \
  -tickrate 66

The server starts. Connect from GMod: Console → connect VPS_IP:27015.

Step 11: Add Workshop addons

DarkRP needs a few near-mandatory addons: Pointshop, Sit Anywhere, custom jobs, weapons packs.

Workshop Collection

Create a Workshop collection on Steam: https://steamcommunity.com/sharedfiles/edititem/767/3/

Add your addons (Sit Anywhere, M9K Weapons, ULib, ULX, etc.). Note the collection ID in the URL.

Launch the server with:

./srcds_run -game garrysmod -console -port 27015 \
  +maxplayers 32 \
  +gamemode darkrp \
  +map rp_downtown_v4c_v2 \
  +sv_setsteamaccount YOUR_STEAM_TOKEN \
  +host_workshop_collection COLLECTION_ID \
  -authkey YOUR_WORKSHOP_API_KEY

Get a Workshop API Key at: https://steamcommunity.com/dev/apikey

Step 12: Customize DarkRP

All your customizations go in darkrpmodification/lua/darkrp_customthings/.

Add a custom job

nano ~/gmodserver/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/jobs.lua

Example job:

TEAM_HACKER = DarkRP.createJob("Hacker", {
    color = Color(0, 255, 100, 255),
    model = "models/player/hostage/hostage_04.mdl",
    description = "You hack computer systems.",
    weapons = {"weapon_keypadcracker"},
    command = "hacker",
    max = 2,
    salary = 75,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = true,
    category = "Thieves"
})

Add a buyable weapon

nano ~/gmodserver/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/shipments.lua
DarkRP.createShipment("AK-47", {
    model = "models/weapons/w_rif_ak47.mdl",
    entity = "weapon_ak472",
    price = 5000,
    amount = 10,
    separate = true,
    pricesep = 600,
    noship = false,
    allowed = {TEAM_GUN, TEAM_BLACKMARKET}
})

Step 13: Systemd service with screen

GMod has no native daemon, use screen to run it in the background.

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

[Service]
Type=forking
User=gmod
WorkingDirectory=/home/gmod/gmodserver
ExecStart=/usr/bin/screen -dmS gmod /home/gmod/gmodserver/srcds_run -game garrysmod -console -port 27015 +maxplayers 32 +gamemode darkrp +map rp_downtown_v4c_v2 +sv_setsteamaccount YOUR_TOKEN +host_workshop_collection COLLECTION_ID -authkey YOUR_API_KEY -tickrate 66
ExecStop=/usr/bin/screen -S gmod -X quit
Restart=on-failure
RestartSec=10

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

To access the live console:

sudo -u gmod screen -r gmod
# Exit without killing screen: Ctrl+A then D

Step 14: Open ports

sudo ufw allow 27015/tcp
sudo ufw allow 27015/udp
sudo ufw allow 27005/udp

And on the VeryCloud Netrix side, open 27015 TCP+UDP in the customer area.

Troubleshooting

"Steam token rejected"

Your Game Server Token isn't valid or is being used on another server. Re-create one at https://steamcommunity.com/dev/managegameservers.

Server runs but unreachable

Check that:

  • Port 27015 UDP is open (not just TCP)
  • sv_lan 0 in server.cfg
  • heartbeat is enabled (default on 4020)

"Map not found"

The map isn't in ~/gmodserver/garrysmod/maps/. Download it and place the .bsp (and possibly .nav) in the right location.

Lag despite few players

Often caused by poorly optimized Workshop addons. List the heaviest ones:

du -sh ~/gmodserver/garrysmod/addons/*/ | sort -h

Temporarily disable the biggest.

Useful commands

# Service status
sudo systemctl status gmod

# View live console
sudo -u gmod screen -r gmod
# (Ctrl+A then D to leave without stopping)

# Update GMod
~/steamcmd/steamcmd.sh +force_install_dir /home/gmod/gmodserver +login anonymous +app_update 4020 validate +quit

# Update DarkRP
cd ~/gmodserver/garrysmod/gamemodes/darkrp
git pull

# Count online players
ss -unp | grep 27015

# List installed maps
ls ~/gmodserver/garrysmod/maps/*.bsp

Conclusion

Your DarkRP server is live. Going further:

  • Install ULX + ULib for admin permissions
  • Configure an anti-cheat (CAC, Vermilion)
  • Set up a MySQL system for data persistence (DarkRP uses SQLite by default)
  • Host a web page (forum, donations) in parallel on the same VPS

Resources

Join our Discord community server

For any questions, suggestions, or just to chat with the community, join us on Discord!

900+Members