Enterprise hosting · Built for gamers
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
- Operating system: Windows 10/11 (64-bit) or Linux (Debian/Ubuntu)
- Processor: Relatively undemanding – a modern dual-core is sufficient for small servers. CPU load depends heavily on installed addons
- RAM: 2-4 GB for small servers with 16 slots, 4-6 GB for 32 slots, 6 GB+ for 64 slots with many addons
- Storage: 10 GB free disk space, more depending on the number of addons and maps
- Network: UDP port 27015 must be open. Sufficient upload bandwidth – about 0.5-1 Mbps per player
- SteamCMD: For downloading server files (free, no Steam account required)
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
- Download SteamCMD from the official Valve website
- Create a folder, e.g.
C:\steamcmd - Extract the ZIP file into this folder
- You should now see
steamcmd.exein 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:
- -game garrysmod: Starts the game as Garry's Mod
- -console: Displays the server console
- -ip 0.0.0.0: Binds the server to all network interfaces
- -port 27015: Default port for GMod (UDP)
- +maxplayers: Maximum number of players (default: 32)
- +map: Starting map –
gm_constructorgm_flatgrassare good defaults
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
- Windows: Double-click
start-server.bat - Linux:
./start-server.sh - The console shows the startup process – wait until
VAC secure mode is activatedappears - 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
- Create a collection in the Steam Workshop
- Add the desired addons
- Copy the collection ID from the URL (e.g.
382793424) - Create a Steam Web API Key at steamcommunity.com/dev/apikey
- 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:
- Download the addon (usually a folder with
lua/,models/etc.) - Copy the folder to
garrysmod/addons/ - 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
- Launch Garry's Mod on your PC
- Open the console with the ~ key (enable it in settings first)
- Enter:
connect your-server-ip:27015 - Alternatively: Add the server to Steam favorites and join via the legacy browser
Step 10: Make Yourself Admin
- Find your SteamID (e.g. on steamid.io)
- Open
garrysmod/settings/users.txt(create if it doesn't exist) - Add:
"admins" { "STEAM_0:1:12345678" { "name" "YourName" "group" "superadmin" } } - Restart server or use
ulx adduser YOURNAME superadminin 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:
- Check if UDP port 27015 is open in firewall and router
- Make sure
sv_lan 0is set in server.cfg
Players cannot download addons:
- Use a Workshop Collection – this is the most reliable method
- Check if the Steam Web API Key is valid
- Make sure
sv_allowdownload 1is set
Server crashes on startup:
- Check if all required libraries are installed (Linux:
lib32gcc-s1 lib32stdc++6) - Faulty addons can prevent startup – temporarily remove all addons for testing
High CPU load:
- Reduce tickrate in server.cfg:
sv_minrate 20000 - Limit the maximum number of players
- Remove resource-intensive addons
Quick Checklist
- SteamCMD installed and started
- Server files downloaded with
app_update 4020 validate - Startup script created (.bat or .sh)
- Firewall ports 27015 and 27005 opened
- server.cfg adjusted (hostname, password, RCON)
- Server started and console checked for errors
- Optional: Workshop Collection linked
- Joined with
connect ip:27015 - 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