Prepay & save up to 40% · 3 months −20% · 6 months −30% · 12 months −40% Client Area
Guide

How to Set Up a Garry's Mod Server

Garry's Mod··8 min read

Garry's Mod is the Source-engine sandbox that became a platform — DarkRP, TTT, Prop Hunt, Sandbox and thousands of Workshop addons. A dedicated GMod server lets you pick a gamemode and build a community around it. This step-by-step guide shows you how to set up a Garry's Mod server in minutes — no manual install, no command line.

What you need

  • A Garry's Mod plan with around 2–6 GB of RAM — Garry's Mod is a Medium-class game.
  • Support for Steam Workshop addons and Lua gamemodes, included on every GGameHost Garry's Mod plan.
  • Your friends or community to play with (16–128 slots).

Step 1 — Choose your plan

Pick a plan sized for your Garry's Mod community. We recommend about 2–6 GB of RAM; start smaller and upgrade in one click as you add players or mods. Garry's Mod plans start at $10.99/mo.

Step 2 — Deploy your server

Check out and your Garry's Mod server provisions automatically in under 60 seconds, with console access right away — no manual install, no command line.

Step 3 — Connect & invite players

Once your Garry's Mod server is online, share its address (IP and port) with your friends so they can join. Start, stop and restart it anytime from the control panel.

Step 4 — Install mods & configure

Your Garry's Mod server supports Steam Workshop, Lua addons, DarkRP / TTT, Gamemodes, FTP/SFTP. Install Steam Workshop addons and Lua gamemodes straight from the one-click installer, or upload your own from the control panel — then tweak settings in the visual config editor.

Step 5 — Keep it running smoothly

Enable scheduled automatic backups, set restart timers, and monitor CPU, RAM and player counts from the dashboard. Always-on DDoS protection and 24/7 support keep your Garry's Mod server stable.

Server softwareSteam Workshop addons and Lua gamemodes
Recommended RAM2–6 GB
Player slots16–128 slots
Performance classMedium

Garry's Mod server FAQ

How much RAM does a Garry's Mod server need?
We recommend 2–6 GB for Garry's Mod. Start smaller and upgrade in one click as your player count or mod list grows.
How many players can a Garry's Mod server hold?
Typical Garry's Mod servers run 16–128 slots. Slots scale with your plan, so you can raise them at any time.
Can I install mods on a Garry's Mod server?
Yes — Garry's Mod supports Steam Workshop addons and Lua gamemodes. Install them from the one-click installer or upload your own over FTP/SFTP.

Ready to start? Deploy your Garry's Mod server in under 60 seconds — 7-day money-back guarantee.

Related guides

Share:Twitter / XFacebookRedditWhatsApp

Ready to play?

Deploy your server in under 60 seconds — 7-day money-back guarantee.

Browse games
Reference

Ports, config and common failures

Installing the server files with SteamCMD

The Garry's Mod wiki gives the whole install as a single SteamCMD line:

steamcmd.exe +login anonymous +force_install_dir c:\my_garrysmod_server\ +app_update 4020 validate +quit

The binary you launch afterwards sits in the install root: srcds.exe on Windows, srcds_run on Linux.

Branches are selected with -beta. The wiki documents dev, prerelease, x86-64 and public, and gives this form for the 64-bit build:

login anonymous
app_update 4020 -beta x86-64 validate
quit

It also warns that removing the -beta parameter is not enough on its own: SteamCMD carries on updating to the last activated beta, so public has to be asked for explicitly.

One platform note: SteamCMD is 32-bit only, so a 64-bit Linux host needs 32-bit library support. The wiki's Debian/Ubuntu example is lib32ncurses5 and lib32z1, with lib32tinfo5 mentioned where readline support fails.

Default ports and the parameters that set them

DefaultPurposeSet with
27015Game traffic-port
27005Client port+clientport
27020SourceTV+tv_port

These three values are the defaults carried by a widely used reference launch configuration for Garry's Mod servers. They are community-documented rather than printed in the Facepunch dedicated-server pages, which list no port numbers at all, so check them against your own launcher or panel before opening anything on a firewall.

Two processes cannot share a port, so running more than one instance on a single machine means giving each one its own values. The same reference launch line binds explicitly, passing -ip for the address together with -port, +clientport, +tv_port and -strictportbind.

Building the startup command line

The wiki's Windows example, run from the install root:

srcds.exe +maxplayers 20 -console +gamemode sandbox +map gm_construct +sv_setsteamaccount <your token>

And its Linux counterpart:

~/server_1/srcds_run +maxplayers 12 +map gm_flatgrass +sv_setsteamaccount <your token>

Reading the pieces:

  • +maxplayers, +map, +gamemode — slot count, starting map and starting gamemode.
  • +sv_setsteamaccount — where the login token goes. The wiki is blunt about it: this is mandatory, and your server's ranking will be penalized if you skip it.
  • -tickrate — target tick rate. The wiki gives a default of 66.6666 and a recommended range of 30-128.
  • -disableluarefresh — disables Auto Refresh.
  • -console — used in the wiki's Windows example above.

Anything written as +<ConVar Name> <value> sets that console variable after the game starts, which is how the map, gamemode and slot count are passed above.

Not on the wiki's parameter page but present in the reference launch line: -game garrysmod, +servercfgfile and -maxplayers as a dash-prefixed alternative.

