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.
To make sure you have the latest build of Garry's Mod Dedicated Server, we will install it through
Download SteamCMD by using this direct link.
Create 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.
Login to an anonymous account.
Create a folder to store your Garry's Mod server files.
Select your folder by typing in the following directory path.
Install Garry's Mod Dedicated Server.
After waiting for progress to reach 100 percent, verify the downloaded content.
app_update 4020 validate
Once the files have finished downloading, use the following command.
All settings of your server will be found inside of the configuration file shown below, here you can change parameters to suit what your server needs, such as a
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
server.cfg and use
Notepad to open it.
Create your required settings, for example:
hostname and turn on content downloading by typing in the following.
hostname "Garry's Mod Server" sv_allowdownload 1
Navigate to your 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, 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 open a port on Windows, please refer to this article.
To allow for external connections to be made to the server, it is important to make sure that you have the following ports open:
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 the Garry's Mod section.
Subscribe to the addons that you want on your server.
Create a collection containing all of the addons 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 following
start /wait scrds.exe........., add the following code.
+host_workshop_collection WORKSHOP_URL_ID -authkey API_KEY
Make 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
Navigate to your server's main directory.
Inside you will find an addons folder, if not then you are likely in the wrong sub folder or it has not been created yet. If so, create a folder named
Inside the addons folder, you can place all your addon files, these will be automatically mounted and executed upon running your server.
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 validate
Enjoy your Garry's Mod server.