Menu
 

Garry's Mod Server Configuration: Startup Flags and server.cfg

Garry's Mod Server Configuration

GMod configuration has two layers: startup parameters decide how the server boots, while garrysmod/cfg/server.cfg applies persistent console variables. Keeping those layers separate makes “it works in the console but not after restart” failures much easier to diagnose.

Last verified: September 1, 2026. Facepunch's command-line reference warns that sv_lan must be set before startup or followed by a changelevel. A value added only to server.cfg can be too late for initial server behavior.

Recommended startup baseline

./srcds_run -game garrysmod -console \
  +maxplayers 16 \
  +gamemode sandbox \
  +map gm_construct \
  -port 27015

Add one change at a time. Workshop collections, a GSLT, and a custom gamemode should be tested after a stock map boots.

Useful startup flags

FlagPurposeWhen to use it
-game garrysmodLoads the GMod game directory.Every GMod dedicated-server launch.
+map MAPChooses the first map.Use a stock map for troubleshooting.
+gamemode MODESelects the gamemode.Set it before testing gamemode-specific addons.
+maxplayers NSets player slots.Start small; size for Lua/addon load, not a generic maximum.
+host_workshop_collection IDFetches a public/unlisted Workshop collection.After vanilla setup passes; see the Workshop guide.
-noaddons / -noworkshopDisables addon or Workshop loading.Isolation tests for startup and join failures.
+sv_lan 1Starts as LAN-only.Set at startup for LAN testing, not only in server.cfg.

Keep server.cfg small and explicit

Create garrysmod/cfg/server.cfg with only settings you have verified for your gamemode:

hostname "My GMod Server"
sv_lan 0
sv_password ""
sv_cheats 0
sv_contact "admin@example.com"
// Keep RCON credentials out of public repositories and chat.

Use the Facepunch command reference for a variable's current behavior. Unknown, obsolete, or gamemode-specific cvars can be silently ignored or produce misleading diagnostics.

Passwords, RCON, and operator safety

  • sv_password controls player access; leave it empty for a public server.
  • Use a separate strong RCON secret, restrict access to trusted administrators, and rotate it if exposed.
  • Publish truthful server name, gamemode, map, and rules. Facepunch's operator rules require accurate server information and prohibit malicious actions toward players.

Map and gamemode changes

Use changelevel MAP after changing a setting that needs a new map, including the documented sv_lan timing case. Keep a known-good map and gamemode pair in the startup script so a bad Workshop item cannot leave the server without a boot path.

Configuration troubleshooting

  • If a setting disappears after restart, confirm it belongs in server.cfg rather than the startup command.
  • If LAN/browser behavior is wrong, set sv_lan before launch or changelevel, then retest.
  • If the stock map works but the custom stack fails, restart with -noaddons and -noworkshop.
  • If players join but see missing content, use the Workshop download guide; config alone cannot fix an absent delivery path.

Related Garry's Mod guides

Need a managed config, Workshop collection, and backup workflow? Launch Garry's Mod hosting and keep these flags in your deployment notes.

Tired of fighting this issue every patch?

Run a managed Garry's Mod server with us. We handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in minutes, multiple datacenter regions, no contract.

See Garry's Mod hosting plans →
Top