From this article you will learn how you can create your own server for the game Garry's Mod, created on the Source engine.

Tools:

1. HLDS updatetool configurator!
2. Tutorial from STEAM.
All this can be downloaded by scrolling to the end of the article.

Server installation:

1. Create any folder on any drive, for example C:\Server\GMod. Next, run the downloaded HLDS updatetool configurator and, for convenience, place it in C:\Server\GMod.

2. Next, run the program. We are prompted to select a language. You can choose any, and I will choose Russian. And click "OK". If you do not have HLDSUpdateTool, then you can download it through the program. In the main window of the program, in the first field, select HLDSUpdatetool.exe, in the next. drop-down list “Not from VALVE”, then “Garry's Mod” and in the last field the folder where to download the server. (!!! ATTENTION !!! THE PATH MUST NOT CONTAIN SPACES!)
After all these manipulations, click “Start downloading” and enjoy the beautiful view of the downloading server.

Wait for the server to download and you can proceed to the next step!

Emulator installation:

Run the emulator you downloaded and install it in the same folder as the server!
Oddly enough, but that's all.

Customization:
The initial configuration is done in the server.cfg file.
This file resides at: Server Path/orangebox/garrysmod/cfg.

Here is an example server.cfg file:

"hostname" "--server name here--"
"rcon_password" "--rcon pass here--"
"sv_password" ""
"sv_region" "0" // eastcoast: 0 - westcoast: 1 - south america: 2 - europe: 3 - asia: 4 - australia: 5 - middle east: 6 - africa: 7 - world: 255
"sv_lan" "0"
sv_tags "no-steam"
sv_use_steam_voice 0
sv_alltalk 1
mp_time limit 60
decal frequency 0
sv_voiceenable 1
sv_allowupload 1
sv_allowdownload 1

// Sandbox server settings
"sbox_allowedpcs" "1"
"sbox_godmode" "0"
"sbox_plpldamage" "0" // set this to 1 to disable player vs player damage.
"sbox_playergod" "0"
"sbox_noclip" "1"

// Sandbox limits
"sbox_maxprops" "150"
"sbox_maxragdolls" "5"
"sbox_maxnpcs" "10"
"sbox_maxballoons" "10"
"sbox_maxeffects" "50"
"sbox_maxdynamite" "10"
"sbox_maxlamps" "20"
"sbox_maxthrusters" "30"
"sbox_maxwheels" "20"
"sbox_maxhoverballs" "20"
"sbox_maxvehicles" "6"
"sbox_maxbuttons" "20"
"sbox_maxsents" "20"
"sbox_maxemitters" "5"
"sbox_maxspawners" "3"
"sbox_maxturrets" "2"

// Sandbox WIRE limits
// If you are not running wire addon, remove this entire section.
"sbox_maxwire_wheels" "20"
"sbox_maxwire_waypoints" "30"
"sbox_maxwire_values" "20"
"sbox_maxwire_twoway_radioes" "30"
"sbox_maxwire_turret" "10"
"sbox_maxwire_thrusters" "30"
"sbox_maxwire_target_finders" "10"
"sbox_maxwire_speedometers" "14"
"sbox_maxwire_emitters" "25"
"sbox_maxwire_simple_explosive" "30"
"sbox_maxwire_sensors" "30"
"sbox_maxwire_screens" "20"
"sbox_maxwire_relays" "20"
"sbox_maxwire_rangers" "20"
"sbox_maxwire_radioes" "30"
"sbox_maxwire_sockets" "20"
"sbox_maxwire_plugs" "20"
"sbox_maxwire_pixels" "20"
"sbox_maxwire_panels" "20"
"sbox_maxwire_outputs" "20"
"sbox_maxwire_oscilloscopes" "20"
"sbox_maxwire_locators" "30"
"sbox_maxwire_lights" "16"
"sbox_maxwire_inputs" "20"
"sbox_maxwire_indicators" "21"
"sbox_maxwire_hoverballs" "20"
"sbox_maxwire_gyroscopes" "10"
"sbox_maxwire_gpss" "10"
"sbox_maxwire_gate_trigs" "30"
"sbox_maxwire_gate_times" "30"
"sbox_maxwire_gate_selections" "30"
"sbox_maxwire_gate_memorys" "30"
"sbox_maxwire_gate_logics" "30"
"sbox_maxwire_gate_comparisons" "30"
"sbox_maxwire_gates" "50"
"sbox_maxwire_explosive" "30"
"sbox_maxwire_dual_inputs" "20"
"sbox_maxwire_detonators" "20"
"sbox_maxwire_buttons" "25"
"sbox_maxwire_adv_inputs" "20"

