NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

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

SettingWhat it does
hostnameName in the server browser and scoreboard
sv_passwordPassword to join. Leave empty for a public server
rcon_passwordPassword for remote console. Leave empty to disable RCON
sv_loadingurlWeb page shown as the loading screen, for example a custom page you host
sv_allowdownloadLets players download custom files directly from the game server
sv_allowuploadLets players upload sprays
sv_downloadurlFastDL web address for custom content
sv_regionBrowser region filter
log onWrites 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.AddWorkshop for 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.