With the right configuration, you can turn your Garry's Mod server into exactly the server you have in mind: your own name, a password, the right game mode, your starting map, and custom limits for props, NPCs, and more. In this guide, we'll show you which settings are available, where to find them in ZapX, and what you can customize yourself in server.cfg.
You can find the most important settings for your Garry's Mod server in ZapX under the Configuration tab, in Startup Parameters. You can configure everything else in the server.cfg file. Find it in the Files tab, in the garrysmod/cfg folder.
Each time your server starts, it rewrites the zap_runtime.cfg file in the same folder and loads it as the server configuration. It first loads your server.cfg, then sets the server name (hostname) and, if you've filled in the fields, the server password (sv_password) and RCON password (rcon_password) from the startup parameters.
Always change the server name, server password, and RCON password in the Startup Parameters. Any hostname in server.cfg is overwritten on every startup by the value in the startup parameters. The same applies to sv_password and rcon_password as soon as you've filled in those fields. You don't need to edit zap_runtime.cfg itself.
After saving, ZapX will prompt you to restart the server. Your changes won't take effect until the server has restarted.
| Startup parameter | Description |
|---|---|
| Server name | Your server's name in the server list. Default: ZapX Garry's Mod Server |
| Server password | Password required to join. Leave blank for a public server with no password. |
| RCON password | Password for the remote console (RCON); see RCON |
| Steam Game Server Token (GSLT) | A Steam Game Server Login Token that lets your server appear in the server list; see Create a GSLT |
| Max. players | How many players can play on your server at the same time. Default: 10 |
| Game mode | The game mode the server starts with. Default: sandbox |
| Starting map | The map the server starts with. Default: gm_construct |
| Additional startup parameters | Optional command-line parameters for the dedicated server. These are appended to the end of the startup command. |
In the Game mode field, enter the name of the game mode as it appears in its folder under garrysmod/gamemodes, such as sandbox or terrortown for Trouble in Terrorist Town. Find the TTT settings in TTT Configuration. Upload custom game modes such as DarkRP as folders to garrysmod/gamemodes, then enter the folder name.
For Starting map, enter the map name without the file extension, such as gm_construct. While the server is running, use changelevel <karte> in the Console to change the map, and gamemode <modus> to set the game mode for the next map.
Add custom content such as maps to the appropriate folders under garrysmod in the Files tab. For example, add maps to garrysmod/maps. Each time it starts, your server adds the maps, sound, materials, models, resource, scripts, and particles folders alongside the included files. Install Steam Workshop addons through a Workshop collection; see Install mods.
The server.cfg file in the garrysmod/cfg folder is yours to manage: your server won't change it. Add any commands you want applied every time the server starts. Here's an example for Sandbox limits:
sbox_maxprops 150
sbox_maxragdolls 10
sbox_maxnpcs 10
sbox_maxvehicles 10
sbox_noclip 1
sv_alltalk 1
| Command | Description |
|---|---|
sbox_maxprops <anzahl> | Maximum number of props per player |
sbox_maxragdolls <anzahl> | Maximum number of ragdolls per player |
sbox_maxnpcs <anzahl> | Maximum number of NPCs per player |
sbox_maxvehicles <anzahl> | Maximum number of vehicles per player |
sbox_maxeffects <anzahl> | Maximum number of effects per player |
sbox_maxballoons <anzahl> | Maximum number of balloons per player |
sbox_maxdynamite <anzahl> | Maximum number of dynamite objects per player |
sbox_maxlamps <anzahl> | Maximum number of lamps per player |
sbox_maxthrusters <anzahl> | Maximum number of thrusters per player |
sbox_maxwheels <anzahl> | Maximum number of wheels per player |
sbox_maxhoverballs <anzahl> | Maximum number of hoverballs per player |
sbox_maxbuttons <anzahl> | Maximum number of buttons per player |
sbox_maxsents <anzahl> | Maximum number of scripted entities per player |
sbox_maxconstraints <anzahl> | Maximum number of constraints per player |
Props, NPCs, and effects can put a strain on performance. If your server lags when many players are online, lowering the limits is a good first step.
| Command | Description |
|---|---|
sbox_noclip <0/1> | Whether players can use noclip (fly through walls). Default: 1 (on) |
sbox_godmode <0/1> | Makes all players invulnerable. Default: 0 (off) |
sbox_playershurtplayers <0/1> | Whether players can damage each other. Default: 1 (on) |
These settings only apply in the Sandbox game mode. Other game modes, such as Trouble in Terrorist Town, don't use them. Game modes built on Sandbox may have their own rules for these settings.
| Command | Description |
|---|---|
sv_alltalk <0/1> | Whether players can talk to each other regardless of their teams |
sv_voiceenable <0/1> | Turns voice chat on or off on the server |
sv_gravity <wert> | Gravity in the game world |
mp_timelimit <minuten> | Time limit for a game session |
sv_timeout <sekunden> | How many seconds without a connection before a player is disconnected |
You can also enter any of these commands in the Console while the game is running, for example, to test them. Add anything you want to apply permanently to server.cfg.
Your Garry's Mod server is now set up just the way you want it. Find out how to give yourself admin privileges in Become an admin, and use FastDL to speed up downloads for your content. If something isn't working properly, see our guide to Common issues. If you have any other questions, our support team is available every day! 🙂