Launch:
There are two ways to start the server:
1. In console mode
2. Standard, through the srcds.exe file

How to run in console mode?
Create text file, for example, start.txt next to the srcds.exe file

How to create a server in Harris Mod

4 (79%) 20 votes

Installing a dedicated server on Linux can sometimes be a dreary task, especially if you are trying to do it for the first time. Moreover, there is great amount old guides on how to create a server in the Harris Mod steam version, among which it is very difficult to find the truth. What if something went wrong? Even solutions to common problems may be outdated. I hope with this tutorial I will help put you on the right track when raising your server in garris mod. By analogy with it, you can install any. Or you can use my other guides about how.

How to create a server in Harris Mod Steam?

To get started, you first need a server (what a twist). You can try to run on your hardware, or use paid services. I won’t recommend a hoster to you yet (yet), you can find it yourself by searching for “game hosting” or something like that in Google. The main thing is the price / hardware / traffic ratio that is acceptable to you. But it’s not worth taking a completely deshman, it may not pull even 10 slots.

In this guide (as in most of my other guides, because there is nowhere to go) I use the 64 bit version operating system Debian 7. An analogy during installation can be drawn with any Linux-like OS, and everything can be downloaded in the same way, simply by correcting the commands. The most similar will be, perhaps, Ubuntu.

You will also need:

  • Steam account, which will be used to buy games, the content of which you want to upload to the server.
  • Putyashechka (PuTTY) - for accessing the server via SSH protocol.
  • WinSCP - for easier editing and transferring files to the server.

Users, directories and SteamCMD

How to connect to the server using Putti I will leave it up to you, my dear gmodders, I will only add that I outlined the small basics earlier in the article. Here I will briefly go over what to do next after a successful login has occurred and we have updated our notorious turnip packages.

So, first of all, we must add 32-bit libraries, because GABIN conjured SteamCMD to work with them. We do:

apt-get install lib32gcc1

After that, so that if our Harris Mod server is broken by hackers, we will specially launch it under a user distinguished from the superuser (which is root). Let's add it:

We come up with a password for him, the rest can be left blank. We agree. By default, his home directory is /home/garrysmod. Of course, to simplify life, we will immediately work from under the created user. We go under it:

Now, in order to immediately organize some kind of server structure, let's go to the home directory and create a series of folders:

cd /home/garrysmod

mkdir content server steamcmd content/css

Here we have created a folder for the server, steamcmd, and the content of other games. Let's start working on steam. Go to its directory, download the distribution, and unpack it.

Voila, we have a SteamCMD distro. On the first run, we need to update it. In fact, he does it very well himself. We do:

./steamcmd.sh +login anonymous +quit

This command will execute the script, automatically logging in as anonine and exiting it itself. Miracles and more. So, we can start downloading our Harris Mod server. To do this, remember that we created a special server directory and do:

./steamcmd.sh +login anonymous +force_install_dir "/home/garrysmod/server" +app_update 4020 validate +quit

The download process will begin. We take a cup of tea and cookies. In this case, the steam script enters its network under anonymity, sets the server directory /home/garrysmod/server in the configuration, executes the command to download the id 4020, which is the garrys mod id, and then successfully turns off the script. We are waiting for the message “Success! App '4020' fully installed.". We go to the directory with the server and check what we have pumped up there:

cd /home/garrysmod/server

Excellent! The first part of our journey is over.

Server start and initial configuration

At this point, you should have a working, clean (no addons, etc.) Garris Mod server. I believe that now it would be nice to check if it starts up normally and if you can safely join it. Run the following command from the server's home directory:

We should be kindly greeted with approximately the following content:

