How to run a Garry's Mod server on Windows
Garry's Mod (GMod) is one of the most interesting games to ever exist. Although you'd generally want to rent a dedicated server to host a GMod game server, trying it out on your PC first is a great idea, particularly given how unique and expansive GMod game types can be.
This guide will outline how to host a GMod server on a computer running Microsoft Windows. We certainly recommend hiring a dedicated server or VPS (Virtual Private Server) for anything in the long-term.
Any issues?Did anything in this guide not work as expected? Please let us know in the comments below!
- A computer set up with either Windows or Windows Server
- SteamCMD (Command Line Steam Client) - http://media.steampowered.com/installer/steamcmd.zip
- Port forwarding of port 27015 to your network IP address (on your router)
- Create a folder on your desktop, name it SteamCMD.
- Download SteamCMD from the link in the requirements - it should be in a ZIP file.
- Open the ZIP file, you should see an executable file by the name of steamcmd.exe.
Extract steamcmd.exe to the SteamCMD you created on your Desktop in Step 1.
The SteamCMD folder should like this:
- Open steamcmd.exe which will open a console and proceed to update. You will see lots of files being created in the SteamCMD folder - this is normal. Let it finish.
- Once a cursor starts blinking, it is done and is ready to be used. Enter: "login anonymous". It should proceed to log in to the Steam servers.
- Now, create a new folder on your desktop and name it "gmodserver". This is where the server will be installed.
- Once you created the folder, go back to the steamcmd console and enter: "force_install_dir DIRECTORY HERE" - with the directory to GMod server folder on your desktop (e.g.: force_install_dir C:\Users\Administrator\Desktop\gmodserver).
- Now enter app_update 4020. It should proceed to download the server files to the gmodserver folder.
- Once it is done downloading the files, type quit to close it. Now we are done using the SteamCMD console.
- Open the gmodserver folder and you should see a few new files, look below for reference:
- Create a text document and name it start.txt, then open it for editing.
- Copy and paste the start.bat code (click here to view it) and click: File > Save As, a window should pop up. Instead of "start.txt", name the file "start.bat", and save it.
- Now when you launch it, it should start the Garry's Mod server. You don't need the start.txt anymore, so you can delete it.
Now what happens - how can people connect to my server?
Now you may notice that you can connect to the server, but no one else. You must port forward the server port to allow people to connect to it. You must connect to your router, and configure port 27015 to forward to your computer's IP address (if your computer's IP address changes, you may need to update this each time you reboot your computer, or re-connect to the network).
Restart your server and it should now be publicly available, and no longer "local".
Changing game modes
If you want to change your game mode from the regular sandbox, you can download any game mode and place the game mode folder in gmodserver > garrysmod > gamemode. You'll then need to edit your start.bat file and change +gamemode sandbox to +gamemode GAMEMODE NAME. Save the file and restart the server.
Some game mode recommendations
DarkRP: A very popular game mode on Garry's Mod at the time of writing, has lots of features that players enjoy. Basically, DarkRP is a roleplay game mode, where you create jobs that people can perform.
Trouble in Terrorist Town (TTT): This game mode is built into the game by default, the name of the folder is "terrortown". All the players spawn in random areas of the map and find a weapon. A small group of people are traitors, a small group are detectives, and a small group are innocent bystanders. The objective is to find and kill all the traitors, or the traitors will kill all detectives and innocent bystanders.
Murder: Very similar to the TTT game mode, except that there are fewer weapons - only a revolver. One player spawns with the gun, and another player is the designated murderer. The player with the gun must take out the murderer, while the murderer is trying to eliminate everyone else.
Sandbox: This game mode is built into the game by default - the name of the folder is sandbox. Basically, you can do anything in this game mode. Anything you desire is possible, with no rules or restrictions.
If you want to change the server settings, we strongly recommend using the server.cfg file generator and copying/pasting the code into gmodserver > garrysmod > cfg > server.cfg, then saving this file, and restarting the server.
If anything in this guide didn't work as expected, please let us know in the comments below!