Back to Blog

How to Make a GMod Server (DarkRP and TTT)

How to make a GMod server: SRCDS with SteamCMD, GSLT, server.cfg, DarkRP and TTT, Workshop collections, FastDL, ULX admin and performance tips.

Nodesty Team5 min readGame servers
The Garry's Mod logo and the words Garry's Mod on a dark Nodesty background

Knowing how to make a GMod server comes down to Valve's Source server software, SRCDS: you download the Garry's Mod server files with SteamCMD, get a GSLT, edit server.cfg and start the server with a gamemode, a map and a Workshop collection. Garry's Mod gets its strength from gamemodes, so the same install can run a DarkRP city, a TTT server or Prop Hunt.

This guide covers every step, from installation to DarkRP and TTT, Workshop collections, FastDL and running the server with ULX.

Requirements

  • Operating system: SRCDS runs on Windows and Linux. Linux uses fewer resources and is better for long uptimes.
  • CPU: The server mostly runs on a single core, so clock speed matters more than core count.
  • RAM: Grows with the gamemode and the number of addons:
Use casePlayersRecommended RAM
TTT or Prop Hunt, few addons16–242 GB
Sandbox or Murder, moderate addons24–324 GB
DarkRP, mid-sized Workshop collection32–484–6 GB
DarkRP, large collection and custom maps48–648 GB

The most common cause of lag on GMod servers isn't a lack of RAM but badly written Lua addons, so choosing addons carefully matters as much as choosing hardware.

Downloading the server files with SteamCMD

The Garry's Mod server's Steam app ID is 4020:

steamcmd +force_install_dir /home/gmod/server +login anonymous +app_update 4020 validate +quit

On Windows, run the same command with steamcmd.exe and a folder like C:\gmod\server. If you'll use large addon collections, prefer 64-bit SRCDS by using app_update 4020 -beta x86-64 validate instead. The 64-bit build doesn't hit the 32-bit version's memory limit.

Counter-Strike: Source content for TTT

Most TTT maps use Counter-Strike: Source content. Download it to a separate folder with SteamCMD (app ID 232330) and mount it with garrysmod/cfg/mount.cfg:

"mountcfg"
{
    "cstrike" "/home/gmod/css/cstrike"
}

Creating a GSLT

Your server needs a Game Server Login Token (GSLT) to appear in the internet list. Go to Steam's Game Server Account Management page, enter Garry's Mod's game ID, 4000, as the app ID and save the token. You add it to the launch command with +sv_setsteamaccount.

server.cfg and the launch command

garrysmod/cfg/server.cfg holds the server's basic settings:

hostname "Your Server Name"
sv_password ""
rcon_password "a-strong-password"
  • hostname: the name in the server browser.
  • sv_password: leave it empty for a public server.
  • rcon_password: the remote admin password. Always use a strong one.

Start the server with a gamemode, a map and a player limit. On Linux:

./srcds_run -game garrysmod -console -tickrate 33 \
  +gamemode darkrp \
  +map rp_downtown_v4c_v2 \
  +maxplayers 32 \
  +host_workshop_collection COLLECTION_ID \
  +sv_setsteamaccount YOUR_GSLT

On Windows, use the same parameters with srcds.exe; on the 64-bit build the files are srcds_run_x64 and srcds_win64.exe. A very high tick rate increases CPU load; 33 or 66 is enough for most DarkRP servers.

DarkRP, TTT and Prop Hunt

The +gamemode parameter decides which mode runs:

  • DarkRP: The most popular roleplay gamemode. Install DarkRP from GitHub into the gamemodes folder and the darkrpmodification addon, where you define jobs and items, into addons. Jobs live in jobs.lua and shipments in shipments.lua. Always edit darkrpmodification rather than the main DarkRP folder, so updates don't wipe your settings.
  • TTT (Trouble in Terrorist Town): Ships with the game; no extra install needed. Don't forget to mount the CSS content above.
  • Prop Hunt, Murder, Deathrun, Jailbreak: Added from the Workshop. Add the mode to your collection and change the +gamemode value.

Workshop collections and FastDL

Gather your server's addons in a Steam Workshop collection and add its ID to the launch command with +host_workshop_collection. The server downloads and updates every addon in the collection on startup.

Players need that content too, otherwise they see purple-and-black checkerboards and ERROR models:

  • For Workshop content, create a Lua file in garrysmod/lua/autorun/server and add one line per addon:
    resource.AddWorkshop("WORKSHOP_ID")
    
  • For custom files not on the Workshop (your own map, sounds or materials), use FastDL. Publish the compressed files on a web server and add sv_downloadurl "https://dl.yourdomain.com/" to server.cfg. With full admin access to your server, you can run that web server on the same machine with nginx.

Running the server with ULX

ULX is Garry's Mod's most widely used admin tool. Add ULX and ULib to your Workshop collection, restart the server and make yourself an admin in the server console:

ulx adduser YourName superadmin

Type !menu in game to open the menu where you can kick, ban, mute and teleport players. Which commands each group (moderator, admin, superadmin) can use is configured through ULib. DarkRP's own admin tool, FAdmin, comes built in; most servers use both.

Ports and performance

SRCDS uses port 27015 by default. With ufw on Linux:

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

Players join from the server browser or by typing connect server-ip:27015 in the console. To keep the server smooth:

  • Check the console for Lua errors regularly. An addon that errors constantly bloats the logs and wears the server down.
  • Watch the tick time after adding an addon. Profiling tools like FProfiler show how much time each addon takes.
  • Back up before big updates. DarkRP data lives in garrysmod/sv.db by default.

Game servers are frequent attack targets; our guide What is a DDoS attack? explains why protection in front of your server matters.

Renting a GMod server

Nodesty's GMod server hosting runs in Frankfurt on the Ryzen 9 9950X, which boosts to 5.7 GHz on a single core, with NVMe storage, L3–L7 DDoS protection and free daily backups kept for 7 days. Choose Garry's Mod during installation and the server files come preinstalled. For other games, see our guides on how to make an Unturned server and how to make a FiveM server.

Frequently Asked Questions

Is it free to make a GMod server?

Yes. The Garry's Mod server software (SRCDS) is free and downloads anonymously through SteamCMD. You only pay for the machine you rent to keep it online 24/7. Players need to own the game.

How many players can join a GMod server?

You set the limit with +maxplayers; Garry's Mod supports up to 128 players. The realistic number depends on the gamemode and addons. A TTT server with few addons handles 16–24 players on 2 GB, while a large DarkRP server needs 8 GB or more.

Why do players see purple-and-black checkerboards and ERROR models?

The server's content hasn't been sent to players. Add resource.AddWorkshop lines under lua/autorun/server for Workshop content and set up FastDL for custom files. Most TTT maps also need Counter-Strike Source content.

Does DarkRP come preinstalled?

The Garry's Mod server files come preinstalled; you install DarkRP and the darkrpmodification addon, where you define jobs, yourself. Copy the files to the right folders and add +gamemode darkrp to the launch command.

Why do players get stuck downloading files?

It happens when the server sends files slowly over its own connection. Using resource.AddWorkshop for Workshop content and FastDL (sv_downloadurl) for other files speeds up downloads and removes the stalls.

Can I move my server to a rented machine later?

Yes. Copy your garrysmod folder (including addons, data and sv.db) to the new server. DarkRP data is stored in garrysmod/sv.db by default. At Nodesty our support team does the migration for free.

Nodesty

About the author

Nodesty Team · Infrastructure & Support

The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.

Related articles

Launch your server now.

Build, scale, and conquer without limits on Nodesty's premium infrastructure.

                                                                                                                                                                                                                            
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            
                                                                                                                             ············································                                                   
                                                ··································································································..........···························                                     
                                       ················..........................................................................................................................··············                             
                                  ·············.................::::::::::::::::::::::::::::::::::::::::::::::....................:::::::::::::::::::::::::::::::::::::::................···········                        
                             ············................:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::............·········                     
                         ············.................:::::::::::::::::::::::::::::::::::::::::::::::::::------------::::::::::::::::::::::::::::::----------------:::::::::::::::::::::..........········                  
                    ············......................::::::::::::::::::::::::::::::::::::------------------------------------------------------------------------------------:::::::::::::.........········                
                ··········.............................................::::::::::::::::::-------------==========================================-----------------------------------:::::::::::........·······               
             ········..................:.....................................::::::::::--------=======+++++++++++++++++++++++++++++++++++++=========================------------------::::::::::.......·······              
           ······.........::::::::::::::::::::................................:::::::-----=====++++xxxxxx**************************xxxxxxxxx++++++++++++++===================------------::::::::.......·······             
          ·····.......:::::::::::::::::::::::::::.............................:::::----===+++xxx****%%%%&&&&&&#############&&&&&&&%%%%%*******xxxxxxxx++++++++++++++==============----------:::::::......······             
         ····......::::::::-------------:::::::::::..........................::::---===+++xx***%%%&&&####@@@@@@@@@@@@@@@@@@@@@@@@####&&&&&%%%%*******xxxxxxxxx+++++++++++++===========--------::::::......·····             
        ····.....:::::::--------------------:::::::::.......................::::---===++xxx**%%&&&###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###&&&&%%%%%********xxxxxxxxxxx++++++++++++========------::::::.....······            
        ····.....:::::--------------------------::::::::....................::::---===++xx***%%&&&####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###&&&&&%%%%%**********xxxxxxxxxxxxx+++++++++=======------:::::.....·····            
        ····....::::::-------=============---------:::::::::................:::::---===+++xx***%%%&&&#####@@@@@@@@@@@@@@@@@@@@@@@@@#####&&&&&%%%%%%*************xxxxxxxxxxxxxx+++++++++======-----:::::....·····            
         ····....:::::-------================---------:::::::::...............:::::----===++++xxx***%%%%&&&&&&#################&&&&&&%%%%%%%*******************xxxxxxxxxxxxxxxxx++++++++======----:::::....·····            
         ·····....:::::--------=================---------::::::::::..............:::::::-----====+++++xxxxxx**************************xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++++=====-----::::....·····            
          ·····.....:::::--------=================----------:::::::::::.................:::::::::-------=============++++++++++++++++++++++++++++++++++++xxxxxxxxxxxxxxxxxxxxxxx++++++++======-----::::....·····            
            ·····.....:::::::----------===========-------------::::::::::::.........................::::::::::::::::::------------------=============+++++++++++++++++++++++++++++++++=======-----::::.....·····            
              ······......:::::::---------------------------------:::::::::::::........................................:::::::::::::::-----------============+++++++++++++++++++++========------:::::.....·····             
                 ······........:::::::::---------------------------:::::::::::::::::...........................................:::::::::::::------------=============================--------::::::.....······              
                    ·········.........:::::::::::::::-------------::::::::::::::::::::::::.......................................::::::::::::::::--------------------------------------::::::::......·······                
                          ··········............::::::::::::::::::::::::::::::::::::::::::::::::::................................::::::::::::::::::::::::::-------------:::::::::::::::.........········                   
                                  ············..................:::::::::::::::::::::::::::::::::::::::::::.........................:::::::::::::::::::::::::::::::::::::................···········                        
                                             ················.............................................................................................................·················                                 
                                                           ······················................................................................···························                                                
                                                                               ·········································································