Fabulous. The server is up and running. If you close the Path window now, you will kill him (gmod server), so be aware of that. We are trying to terminate using our IP and the standard port 27015 in the game with the connect command. In my case everything is connected. We continue the carnival, enter the quit command in the server console. This will turn it off and we will again get into the home directory from which it was started.

Before adding additional content and starting to create an orgy, it is worth personalizing your server a little by editing the configs. You can do this either through the built-in console text editor type nano, either by setting up an ftp server and using FileZilla, or through the same WinSCP. I will show an option for those who are too lazy, namely through the usual nano text editor that comes with Debian.

General configuration

We go to the directory with the server configuration and open our settings file:

Almost absolutely nothing will appear in front of us simply because the file is empty. We will fill it ourselves. For the very lazy, I can offer a variant of this service. Here, just select the checkboxes that you want and the full configuration will appear below, which you just need to copy and save. Below is an example of a basic configuration, which we will simply copy "as long as it works."

hostname "site"
rcon_password ""
sv_password ""
sv region 255
sv_lan 0
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0
sv_noclipspeed 5
sv_noclipaccelerate 5
logging on
//Sandbox settings
sbox_allowedpcs 0
sbox_godmode 0
sbox_plpldamage 0
sbox_playergod 0
sbox_noclip 1
sbox_maxprops 250
sbox_maxragdolls 5
sbox_maxnpcs 5
sbox_maxballoons 25
sbox_maxeffects 25
sbox_maxdynamite 5
sbox_maxlamps 10
sbox_maxthrusters 250
sbox_maxwheels 50
sbox_maxhoverballs 50
sbox_maxvehicles 8
sbox_maxbuttons 50
sbox_maxsents 20
sbox_maxemitters 5
sbox_maxspawners 3
sbox_maxturrets 10
//Server settings
net_maxfilesize 30
sv_minrate 0
sv_maxrate 2500
decal frequency 10
sv_maxupdaterate 66
sv_minupdaterate 10
//Retrieve ban settings
exec banned_ip.cfg
exec banned_user.cfg

Select all this, copy. We go to the console, right-click once and it's all teleport magic appears there. Press the combination Ctrl - X and agree to overwrite the file.

Downloading and Importing Additional Content for Harris Fashion

This is a rather controversial part of this story. Why controversial? Because most people suggest organizing a script at this point. But the trouble is, for each condition and requirement, you may need your own script, and scripts sometimes tend not to work the way we expect them to. Therefore, I propose to organize this moment manually. And there, at your own peril and risk, add and test scripts, play with settings and more.

We will add test content from the Counter-Strike game: Global Offensive(its ID is 740, codes for other games are available), as an example of a game that requires a purchased license on an account. We must log in under the username under which the server is launched and again go to the steam directory:

cd /home/garrysmod/steamcmd

Now we actually start the same download of the game, only using a different account and a different directory we created earlier (content/css).

./steamcmd.sh +login user pass +force_install_dir /home/garrysmod/content/css +app_update 740 validate +exit

I was greeted with a friendly inscription from Steam Guard that I need to confirm that I did not steal this account using a letter in the mail (as if I would not steal the mail if I wanted to) and a code. Enter the code and press Enter. The download process has started. We are waiting for the inscription “Success! App '740' fully installed". It's time to mount the package we downloaded into the Harris Mod system. To do this, you need to edit only one file:

cd /home/garrysmod/server/garrysmod/cfg

Default given file created for Windows systems. We just need to substitute our game and our path in the system. We bring the file to this form:

//
// Use this file to mount additional paths to the filesystem
// DO NOT add a slash to the end of the filename
//

"mountcfg"
{
// "cstrike" "C:\steamcmd\steamapps\common\Counter-Strike Source Ded$
// "tf" "C:\mytf2server\tf"
"csgo" "/home/garrysmod/content/css/csgo"
}

We save the file with the same combinations. Go to the server folder and try to start again.

cd /home/garrysmod/server

./srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct

Upon successful launch and configuration, we will see these messages:

Adding Path: FIND ADDING

Accordingly, our files were successfully mounted. We check in the game. Everything is working.

Fabulous! If you get it right the first time:

