Installing and Configuring Source Dedicated Server for Garry's Mod
First we'll need to download the hlds updater tool. This program is used to download and update the dedicated server files for different source games.
The hlds updater tool can be downloaded here:
http://storefront.steampowered.com/download/hldsupdatetool.exe
Download and install hldsupdatetool.exe with the default settings. This article assumes you have chosen to install it to c:\srcds. If you have chosen a different directory make sure to keep it handy because you will need it later in the guide.
Preparation
If you are running Windows Vista with User Account Control, right click c:/srcds/hldsupdatetool.exe and choose properties. Click the compatibility tab and check "Run this program as administrator". If it is greyed out then you already have UAC disabled and can safely skip to the next step.
Installation
Now that hlds is at its latest version we will install the server files for Garry's Mod.
Click start and choose run.
Enter "cmd" and press OK. Type in the command "cd c:\srcds"
You will now see a window similar to this:
The command prompt is where we will give commands to the updater, which will be used to download the server files for garrysmod. Before we do that, let's go over some of the formatting used in the command. This will give you the knowledge you need to download the server files for other games such as Counter-Strike Source.
HldsUpdateTool.exe -command update -game garrysmod -dir games
- HldsUpdateTool.exe is the program that downloads the server files for source based games. Running this without any commands will make it update itself to the latest version.
- -command is a parameter that allows you to issue commands to the tool via arguments such as "update"
- The parameter -game is used to choose which server software you want to run. We are using the argument "garrysmod" but "cstrike" can be used if you want to download the files for a Counterstrike Source server.
- The parameter -dir selects the directory that the files will be downloaded to.
Create a folder "games" at c:\srcds\ and issue the command. The server files will start downloading to c:\srcds\games\orangebox\garrysmod. This amount of time this process takes will depend on the speed of your internet connection. Be patient as there are about 1.2 Gigabytes in files to download.
Before we run the server we must make sure people can connect to it. Follow the guide that pertains to your router model and forward the required ports:
http://portforward.com/english/applications/port_forwarding/Counter_Strike/Counter_Strikeindex.htm
This guide only covers Counter-Strike, but the ports for CS and GMod are the same.
Configuration
There are hundreds of settings that can be used to fine tune your server. Some people want a build-only server. Others may want a deathmatch server. Server convars are used to configure certain aspects of your server such as the default gamemode, name of the server, or whether players take damage. This is all done through the magic that is config files. Configuration files, or cfgs for short, are text file that can be used to run multiple commands at once.
The garrysmod config files are stored in the cfg folder, located at "c:\srcds\games\orangebox\garrysmod\cfg". The autoexec.cfg is a configuration file that is automatically loaded when you start the server. This is where we will be putting the convars.
Here is a sample autoexec.cfg: http://www.visualguides.org/wp-content/uploads/autoexec.cfg Place it in the cfg folder.
The next time you run the server the convars you set in the autoexec.cfg will be applied.
Running the server
Once that is complete, open c:\srcds\games\orangebox\ and run the server with this command:
srcds.exe -console -game garrysmod +map gm_construct +maxplayers 2
There are some new parameters here:
- -console will launch a console instead of the GUI version of srcds. This is useful because it uses less system resources than the graphical version.
- +map is the map you want the server to be set to when it runs.
- +maxplayers is the player limit on your server. If set to five only five people will be able to play at once. Be sure to limit this if running srcds on a slower connection
The server should start up:
Congratulations, you now have the files required to run your own Source based gaming server.





Leave a Reply