This article will explain how to download and install a Garry’s Mod server on Windows Server 2012. This guide is made to be in-depth, and some parts may be difficult to understand if you are inexperienced in source dedicated server hosting.
SteamCMD.
Ability to port forward.
A Steam account to create collections (optional).
To make sure you have the latest build of Garry’s Mod Dedicated Server, we will install it through SteamCMD.
Download SteamCMD by using this direct link.
https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zipCreate a folder in a desired location.
Extract the contents of the zip to the folder you’ve created.
Execute the SteamCMD executable in the folder to which you’ve extracted the zip.
Log in to an anonymous account.
login anonymousCreate a folder to store your Garry’s Mod server files.
Select your folder by typing in the following directory path.
force_install_dir C:\my_example_directory\Install Garry’s Mod Dedicated Server.
app_update 4020After waiting for progress to reach 100 percent, verify the downloaded content.
app_update 4020 validateOnce the files have finished downloading, use the following command.
quitAll settings of your server will be found inside the configuration file shown below. Here, you can change parameters to suit what your server needs, such as a hostname, password, tickrate, and many others.
It is recommended that you find an automatic configuration maker, as Garry’s Mod offers a very wide range of customization.
Make sure to research the parameters you are setting, as some parameters are dangerous and may not allow your server to run effectively, and possibly not run at all.
Navigate to your server directory and select the cfg folder.
Locate server.cfg and use Notepad to open it.
Create your required settings, for example:
Select your hostname and turn on content downloading by typing in the following
hostname "Garry's Mod Server"
sv_allowdownload 1Navigate to the folder in which you stored all of your server files.
Create a new notepad text file and paste the text below into it.
@echo off
cls
:srcds
echo (%time%) srcds started.
start /wait srcds.exe -console -game garrysmod +map gm_flatgrass +maxplayers 32
echo (%time%) WARNING: Srcds closed. Restarting server.
goto srcds Save the file as a batch file, and make sure it is in the primary directory of the server folder.
To begin the server, execute the batch file you have created in the primary directory of your Garry’s Mod server.
To allow for external connections to be made to the server, it is important to make sure that you have the following ports open:
27015 UDP
27015 TCP
Garry’s Mod has a Steam Workshop filled with many useful tools, allowing you to create complex and effective servers.
There are 2 separate ways of installing addons onto your server.
Open the Steam Workshop and navigate to Garry’s Mod section.
Subscribe to the addons that you want on your server.
Create a collection containing all of the add-ons that you have selected.
Publish the collection and record the URL of the collection in a place that you can refer to.
Open this link with your Steam account.
Create an API key and choose steamidfinder.com as the API domain.
Record the API key in a place that you can refer to.
Open the batch file you’ve created in the primary directory of the server.
On the line, the following start /wait scrds.exe........., add the following code.
+host_workshop_collection WORKSHOP_URL_ID -authkey API_KEYMake sure to replace WORKSHOP_URL_ID with the digits from your collection URL. Replace the API_KEY with the API key you’ve created earlier.
The batch file should look similar to the following code.
@echo off
cls
:srcds
start /wait srcds.exe -console -game garrysmod +map gm_flatgrass +maxplayers 32
+host_workshop_collection 123456789 -authkey 12345678901234567890
echo (%time%) WARNING: Srcds closed. Restarting server.
goto srcds Manual
Navigate to your server’s main directory.
Inside you will find an addons folder. If not, then you are likely in the wrong subfolder, or it has not been created yet. If so, create a folder named addons.
Inside the addons folder, you can place all your addon files; these will be automatically mounted and executed upon running your server.
Useful Information
It is recommended to run a third-party anti-cheat software with Garry’s Mod, as there is no active anti-cheat, and your server may be vulnerable to attacks by malicious players.
Make sure you don’t overload your Garry’s Mod server with resource-intensive addons and content, and understand that you may need to upgrade your server specifications if necessary to keep your server performing normally.
Garry’s Mod servers are commonly not RAM-intensive, but depending on your customization, there can be a bias towards either RAM or CPU usage.
By opening SteamCMD again, and selecting your installation directory, you can update and/or verify your server files by typing the following after you have logged into SteamCMD.
app_update 4020 validateEnjoy your Garry’s Mod server.