To bring the server back after a reboot, the wiki suggests a crontab entry:

@reboot /home/steam/server_1/srcds_run +maxplayers 12 +map gm_flatgrass

server.cfg and the values a reference configuration ships

The wiki documents garrysmod/cfg/mount.cfg, and the reference launch configuration resolves its server config to garrysmod/cfg as well, so that is where server.cfg belongs. +servercfgfile points the server at a different filename if you keep more than one.

What that reference server.cfg contains, with the values it ships:

  • Identity and access — hostname, rcon_password, sv_password (blank), sv_contact, sv_region 0, sv_lan 0.
  • Repeated RCON failures — sv_rcon_maxfailures 20, sv_rcon_minfailures 20, sv_rcon_minfailuretime 20, sv_rcon_banpenalty 0.
  • Network — sv_downloadurl and sv_loadingurl (both blank), net_maxfilesize 64, sv_maxrate 0, sv_minrate 800000, sv_maxupdaterate 66, sv_minupdaterate 33, sv_maxcmdrate 66, sv_mincmdrate 33.
  • Server settings — sv_alltalk 1, sv_cheats 0, sv_allowcslua 0, sv_pausable 0, sv_forcepreload 1, sv_timeout 120, gmod_physiterations 4, think_limit 20, sv_allowupload 0, sv_allowdownload 0.
  • Sandbox settings — sbox_maxprops 100, sbox_maxragdolls 50, sbox_maxnpcs 10, sbox_maxvehicles 1, sbox_maxlamps 5, sbox_maxthrusters 20, sbox_maxwheels 20, sbox_maxhoverballs 20, sbox_noclip 0, sbox_godmode 0.
  • Logging, then exec banned_user.cfg, exec banned_ip.cfg and heartbeat at the end.

From the wiki itself: sv_location takes an ISO 3166-1 alpha-2 country code of at most five characters and corresponds to a flag icon in materials/flags16/. eu is a documented special case.

Loading Workshop addons and sending content to players

One parameter installs a whole collection server-side: +host_workshop_collection <WORKSHOPID>. The collection has to be public or unlisted, or srcds cannot access it. Setting host_workshop_autoupdate to 0 stops automatic updates, with the trade-off the wiki names: players may be unable to join if map versions mismatch.

srcds.exe +maxplayers 20 -console +host_workshop_collection 157384458 +gamemode zombiesurvival +map zs_cleanoffice_v2

Maps in the collection are marked for client download automatically by matching .bsp filename, and a gamemode is marked too if its config file sets a workshopID — the same effect as resource.AddWorkshop.

The wiki ranks three delivery paths, fastest first:

  • WorkshopDLresource.AddWorkshop. As fast as the client can download, up to about 2 GB of gma at once. The addon must be uploaded to the Workshop with its type set to ServerContent.
  • FastDLsv_downloadurl pointed at a web server, with files marked by resource.AddFile or resource.AddSingleFile. Clients request a .bz2 version first and fall back to the regular file. It works file by file, so it is slow for many small files, and contents are not checked: updating a file on the server will not make clients redownload it.
  • ServerDLsv_allowdownload. A 64kb/s limit, file by file. The wiki says to avoid it and warns that players with modified clients can spam file requests to severely lag the server.

.lua files do not count as content and need no extra setup.

Mounting Counter-Strike: Source and other Source game content

The wiki frames this as including content — maps, textures and so on — from Counter-Strike, Team Fortress and other Source games. The symptoms it lists for content that is not mounted include addons complaining about missing game content that is in fact installed, connected clients unable to spawn Hunters or NPCs from HL:S, and spawning the Jalopy doing nothing.

Mounts are declared in garrysmod/cfg/mount.cfg, mapping a game folder name to a path on disk:

"mountcfg"
{
    "cstrike"  "C:\steamcmd\steamapps\common\Counter-Strike Source Dedicated Server\cstrike"
    "tf"       "C:/mytf2server/tf"
}

The engine scans the folders you specify and mounts any sub-folders and VPK files it finds.

An optional companion file, garrysmod/cfg/mountdepots.txt, lists the depots to mount:

"gamedepotsystem"
{
    "cstrike"  "1"
    "hl2"      "1"
}
  • Linux file paths are case-sensitive.
  • -mountcfgfile mount_tools.cfg makes the server read cfg/mount_tools.cfg instead.
  • The same method also mounts games and folder addons into the Hammer Editor.

Common startup errors and how to isolate them

Missing-library errors on Linux. The wiki attributes these to absent 32-bit library support on a 64-bit host; install your distribution's 32-bit packages.

GLIBC_2.15 not found. The host's C library is older than the binaries expect. The wiki names Ubuntu 12.04+ and CentOS 7 as confirmed working and the most supported.

The server stops starting right after a token is added. The wiki states that an invalid or expired key will prevent the server from starting, and that tokens must not be shared between servers.

A Workshop collection does not load. Check its visibility: srcds can only reach collections that are public or unlisted.

A legacy addon is ignored. The wiki reports this affecting legacy addons whose folder names contain capitals, and gives renaming every directory in lowercase as the fix.

The server runs but is not in the browser. Check hide_server: set to 1, it hides the server from the server browser.

Narrowing down a broken addon. -noworkshop temporarily disables Steam Workshop addons and -noaddons temporarily disables folder/legacy addons. Boot clean, then reintroduce in batches.