How to create a Garry’s Mod server?
- 3 min read
Creating your own server
This article is about how to create a Garry's Mod server using SteamCMD. It includes installation, adding workshop addons, and more. Follow the steps we have described below.
Installing and updating SteamCMD
SteamCMD is a command-line console used to install Steam-related files and is the mechanism by which the Garry's Mod server is installed and updated.
1) Create a folder for SteamCMD
2) Create a folder for the future server.
3) Download SteamCMD for Windows from this link.
4) Unzip the contents of the zip file to the folder you created for steamcmd.
5) Run the steamcmd.exe program (your computer may ask you to confirm that you want to run it).
6) Once launched, this file will be downloaded, installed and updated to the latest version of SteamCMD.
Setting up a dedicated server for the game
At the console prompt, enter the following commands one by one (press Enter after each):
- force_install_dir "Path to the folder with your server"
- login "Your Steam login"
- password "password"
- app_update 4020 validate
4020 is the identifier of the "Garry's Mod Dedicated Server", do not confuse it with 4000 (id of the regular game)
Configuring your server
The server is installed, now you need to configure it to work properly. You need to configure the server.cfg file. This file is used to set up all the console commands that are automatically executed when the server boots.
The file is located at this path:
"Drive name":/Program Files(x86)/.../.../steamcmd/garrysmod/cfg
In this file, you will find commands and set values. Below we have provided an example of these commands and their description, if you want to change the value, then change the number or words in the value line:
Starting the server
1) To start your server, you need to exit the "garrysmod" folder and create a shortcut to the srcds.exe file.
2) Then right-click on the srcds.exe shortcut, select Properties and enter the following commands in the Target line (Shortcut section):
-console -game garrysmod +map gm_construct +maxplayers 4
3) Then click Apply at the bottom, then Ok.
Workshop add-ons for your server
1) Find the add-ons you are interested in the Gmod Workshop on Steam.
2) Get the collection ID. This is the long number at the end of the URL of the collection page, /id=123456789 (Right-click on the collection page -> Copy URL).
3) Use the identifier to associate the collection with your server. To do this, you need to add the following parameter to the srcds.exe shortcut:
4) For +host_workshop_collection to work, you need an authorization key. You can get it by following this link.
You can use any domain name
5) You also need to add authkey to the parameter string. To do this, use this parameter (to the srcds.exe file):
-authkey <your authkey>
Now you are ready to create your own server! Invite your friends to play and invite other players. Play together with GODLIKE.