Skip to content

Garry's Mod: Server Configuration

Learn how to set the server name, passwords, game mode, starting map, and Sandbox limits for your Garry's Mod game server

27 November 20264 min read38 Views0 helpful

Don't have your own server yet? Host your Garry's Mod server with ZAP-Hosting from €4.99 / month.Or try 3 days from €0.90

Introduction

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.

How the configuration works

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.

Important

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 parameters at a glance

Startup parameterDescription
Server nameYour server's name in the server list. Default: ZapX Garry's Mod Server
Server passwordPassword required to join. Leave blank for a public server with no password.
RCON passwordPassword 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. playersHow many players can play on your server at the same time. Default: 10
Game modeThe game mode the server starts with. Default: sandbox
Starting mapThe map the server starts with. Default: gm_construct
Additional startup parametersOptional command-line parameters for the dedicated server. These are appended to the end of the startup command.

Game mode and map

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.

Custom settings in server.cfg

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:

Code
sbox_maxprops 150
sbox_maxragdolls 10
sbox_maxnpcs 10
sbox_maxvehicles 10
sbox_noclip 1
sv_alltalk 1

Limits per player in Sandbox mode

CommandDescription
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
Tip

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.

Additional Sandbox settings

CommandDescription
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.

Additional server settings

CommandDescription
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.

Conclusion

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! 🙂

Free tools

Garry's Mod Tools

View all

FAQ

Frequently asked questions

Go to the Files tab and open the garrysmod/cfg folder. You can set the server name, server password, RCON password, game mode, and starting map under Configuration > Startup Parameters.
Add sbox_maxprops <anzahl> to server.cfg, for example, sbox_maxprops 150. There are separate sbox_max commands for NPCs, ragdolls, vehicles, and other objects.
At every startup, your server sets the server name from the startup parameters. The same applies to the server password and RCON password if those fields are filled in. Change these values under Configuration > Startup Parameters.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.