Now you can repeat these steps by adding the games you need, first creating directories for them and writing the ones you need in the mount.cfg file. We are at the finish line. We close our server through the Ctrl - C combination or the quit command.

Running in the background and Workshop

As you can see, there was no way we could just start the server and go about our business. That's what the screen utility is for. Install it:

Now, before starting the garris mod server with the workshop, we need to create a collection in steam using this same workshop. This path seems to be well documented, especially on foreign sources, so use a little Google magic here.

In order to start the server without the workshop, we use:

cd /home/garrysmod/server

screen -A -m -d -S garry ./srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct

Using the workshop content:

cd /home/garrysmod/server

screen -A -m -d -S garry ./srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct +host_workshop_collection XXXX -authkey YYYY

Accordingly, we replace XXXX with your ID collection and YYYY with the authorization key.

When you run the command, it will seem to you that nothing happened. But in fact, he launched a server in the background and tagged it as garry. We enter and execute:

This will open the window of the same Harris Mod server that we just launched. In order to disconnect again and leave it to work in the background, execute Ctrl - d + r.

parting word

I hope my story helps someone. I will be glad to hear all questions and comments in the form below. And feel free to use google, there really is just about everything. Stay tuned.


In fact, there is nothing complicated here. We need the SteamCMD utility. You can download it from the official Valve Developers Community wiki. Click here to start downloading.
Unzip the contents of the archive to any folder on your computer. Then open the folder, and holding SHIFT key on the keyboard, press right button mice. Then select "Open Command Window". A black window will appear with one line - the path to the folder. Further, everything is very simple.
You need to run SteamCMD. To do this, in the window that appears, enter steamcmd. The lines will start to flicker. The utility will be updated. With it, many other files will appear in the folder. Don't be scared, that's how it should be. When the last line becomes Steam> means the download is complete.
We need to log in to the Steam Community system.


To enter under your account: Enter to enter login your_login_steam your_password_steam . You will receive a SteamGuard code by email. It will need to be entered in order to continue working.
To sign in with a public account: Enter to enter login anonymous . And that's it.

2. Specifying the path to load the server


Here the command is the same in any case.
force_install_dir path_to_folder_for_server
For example, force_install_dir Z:\Source\Dedicated Servers\GarrysMod
Attention! The folder path for the server must not contain Russian letters!


Just enter app_update 4020 validate

AT command line lines will start running:

Everything is fine. When the last line becomes again Steam> , enter twice quit

Chapter 2 Creating a Bat File


Open Notepad. And copy the following into it:
@echo off
cls
echo Protecting Garry's Mod server (srcds.exe) for crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title GARRY"S MOD - WATCHDOG
:srcds
echo (%time%) srcds started.
srcds.exe -console -game garrysmod -secure +map gm_construct +maxplayers 32
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds
And save in server folder as start.bat:

The note: The line: srcds.exe -console -game garrysmod -secure +map gm_construct +maxplayers 32 can be modified by adding your own variables and settings.

You can do the first start of the server. To do this, use the file start.bat

That's all. Continuation should. In the second part of the article, we will install the admin panel on the server, deal with changing the game mode (only Sandbox will be the default) and connect addons from Steam WorkShop to the server.

From this article you will learn how you can create your own server for the game Garry's Mod, created on the Source engine.

Tools:

1. HLDS updatetool configurator!
2. Tutorial from STEAM.
All this can be downloaded by scrolling to the end of the article.

Server installation:

1. Create any folder on any drive, for example C:\Server\GMod. Next, run the downloaded HLDS updatetool configurator and, for convenience, place it in C:\Server\GMod.

2. Next, run the program. We are prompted to select a language. You can choose any, and I will choose Russian. And click "OK". If you do not have HLDSUpdateTool, then you can download it through the program. In the main window of the program, in the first field, select HLDSUpdatetool.exe, in the next. drop-down list “Not from VALVE”, then “Garry's Mod” and in the last field the folder where to download the server. (!!! ATTENTION !!! THE PATH MUST NOT CONTAIN SPACES!)
After all these manipulations, click “Start downloading” and enjoy the beautiful view of the downloading server.

Wait for the server to download and you can proceed to the next step!

Emulator installation:

Run the emulator you downloaded and install it in the same folder as the server!
Oddly enough, but that's all.

Customization:

Here is an example server.cfg file:

"hostname" "--server name here--"
"rcon_password" "--rcon pass here--"
"sv_password" ""
"sv_region" "0" // eastcoast: 0 - westcoast: 1 - south america: 2 - europe: 3 - asia: 4 - australia: 5 - middle east: 6 - africa: 7 - world: 255
"sv_lan" "0"
sv_tags "no-steam"
sv_use_steam_voice 0
sv_alltalk 1
mp_time limit 60
decal frequency 0
sv_voiceenable 1
sv_allowupload 1
sv_allowdownload 1

// Sandbox server settings
"sbox_allowedpcs" "1"
"sbox_godmode" "0"
"sbox_plpldamage" "0" // set this to 1 to disable player vs player damage.
"sbox_playergod" "0"
"sbox_noclip" "1"

// Sandbox limits
"sbox_maxprops" "150"
"sbox_maxragdolls" "5"
"sbox_maxnpcs" "10"
"sbox_maxballoons" "10"
"sbox_maxeffects" "50"
"sbox_maxdynamite" "10"
"sbox_maxlamps" "20"
"sbox_maxthrusters" "30"
"sbox_maxwheels" "20"
"sbox_maxhoverballs" "20"
"sbox_maxvehicles" "6"
"sbox_maxbuttons" "20"
"sbox_maxsents" "20"
"sbox_maxemitters" "5"
"sbox_maxspawners" "3"
"sbox_maxturrets" "2"

// Sandbox WIRE limits
// If you are not running wire addon, remove this entire section.
"sbox_maxwire_wheels" "20"
"sbox_maxwire_waypoints" "30"
"sbox_maxwire_values" "20"
"sbox_maxwire_twoway_radioes" "30"
"sbox_maxwire_turret" "10"
"sbox_maxwire_thrusters" "30"
"sbox_maxwire_target_finders" "10"
"sbox_maxwire_speedometers" "14"
"sbox_maxwire_emitters" "25"
"sbox_maxwire_simple_explosive" "30"
"sbox_maxwire_sensors" "30"
"sbox_maxwire_screens" "20"
"sbox_maxwire_relays" "20"
"sbox_maxwire_rangers" "20"
"sbox_maxwire_radioes" "30"
"sbox_maxwire_sockets" "20"
"sbox_maxwire_plugs" "20"
"sbox_maxwire_pixels" "20"
"sbox_maxwire_panels" "20"
"sbox_maxwire_outputs" "20"
"sbox_maxwire_oscilloscopes" "20"
"sbox_maxwire_locators" "30"
"sbox_maxwire_lights" "16"
"sbox_maxwire_inputs" "20"
"sbox_maxwire_indicators" "21"
"sbox_maxwire_hoverballs" "20"
"sbox_maxwire_gyroscopes" "10"
"sbox_maxwire_gpss" "10"
"sbox_maxwire_gate_trigs" "30"
"sbox_maxwire_gate_times" "30"
"sbox_maxwire_gate_selections" "30"
"sbox_maxwire_gate_memorys" "30"
"sbox_maxwire_gate_logics" "30"
"sbox_maxwire_gate_comparisons" "30"
"sbox_maxwire_gates" "50"
"sbox_maxwire_explosive" "30"
"sbox_maxwire_dual_inputs" "20"
"sbox_maxwire_detonators" "20"
"sbox_maxwire_buttons" "25"
"sbox_maxwire_adv_inputs" "20"

Launch:

There are two ways to start the server:
1. In console mode
2. Standard, through the srcds.exe file

How to run in console mode?

Create a text file, for example, start.txt next to the srcds.exe file
Next, enter the script into this file:


@echo off
cls
echo Running Server...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title Server
echo WARNING: If server was closed or crashed, then restarted!
:srcds
echo (Ъte% %time%) Server started sucsessful.
reg add "HKCU\Software\Valve\Steam\ActiveProcess" /v SteamClientDll /t REG_SZ /d "" /f
start /wait srcds.exe -console -game garrysmod -port 27015 +maxplayers 32 +map gm_construct +exec server.cfg
goto srcds
exit

Download toolkit: