Garry's Mod reads garrysmod/cfg/server.cfg every time it loads a map. The gamemode, the starting map and the slot count are chosen when the server launches.
1. Edit server.cfg
- Stop the server in the Game Panel.
- Open the Files tab and browse to
garrysmod/cfg. - Open
server.cfg, or create it if it does not exist.
| Command | What it does |
|---|---|
hostname | The name in the server browser. |
sv_password | Password to join. Empty means open. |
rcon_password | Password for remote admin commands. |
sv_lan | Must be 0 for an internet server. |
sbox_maxprops | Props each player may spawn. |
sbox_noclip | Allows noclip in sandbox. |
sv_alltalk | Lets everyone hear everyone. |
sv_setsteamaccount | Your Steam game server token. |
Values with spaces go in quotation marks.
2. Gamemode, map and slots
These are launch values, set on the Startup page of your server. That page is not linked in the sidebar, so open your server in the panel and add /startup to the end of the address.
- The gamemode is the folder name in
garrysmod/gamemodes, for examplesandboxordarkrp. - The map is the map file name without its extension, for example
gm_construct. - The map must exist on the server, and it must suit the gamemode. DarkRP on
gm_constructwill start but will make no sense.
3. Change the map now
Run changelevel gm_flatgrass in the Console tab in the panel. Everyone reconnects to the new map.
4. Apply the changes
- Save the file.
- Start the server, or run
exec server.cfgin the console to reload it without a restart. - Run
statusto confirm the hostname, map and gamemode.
5. If a setting is ignored
- Check the spelling. The console silently skips commands it does not recognise.
- Some gamemodes overwrite settings on load. Put gamemode specific settings in the config file that gamemode reads instead.
- Run
exec server.cfgby hand in the console to see the errors printed.
Open a ticket from Support in the Client Area if a setting will not hold.





