Garry's Mod server.cfg generator

Garry's Mod reads server.cfg like any Source server, but most of what people want to change is owned by the gamemode rather than the engine.

Start from a preset

Visual Settings

source Format
Identity

Server name in the browser.

Gameplay

Props each player may spawn. Without a sensible limit, players will find the ceiling for you and take the server with it.

Ragdolls per player.

Vehicles per player.

Lets players noclip. Sandbox-only — these limits do nothing on other gamemodes.

Players cannot be hurt.

Everyone hears everyone on voice.

Cheat commands. Note that gamemodes and addons often set their own values after this file runs, so a setting here can be overridden at runtime.

Players & Access

Join password.

Slot limit. Note this is normally set on the command line rather than here.

Network

Game server login token, required for the server to appear in the public browser.

RCON & Query

Remote console password. Change it.

server.cfg

rcon_passwordThis is still the example RCON password. Change it, and keep the RCON port off the public internet.
sv_setsteamaccountWithout a game server login token the server will not appear in the public browser, however your ports are configured.
hostname "Spawnly GMod"
sv_password ""
rcon_password "changeme"
sv_setsteamaccount 
maxplayers 16
sbox_maxprops 5000
sbox_maxragdolls 50
sbox_maxvehicles 10
sbox_noclip 1
sbox_godmode 0
sv_alltalk 1
sv_cheats 0

How server.cfg syntax works

Space-separated commands, quotes around values containing spaces, 1 and 0 for booleans. The sandbox limit commands only exist while the sandbox gamemode is loaded, so setting them on a server running a different gamemode does nothing.

The mistake that costs people hours

Addons and gamemodes routinely override server.cfg at runtime. A DarkRP server sets many of its own values from its own configuration files after server.cfg has already run, so an edit here can be applied correctly and then immediately replaced. Check the gamemode's own config before assuming the file was ignored.

Support & Help