Garry's Mod · Config reference

Garry's Mod server.cfg and settings reference

Where Garry's Mod's server.cfg lives, the startup options for gamemode, map and Workshop, the sandbox limits and their defaults, and admin files.

By Last reviewed 5 min read

Garry’s Mod keeps its settings in garrysmod/cfg/server.cfg. The gamemode, map, player count and Workshop collection are startup options, which you set as easy settings in Settings. Everything else goes in server.cfg, under Advanced or in Files.

Where the files are

File Path What it holds
server.cfg garrysmod/cfg/server.cfg Your settings. Runs when the server starts and on every map change
srcds_workshop_ids.txt garrysmod/cfg/srcds_workshop_ids.txt An optional list of Workshop item IDs to download, used with or instead of a collection
ULX groups garrysmod/data/ulib/users.txt Admins and their groups, if you use ULX
Server bans garrysmod/cfg/banned_user.cfg Bans saved with the game’s own banid and writeid
Addons garrysmod/addons/ Addons you uploaded by hand

How to change settings

  1. Settings has easy fields: server name, password, max players, map, gamemode, Workshop collection, loading screen and your Steam server token.
  2. Settings > Advanced opens the real server.cfg.
  3. Files (or SFTP, which works with FileZilla) lets you edit any file directly.
  4. The Console changes most settings right away, like sbox_maxprops 300. The change is lost when the server restarts, unless you also put it in server.cfg.

In server.cfg, write one setting per line. Put text in quotes:

hostname "Physgun Sandbox | Build and chill"
sv_password ""
sv_location "eu"
sbox_maxprops 300
sbox_noclip 1

Type find and a word in the Console, like find sbox, to list every matching setting.

Startup options

These are read once, when the server starts. Set them in Settings. Extra startup options, like -tickrate, go in the startup section of Settings.

Option Example What it does
+gamemode +gamemode terrortown The gamemode’s folder name, like sandbox, terrortown or darkrp
+map +map gm_construct The starting map, without .bsp
+maxplayers +maxplayers 16 Most players at once. Only changes with a restart
+host_workshop_collection +host_workshop_collection 123456789 A Steam Workshop collection the server downloads and loads at start
+sv_setsteamaccount Your token Your Steam game server login token. Set it in Settings, where it stays hidden
-tickrate -tickrate 33 How many times a second the server updates. The default is about 66

Older guides add -authkey with a Steam Web API key so Workshop collections work. Garry’s Mod no longer needs it, so you can leave it out.

Server settings

Key Default or example What it does
hostname "Physgun Sandbox" Your server’s name in the server list
sv_password Empty A password players must type to join. Empty means anyone can join
sv_loadingurl "https://example.com/loading.html" A web page shown while players load in. %s becomes the player’s SteamID and %m the map
sv_location "eu" The flag next to your server in the list. Use eu for our EU region or us for US East. Facepunch’s rules say it must be correct
sv_downloadurl "https://example.com/fastdl" A web server players download content from (FastDL). Most servers use the Workshop instead
sv_allowdownload 0 Lets players download files straight from the game server. It’s very slow and can be abused, so keep it 0
host_workshop_autoupdate On Updates Workshop items when the server starts. 0 keeps the old versions, which can stop players joining after a map update
hide_server 0 1 hides your server from the public server list
rcon_password Empty Leave it empty. The panel’s Console doesn’t need it, and the remote console port stays closed unless you open it in the panel

Sandbox limits

These work in Sandbox and in gamemodes built on it, like DarkRP. Limits are per player.

Key Default What it limits
sbox_maxprops 200 Props
sbox_maxragdolls 10 Ragdolls
sbox_maxnpcs 10 NPCs
sbox_maxvehicles 4 Vehicles
sbox_maxsents 100 Scripted entities
sbox_maxeffects 200 Effect props
sbox_maxballoons 100 Balloons
sbox_maxthrusters 50 Thrusters
sbox_maxwheels 50 Wheels
sbox_maxhoverballs 50 Hoverballs
sbox_maxbuttons 50 Buttons
sbox_maxemitters 20 Emitters
sbox_maxdynamite 10 Dynamite
sbox_maxlamps 3 Lamps
sbox_maxlights 5 Lights
sbox_maxcameras 10 Cameras
sbox_maxconstraints 2000 Welds, ropes and other constraints
sbox_maxropeconstraints 1000 Ropes
Key Default What it does
sbox_noclip 1 Players can fly with noclip
sbox_godmode 0 1 makes every player unable to take damage
sbox_playershurtplayers 1 Players can hurt each other
sbox_weapons 1 Players spawn with the Half-Life 2 weapons
physgun_limited 0 1 stops the Physics Gun picking up some map objects
mp_falldamage 0 1 turns on realistic fall damage
sbox_persist Empty Any name turns on Make Persistent, so props marked that way stay after a restart

Higher limits mean more physics for the server to work out. See the performance guide before raising them a lot.

Which changes need a restart

Change When it applies
Settings typed in the Console Right away, until the next restart
server.cfg On the next map change or restart
Map Right away with changelevel mapname, or the change map button in the Console
Gamemode Type gamemode terrortown, then change the map. Or change it in Settings and restart
Max players, Workshop collection, server token, tickrate Only after a restart

On a sleeping server, changes wait until it next starts. The panel tells you when.

Admins, bans and passwords

Garry’s Mod has no admin menu of its own on a dedicated server, so most servers use ULX. Install it from Mods (see getting started), then use these in the Console:

Command What it does
ulx adduser "Name" superadmin Makes an online player superadmin. Other groups are admin and operator
ulx adduserid STEAM_0:1:12345678 admin Adds someone by SteamID, online or not
ulx removeuser "Name" Takes away their group
ulx ban "Name" 60 "Reason" Bans for 60 minutes. 0 bans for good
ulx banid STEAM_0:1:12345678 0 "Reason" Bans someone by SteamID
ulx unban STEAM_0:1:12345678 Removes a ban

Type status in the Console to see each player’s SteamID. ULX keeps its groups in garrysmod/data/ulib/users.txt.

Garry’s Mod has no whitelist. To keep a server for friends only, set a password in Settings or sv_password in server.cfg.

Questions

Where is server.cfg on a Garry's Mod server?

In garrysmod/cfg/server.cfg. Open it from Files, or from the Advanced section of Settings. The server runs it at start and on every map change.

How do I raise the prop limit on my Garry's Mod server?

Set sbox_maxprops in server.cfg, like sbox_maxprops 300. The default is 200 per player. Type it in the Console to try it right away, and keep it in server.cfg so it survives restarts.

Does my Garry's Mod server need a Steam Web API key (-authkey)?

No. Older guides say -authkey is needed for Workshop collections, but Garry's Mod servers now download collections without it. Add a Steam game server token in Settings instead.

How do I add a custom loading screen to my Garry's Mod server?

Put the web address of your loading page in the loading screen field in Settings, or set sv_loadingurl in server.cfg. %s in the address becomes the player's SteamID and %m the map.

Sources we checked

  1. Downloading and Hosting a Dedicated ServerFacepunch Studios
  2. Loading ScreenFacepunch Studios
  3. Sandbox gamemode settings (sandbox.txt)Facepunch Studios
  4. ULXTeam Ulysses

Run your Garry's Mod server on Wilderack

Daily backups, DDoS protection and free game swaps come with every plan. Wakes the moment you join.

Wait! Get 25% off your server

Don’t miss the best Garry's Mod hosting.

Your codeTOSK25

Use my 25% off

25% off your first payment, for new customers. Then the normal price; cancel any time. The button takes the code to checkout for you.