Garry's Mod 8 minute read

Set up a Garry's Mod dedicated server on Windows

Install the server with SteamCMD, start it, and let players connect.

This guide installs a Garry's Mod server on a Windows PC or VPS using SteamCMD, Valve's command line tool for downloading game servers.

Download SteamCMD

  1. Create a folder for it, for example C:\steamcmd.
  2. Download SteamCMD for Windows and extract steamcmd.exe into that folder.
  3. Run steamcmd.exe once. It updates itself and then shows a Steam> prompt. Type quit to close it.

Install the Server Files

Create update.bat next to steamcmd.exe with the line below, then run it. The Garry's Mod dedicated server is app 4020 and downloads with an anonymous login.

Command
steamcmd.exe +force_install_dir C:\gmodserver +login anonymous +app_update 4020 validate +quit

The first download is a few gigabytes. Run the same file again whenever Garry's Mod updates.

Create a Start Script

Build a launch script with the Start.bat Generator. Save it as start.bat in C:\gmodserver, next to srcds.exe, and double click it to start the server.

Your server name, passwords and limits belong in garrysmod\cfg\server.cfg. The Server.cfg Generator writes one for you.

Open Your Ports

  • Allow srcds.exe through Windows Firewall when it asks.
  • Forward port 27015 (UDP and TCP) on your router to the PC running the server, so players outside your network can join.

Connect to the Server

  1. In Garry's Mod, enable the developer console under Options, Keyboard, Advanced.
  2. Press ~ and run connect 127.0.0.1:27015 to join from the same PC.
  3. Friends connect with your public IP address instead, for example connect 203.0.113.10:27015.
Esc