🇩🇪 DE 🇬🇧 EN
NexoraHost / Docs home
Popular searches:Minecraft won't startCreate Minecraft serverFiveM txAdminInstall WordPressSet up subdomainVPS GermanySSL errorOpen port 25565Discord bot hostingDNS troubleshooting

How to Install a Garry's Mod Server

Quick answer: Install GMod server via SteamCMD (app 4020), open port 27015 UDP, configure server.cfg and add workshop addons.

This guide shows you step by step how to set up a Garry's Mod (GMod) Dedicated Server – both on Windows and Linux. GMod thrives on mods and custom content, so we also cover setting up addons directly.

Requirements

Step 1: Download and Set Up SteamCMD

SteamCMD is Valve's command-line tool for downloading server files. You don't need a Steam account – login is anonymous.

Windows

  1. Download SteamCMD from the official Valve website
  2. Create a folder, e.g. C:\steamcmd
  3. Extract the ZIP file into this folder
  4. You should now see steamcmd.exe in the folder

Linux (Debian/Ubuntu)

# Install dependencies
sudo apt install -y lib32gcc-s1 lib32stdc++6 curl tar

# Create SteamCMD folder
mkdir ~/steamcmd && cd ~/steamcmd

# Download and extract SteamCMD
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

# Start and update SteamCMD
./steamcmd.sh

Step 2: Download Garry's Mod Server Files

Start SteamCMD and run the following commands. The App ID for the Garry's Mod Dedicated Server is 4020:

# Set installation directory
force_install_dir C:\gmod-server    # Windows
force_install_dir ~/gmod            # Linux

# Anonymous login (no Steam account needed)
login anonymous

# Download server files
app_update 4020 validate

# Quit SteamCMD
quit

The download takes a few minutes. Using validate checks files for corruption – it's slower but safer.

Step 3: Create Server Startup Script

Windows (start-server.bat)

Create a new text file start-server.bat in the server folder with the following content:

@echo off
.\srcds.exe -game garrysmod -console -ip 0.0.0.0 -port 27015 +maxplayers 32 +map gm_construct

Linux (start-server.sh)

nano ~/gmod/start-server.sh

Add the following content:

#!/bin/bash
./srcds_run -game garrysmod -console -ip 0.0.0.0 -port 27015 +maxplayers 32 +map gm_construct

Make the file executable:

chmod +x ~/gmod/start-server.sh

Explanation of startup parameters:

Step 4: Open Firewall Ports

Garry's Mod uses UDP port 27015 for game connection and UDP 27005 for the client.

Linux (UFW)

sudo ufw allow 27015/udp
sudo ufw allow 27005/udp

Windows Firewall (PowerShell as Administrator)

New-NetFirewallRule -DisplayName "GMod Server" -Direction Inbound -Protocol UDP -LocalPort 27015,27005 -Action Allow

Then forward the ports in your router to your server's local IP address.

Step 5: Start Server and First Test

  1. Windows: Double-click start-server.bat
  2. Linux: ./start-server.sh
  3. The console shows the startup process – wait until VAC secure mode is activated appears
  4. The server is now ready for connections

Step 6: Server Configuration (server.cfg)

You'll find server.cfg in the garrysmod/cfg/ folder. Create or edit it:

// Server name
hostname "My GMod Server"

// Password (leave empty for public server)
sv_password ""

// RCON password for remote control
rcon_password "your-secure-password"

// Region (255 = Worldwide)
sv_region 255

// Allow download of server-side files
sv_allowdownload 1
sv_allowupload 1

// Language
sv_lan 0

// Maximum tickrate
sv_minrate 50000
sv_maxrate 128000

Step 7: Install Addons from Steam Workshop

The easiest method to install mods is a Steam Workshop Collection. The server downloads the addons automatically and players receive them when connecting.

Create and Link a Collection

  1. Create a collection in the Steam Workshop
  2. Add the desired addons
  3. Copy the collection ID from the URL (e.g. 382793424)
  4. Create a Steam Web API Key at steamcommunity.com/dev/apikey
  5. Add the following parameters to your startup script:
    +host_workshop_collection 382793424 -authkey YOUR_API_KEY

Manual Addon Installation

For individual addons without a Workshop Collection:

  1. Download the addon (usually a folder with lua/, models/ etc.)
  2. Copy the folder to garrysmod/addons/
  3. Restart the server

Step 8: Change Gamemode

GMod offers countless gamemodes – from Sandbox to TTT to DarkRP. Set the gamemode in the startup script:

# Sandbox (Default)
+gamemode sandbox

# Trouble in Terrorist Town (TTT)
+gamemode terrortown

# Prop Hunt
+gamemode prop_hunt

# DarkRP
+gamemode darkrp

# Zombie Survival
+gamemode zombiesurvival

Step 9: Join the Server

  1. Launch Garry's Mod on your PC
  2. Open the console with the ~ key (enable it in settings first)
  3. Enter: connect your-server-ip:27015
  4. Alternatively: Add the server to Steam favorites and join via the legacy browser

Step 10: Make Yourself Admin

  1. Find your SteamID (e.g. on steamid.io)
  2. Open garrysmod/settings/users.txt (create if it doesn't exist)
  3. Add:
    "admins"
    {
        "STEAM_0:1:12345678"
        {
            "name"  "YourName"
            "group"  "superadmin"
        }
    }
  4. Restart server or use ulx adduser YOURNAME superadmin in the console (if ULX is installed)

Hardware Recommendations by Server Type

Server Type RAM CPU Slots
Sandbox / Light 2-4 GB 2 cores 16
TTT / Prop Hunt 4-6 GB 2-3 cores 32
DarkRP with Addons 6-8 GB 3-4 cores 64
Many Addons (100+) 8-12 GB 4 cores at 3.5 GHz+ 64+

Common Problems

Server not showing in the server list:

Players cannot download addons:

Server crashes on startup:

High CPU load:

Quick Checklist

  1. SteamCMD installed and started
  2. Server files downloaded with app_update 4020 validate
  3. Startup script created (.bat or .sh)
  4. Firewall ports 27015 and 27005 opened
  5. server.cfg adjusted (hostname, password, RCON)
  6. Server started and console checked for errors
  7. Optional: Workshop Collection linked
  8. Joined with connect ip:27015
  9. Added yourself as admin

NexoraHost

Order your game server

Minecraft, ARK, FiveM & 24+ games – 1-click install, mods allowed, from €4.99/mo.

nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime