Garry's Mod is a sandbox in the literal sense: the server runs whatever Lua your addons contain, and the performance you get is a property of that code rather than of the game. Two servers on the same plan can behave completely differently, and the difference is the addon list. The install itself is one SteamCMD command and a start line; everything after that is content delivery, Lua discipline and a handful of console variables. A sandbox server for a dozen friends fits in 1-2 GB. A forty-slot DarkRP server with a large Workshop collection wants 4-6 GB and will still be limited by one CPU core.
What you are actually running#
A Garry's Mod server is a Source dedicated server - srcds - running the garrysmod game directory, with app id 4020 on Steam. It installs anonymously, needs no game licence, and is small compared with most modern games. On top of that sits the Lua sandbox: a gamemode, any number of addons, and the Workshop plumbing that gets them onto players' machines.
Three facts shape everything else:
- The server is 32-bit by default. The standard branch runs a 32-bit binary that can address roughly 3-4 GB whatever your plan says. A server that dies with an allocation error while the panel shows memory free is not being throttled; it hit the 32-bit ceiling. There is a
x86-64beta branch that installs 64-bit binaries alongside the 32-bit ones, and it is worth using for big collections - but every compiled binary module you use has to exist in a 64-bit build too. - Lua runs on one thread. Everything the gamemode and every addon do happens in sequence, inside the tick. No amount of extra cores makes a badly written
Thinkhook cheaper. - Clients need the same content you do. The server owning an addon means nothing by itself. Getting it to the player is a separate job, and it is where most "my server is broken" reports come from.
Requirements and resource usage#
| Server | RAM | CPU | Notes |
|---|---|---|---|
| Sandbox, 8-16 players, small collection | 1-2 GB | 1 core | The usual friends-only server |
| TTT / murder / prop hunt, 16-24 | 2-3 GB | 1-1.5 cores | Round-based modes are well behaved |
| DarkRP, 32-40 players | 4-6 GB | 2-2.5 cores | Entities, jobs and printers, all Lua |
| Anything with a 200-item collection | 4-6 GB | 2+ cores | Memory is the collection, not the players |
Memory in Garry's Mod tracks the size of the Workshop collection much more closely than the player count. Each addon's Lua, models and materials are held by the server, and a hundred prop packs cost the same whether one person is connected or forty. Disk is modest - the base install is a couple of gigabytes, and a large collection adds several more.
CPU is the ceiling everyone actually meets. The number to watch is the server's frame time: if the server cannot finish a tick inside its budget, movement stutters for everybody at once. Run stats in the console and read the fps and cpu columns; on a healthy server fps sits at or just above your tick rate. Garry's Mod plans here start at 1 GB and run to 6 GB, which covers everything from a sandbox box to a busy roleplay server.
Installing the server and the launch line#
$ steamcmd +force_install_dir /home/gmod/server +login anonymous \ +app_update 4020 validate +quit$ cd /home/gmod/server$ ./srcds_run -game garrysmod -console -usercon -port 27015 \ +maxplayers 24 +gamemode sandbox +map gm_construct \ +host_workshop_collection 123456789 -authkey <steam_web_api_key>On a panel you do not type that; the same values appear as fields on the Startup tab. Either way these are the parameters that matter:
| Parameter | What it does |
|---|---|
-game garrysmod | Which game directory srcds loads |
-console | Run in the console rather than opening a window |
-usercon | Enables RCON. Without it rcon_password does nothing |
-port 27015 | Game port |
+maxplayers 24 | Slot count. Cannot be changed without a restart |
+gamemode sandbox | Gamemode folder name under garrysmod/gamemodes |
+map gm_construct | First map loaded |
+host_workshop_collection | Workshop collection id the server downloads at boot |
-authkey | Steam Web API key, required for the line above to work |
-tickrate 33 | Ticks per second, set explicitly |
+sv_setsteamaccount | Game Server Login Token |
Two of those deserve more than a row. -authkey is a Steam Web API key from Steam's developer page, and without it host_workshop_collection silently downloads nothing - the server starts, the collection is ignored, and players arrive to a sandbox with none of your addons. And -tickrate is worth setting rather than inheriting: sources disagree about what Garry's Mod defaults to, so put a number in the start line and stop guessing. 33 is a sensible floor for a prop-heavy sandbox, 66 for anything where aim matters. Doubling the tick rate roughly doubles the per-player CPU cost and does nothing for a server that is already behind - what tick rate actually means is the longer version of that argument.
If the server never appears in the browser, check for a Game Server Login Token as well as the port. Tokens are created against app id 4000 for Garry's Mod and set with sv_setsteamaccount; Steam game server tokens explains what they are, how they get banned and why one per server matters.
server.cfg and the sandbox limits#
garrysmod/cfg/server.cfg is executed on every map load. A reasonable starting file:
hostname "Prop hunt, Thursdays, no minges"sv_password ""rcon_password "long-random-string"sv_lan 0sv_region 3sv_allowcslua 0sv_kickerrornum 10sv_allowdownload 1sv_allowupload 0sv_downloadurl "https://files.example.com/gmod/"net_maxfilesize 64sbox_maxprops 150sbox_maxragdolls 5sbox_maxnpcs 10sbox_maxeffects 50sbox_maxvehicles 6sbox_maxthrusters 30sbox_maxwheels 30sbox_maxdynamite 10sbox_godmode 0sbox_noclip 1sbox_playershurtplayers 1gmod_physiterations 4You do not have to guess at defaults: type any cvar on its own in the server console and it prints its current value and the shipped default. A few of them carry more weight than their names suggest:
sv_allowcslua 0stops clients running arbitrary client-side Lua on your server. Leave it at 0. Every guide that tells you to set it to 1 is a guide for a single-player test box.sv_kickerrornumremoves a client after that many Lua errors. A client with a broken addon otherwise produces thousands of error lines a minute and buries anything useful in the console.sbox_maxpropsis the difference between a sandbox server and a slideshow. The physics cost of props is not linear - one player welding a hundred barrels together costs more than ten players with ten props each.gmod_physiterationsraises physics accuracy at a directly proportional CPU cost. Do not raise it to fix lag; it is the opposite of a fix.sv_regionsets where the browser files your server.3is Europe.
Per-map settings go in garrysmod/cfg/<mapname>.cfg, executed after server.cfg when that map loads. That is the clean way to give one map different prop limits without a plugin.
Ports and connecting#
| Port | Protocol | Purpose |
|---|---|---|
27015 | UDP | Game traffic and Steam queries |
27015 | TCP | RCON, if -usercon is set |
27020 | UDP | SourceTV, if you enable it |
27005 | UDP | Outbound client port, nothing to open server-side |
Source uses the same number for game traffic and the server browser query, which is why Garry's Mod needs fewer allocations than DayZ or Arma. Garry's Mod plans here come with one allocation, and extra ports are added on the Network tab when you want SourceTV or a second server.
Players who cannot find the server in the browser can always join directly from their console with connect 203.0.113.10:27015. That is also the fastest diagnostic: if a direct connect works, the server is fine and the listing is the problem - a missing token, the wrong region, or the browser being the browser. Game server ports explained covers the query-versus-game-port distinction in general, and RCON safely is worth five minutes before you put a password in that file, because rcon_password over the internet is a plaintext protocol with a single secret.
Workshop collections, FastDL and missing content#
Point the server at a Workshop collection and let it fetch what it needs. Uploading addons by hand works right up until an update, at which point the server and every client disagree about what is installed and nobody can connect.
There are three separate routes content can take, and a working server usually uses all three.
The Workshop collection is for addons. Create one collection, make it public, put its id in host_workshop_collection, and add -authkey. The server downloads the addons for itself. To make clients download them too, list them in Lua:
resource.AddWorkshop("1234567890")resource.AddWorkshop("1234567891")FastDL is for everything that is not a Workshop addon: legacy maps, sounds, custom models dropped into the game directory. Set sv_downloadurl to a web server holding a copy of your garrysmod folder structure, with each file bzip2-compressed. Without it clients download over the game port at a rate that feels broken. With it they download at whatever the web host can push. The full recipe, including the folder layout and the compression step, is in Workshop collections and FastDL.
Mounted games are the case you cannot fix. Many community maps were built with Counter-Strike: Source textures. If the player does not own and have CS:S installed, they see purple-and-black checkerboards and ERROR models, and nothing you do on the server changes that - garrysmod/cfg/mount.cfg mounts content the machine already has, it does not create a licence. Either pick maps that only use Half-Life 2 content, or tell people plainly in your MOTD what they need.
Gamemodes, admins and DarkRP#
A gamemode is a folder in garrysmod/gamemodes/, and the folder name is what you pass to +gamemode. This trips up nearly everyone installing DarkRP for the first time: DarkRP goes in `garrysmod/gamemodes/darkrp`, not in `addons`, while darkrpmodification - the folder you are meant to edit - goes in garrysmod/addons/darkrpmodification. Putting either in the wrong place gives you a server that boots into sandbox and prints nothing obviously wrong. Running a DarkRP server goes through jobs, entities and the money system.
For administration, ULX with ULib is the free standard: both are addons, and ULib keeps its user list in garrysmod/data/ulib/users.txt. Admins use the in-game menu with !menu, and you can grant the first superadmin by editing that file with the server stopped if nobody is an admin yet. SAM and ServerGuard are paid alternatives with better interfaces and lower overhead; on a busy server the overhead is a real consideration, because admin mods hook into chat, spawning and damage.
Whatever you use, set it up before you invite anybody. An unmoderated Garry's Mod server discovers its first prop-spamming visitor within a day, and the tools to deal with them are useless if they are installed after the fact. Keeping a modded server clean covers the rest of that job - where addons come from, and what to check before you run someone else's Lua as root of your game loop.
Performance: where the tick goes#
Most gamemodes are fine at their intended player count and fall apart above it, because a Lua loop that runs per player is cheap at twelve and expensive at forty. If the server drags only when it fills, the addon list is the place to look before the plan is.
A short diagnostic order that works:
statusin the console - how many players, and are any of them at a terrible ping while everyone else is fine.stats- server fps and CPU. If fps is at the tick rate and the CPU column is low, the server is not the problem.- Watch the console for Lua errors. A single addon erroring inside a
Thinkhook runs its error handler thirty-three times a second per player. Errors name the addon path; that is usually the entire investigation. Reading the console has more on what to keep and what to ignore. - Remove half the collection on a test server and measure again. Bisecting an addon list is unglamorous and it is the only method that reliably finds the culprit.
Two structural things help more than tuning. Keep the prop and entity limits low enough that players cannot make the server unplayable by accident - sbox_maxprops plus a cleanup timer on disconnect is most of it. And restart on a schedule. Garry's Mod servers accumulate entities, timers and memory over days; a nightly restart when nobody is on costs nothing and keeps frame times flat. Restart schedules that help covers the interval, and the panel's Schedules tab runs it with a cron expression.
An empty server does almost nothing, by the way: srcds hibernates when the last player leaves, so an idle Garry's Mod server barely registers on a CPU graph. If yours does, something in your addon list is running a timer whether anyone is there or not, and that is worth finding.
Troubleshooting#
The server starts but has none of my addons. Missing or invalid -authkey, or the collection is not public. Check the boot log for the Workshop download lines.
Players spawn to `ERROR` models and checkerboard textures. Missing content on the client. Workshop addons need resource.AddWorkshop; legacy content needs FastDL; CS:S content needs the player to own CS:S.
Everyone downloads for two minutes and half of them leave. No sv_downloadurl, so files are trickling over the game port. Set up FastDL.
The server crashes with an out-of-memory error while memory looks free. The 32-bit address space, not your plan. Trim the collection or move to the x86-64 branch.
"Reliable channel overflowed" disconnects. An addon is sending too much data to clients at once, usually on spawn. Find it by removing addons; the client console names the last thing it received.
A binary module stopped working after an update. Modules in garrysmod/lua/bin/ are compiled per platform and per branch. Switching to 64-bit, or a Garry's Mod update changing the runtime, needs the matching build of every module. When a mod update breaks is the general case.
The map changes and half the addons stop working. Some addons only initialise on certain gamemodes, and some conflict. The console prints the Lua error on map load; read the first error, not the hundredth.
FAQ#
How much RAM does a Garry's Mod server need?
1-2 GB for sandbox with a small collection, 2-3 GB for round-based gamemodes, and 4-6 GB for DarkRP or a large Workshop collection. The collection drives memory far more than the number of players, and the 32-bit binary cannot use much beyond 3-4 GB regardless.
Do players need to own the addons on my server?
No. Workshop addons listed with resource.AddWorkshop are downloaded by the client automatically. What they may need to own is another Valve game whose content a map uses - Counter-Strike: Source most often - and no server-side setting can supply that for them.
Why does my server not show in the server browser?
In order of likelihood: the query port is not reachable, no Game Server Login Token is set, sv_lan is 1, or the browser is simply slow. Test with connect <ip>:27015 from the client console; if that works, only the listing is broken.
Should I run the 64-bit branch?
If your collection is large enough to crash a 32-bit server, yes. Otherwise it is a trade: more memory headroom against having to find 64-bit builds of every binary module you depend on.
Is a higher tick rate worth paying for?
Rarely. Going from 33 to 66 costs roughly double the CPU per player and helps only in gamemodes where shooting accuracy matters. A server that is already behind on frame time gets worse, not better.
How do I stop people spawning a thousand props?
Lower sbox_maxprops and the related sbox_max* limits, keep sv_allowcslua at 0, and install an admin mod with a cleanup command before you open the server to strangers. Limits set after the first incident are consolation, not prevention.




Comments
Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.