Garry's Mod server.cfg: common settings explained
Where to find server.cfg on a Garry's Mod server and the most useful settings: hostname, passwords, downloads, loading screen and Sandbox limits.
Updated · 2 min read
Garry's Mod reads garrysmod/cfg/server.cfg every time the server starts and when a map loads. Put your server name, passwords and gameplay settings there, one per line, then restart.
Where it lives
Open the file manager and go to:
garrysmod/cfg/server.cfg
If it doesn't exist, create it. Make sure the name is exactly server.cfg, not server.cfg.txt.
Launch options like the map, gamemode, max players and Workshop collection are set in your server's Startup settings instead, because they must be set before the server starts.
A starter config
// Identity
hostname "My Garry's Mod Server"
sv_loadingurl ""
// Access
sv_password ""
rcon_password "use-a-long-random-password"
// Downloads
sv_allowdownload 0
sv_allowupload 0
sv_downloadurl ""
// Region in the server browser (255 = world)
sv_region 255
// Logging
log on
sv_logbans 1
// Sandbox limits
sbox_maxprops 150
sbox_maxragdolls 5
sbox_noclip 1
Lines starting with // are comments.
Settings explained
| Setting | What it does |
|---|---|
hostname | Name in the server browser and scoreboard |
sv_password | Password to join. Leave empty for a public server |
rcon_password | Password for remote console. Leave empty to disable RCON |
sv_loadingurl | Web page shown as the loading screen, for example a custom page you host |
sv_allowdownload | Lets players download custom files directly from the game server |
sv_allowupload | Lets players upload sprays |
sv_downloadurl | FastDL web address for custom content |
sv_region | Browser region filter |
log on | Writes server logs to the garrysmod/logs folder |
Custom content downloads
Players need any custom models, materials and sounds you use. You have two good options:
- Workshop: use
resource.AddWorkshopfor content that's on the Workshop. See Workshop collections. - FastDL: host files on a web server and set
sv_downloadurl. See FastDL basics.
Direct downloads from the game server (sv_allowdownload 1) are very slow, so most servers turn them off.
Applying changes
Restart the server after editing. Many settings can also be changed live by typing them in the console, for example hostname "New Name", but they reset on restart unless they're in server.cfg.
Gamemode-specific settings
Gamemodes have their own settings. TTT settings start with ttt_ and can go in server.cfg. DarkRP keeps most of its settings in the darkrpmodification addon. See Sandbox, DarkRP and TTT.
Still stuck?
If your settings don't apply, check the file name and that each value with spaces is in quotes. The Schokr Discord can help.