Garry's Mod Updated April 27, 2026

Installing Your Garry's Mod Dedicated Server

Step-by-step guide to installing a GMod dedicated server using SteamCMD and configuring it for first launch on a Pterodactyl panel.

Garry's ModInstallationSteamCMDPterodactyl

Overview

Garry's Mod dedicated servers are installed via SteamCMD using AppID 4020. Note that this is different from the client AppID (4000) — always use 4020 for the dedicated server. The installed server weighs approximately 3.64 GB.

On Pterodactyl, the egg handles SteamCMD installation automatically on first boot. This article covers what the installer does, what variables to set, and how to verify a successful install.

Pterodactyl Startup Variables

Before the server first boots, configure these variables in your panel's Startup tab:

Variable Default Description
SRCDS_MAP gm_flatgrass Map loaded on start
GAMEMODE sandbox Gamemode name
MAX_PLAYERS 32 Slot count
TICKRATE 33 Server tick rate
STEAM_TOKEN (empty) GSLT token for public listing
WORKSHOP_ID (empty) Workshop collection ID

Set STEAM_TOKEN before going public. Without it your server will not appear in the Steam server browser. Obtain a token at steamcommunity.com/dev/managegameservers — select AppID 4020.

Manual SteamCMD Installation

If you need to run SteamCMD manually:

./steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 4020 validate +quit

The validate flag checksums every file against Steam's manifest. Always include it on fresh installs and updates to catch corrupted files.

Server Binaries

On Linux the panel launches via srcds_run, a wrapper script in the server root. The underlying binary is:

  • 32-bit: srcds_linux
  • 64-bit: ./bin/linux64/srcds

On Windows the binary is srcds.exe.

Required Launch Flags

The minimal set of flags needed to start a functional server:

./srcds_run -game garrysmod -console -port 27015 +ip 0.0.0.0 +maxplayers 32

Additional flags used in production:

-norestart          # Panel manages restarts; don't let srcds_run loop
-strictportbind     # Exit if port 27015 is already in use
-tickrate 33        # Set tick rate at launch (cannot change at runtime)
+sv_setsteamaccount <TOKEN>   # GSLT token
+host_workshop_collection <ID>
-authkey <STEAM_WEB_API_KEY>
+gamemode sandbox
+map gm_flatgrass

GSLT Token

A Game Server Login Token (GSLT) is required for your server to appear in the public server browser. Without it, the server still works but is hidden from Steam's list.

  1. Go to steamcommunity.com/dev/managegameservers
  2. Select App ID 4020
  3. Enter a memo (e.g., your server name)
  4. Copy the 32-character token
  5. Paste it into the STEAM_TOKEN variable in your panel, or pass it directly as +sv_setsteamaccount <token> in your launch line

Each token is tied to one server. Running two servers requires two tokens.

Verifying a Successful Install

After first boot, check the console output for:

Connection to Steam servers successful.
VAC secure mode is activated.

If you see VAC secure mode is NOT active your GSLT token is missing or invalid.

Check the server is listening on the correct port:

ss -ulnp | grep 27015