How to host gmod server
How to host gmod server
How to host gmod server
A tutorial on how to host a Garry’s Mod Server using SteamCMD, completely written from scratch. It will include: Installation, port forwarding, and how to add workshop addons, and a few more details.
NOTE (08. Feb 2022): This is a very old guide which I have not properly updated at least since 2017. It is possible that parts of this guide are outdated and that the process has changed in some way. If this happens to be the case, then it is highly unlikely that I will update that part to reflect the changes that have been made in GMod’s update history. I stopped playing Garry’s Mod years ago, so I haven’t followed its updates since then either. This really shows in the poor spelling and wording at some places that probably hasn’t changed since I wrote this guide back in 2013, when my English skills were still leaving a lot to be desired.
97,106 | уникальных посетителей |
1,205 | добавили в избранное |
First, you need to download SteamCMD, of course. This program is used to install the actual files for your server, and to install the Garry’s Mod files.
You can download SteamCMD here.
(Direct download link http ://media.steampowered(.)com/installer/steamcmd.zip)
Now, that SteamCMD is ready, we will begin installing the server.
First, you start off by logging in. Type this command in the command prompt that is currently open:
The command prompt should return this information:
After logging in, you have to determine the path where the server will be installed.
To do this, use this command:
If you want to set the path to something further than just the C:\ drive, then type out the path carefully, and make sure it contains no spaces, otherwise it will make seperate folders.
To install the Garry’s Mod files, type the following command in the prompt:
If you have quite slow internet, then this process could take about half an hour. Fast internet however can do this quickly in just a few minutes.
4020 is the ID of «Garry’s Mod Dedicated Server», not to be confused with 4000, which is the AppID of the game Garry’s Mod itself. http://steamdb.info/app/4020/
To add other game content to your server(e.g:TF2, DoD:S etc.), you have to use the app_update command again. You just have to change the ID 4020 to the ID of the game you want to mount, and change the force_install_dir as well (I recommend making a folder inside the server folder which you install it into). However, it is very likely that these install possibilities do not allow anonymous login. In this case, you have to login with your steam username and password.
Mostly copied from the valve developer wiki, only because it’s fairly useful material.
Only useful for updating your server.
You can also automate this process. There are 2 ways to do that:
Run the commands all at once:
+app_update 4020 validate +quit
If you are logging in with an account, use username password instead of «anonymous» at the +login command.
Then run this script with the +runscript command in SteamCMD:
Okay, our server is now installed. Now, we have to configure it, to make it fully work, and to keep things organized.
First thing you should do, is to configure the server.cfg file. This file is used to set the Sandbox limits, and to set all console commands that are getting automatically executed when the server is booting up.
This file is located here: drive name:/Program Files(x86)/yourfilepath/blah/steamcmd/garrysmod/cfg
An example of a server.cfg file would look like this:
//The lines are used to make big spaces, since using blank spaces does not work in Steam. Replace the lines with blank spaces, or press «TAB» around 6 times to make a big space.
«hostname»———————————————«My Garry’s Mod Sandbox Server»
«rcon_password»————————————-«serveradmin»
«sbox_noclip»——————————————«1» //Enables noclip
«sbox_maxprops»————————————«500»
«sbox_maxeffects»————————————«15»
«sbox_maxemitters»———————————«15»
«sbox_maxthrusters»———————————«30»
«sbox_maxsents»————————————«35»
//etc.
«sbox_playershurtplayers»————————-«1» //Enables PVP Damage
//And you can put in some different console commands which you want to be «autoexecuted»
Note that this is just an example to show you how a proper config file looks like syntactically.
Formated in a table:
An unconfigured server.cfg file only contains 3 blank lines.
For better security, I recommend to put the RCON password into the parameter line of your srcds.exe shortcut with +rcon_password password. However, you can also completely disable RCON by simply not setting a password.
To run your server, you must exit the «garrysmod» folder,and make a shortcut of the srcds.exe file.
Then, right click on the srcds.exe shortcut, click on «Properties», and enter this command line in the parameter line:
And then add the commands after it.
(Unfortunately I couldn’t change the language of Windows to English, because I don’t have the appropriate Windows 7 edition for that.)
Double-click the shortcut, and the server should run smoothly.
Simply doing these steps is not enough. The server seems to run, and you are able to join, but something else is missing. The server will not respond to your friends. When they try to join by joining your game, it will kick them because they «failed after 4 retries». This is because nobody but you, at the moment, has the permission to connect to your host. Port forwarding will not make your router settings accessible from anywhere, it will only make it possible for everyone to join your server, which is hidden behind a router wall.
What you have to do in steps:
1. Go to your desktop and open up your start menu.
2. Search for «cmd» in the search bar. A command prompt should open.
3. In the command prompt, type «ipconfig» and press ENTER.
4. A list of IPs, IDs and whatnot should appear. Search the «Ethernet Adaptor LAN» section.
5. When you found it, look up the Standard Gateway of that section, and remember it in any way.
6. Open up your web browser, type in the default gateway into the URL bar, and press enter. A login screen should appear, either a windows screen or a website login page.
7. Enter the login information for your router. If you don’t know the information, ask anyone who knows it or might know it, or look it up on your router box. If possible, use the default login «admin», for username and password.
8. Set up the port forward. For this, find a section for forwarding ports (it’s different on all router pages), and fill in all required values and information. You can set the Service Port as 27015-27016(Use 27015 only if only one port is required), the IP Address your IPv4 Address, and the Protocol «Any» or «All» or «TCP/UDP» (Again, depending on your router page).
9. Start up the port forward, and you’re done.
This step is entirely optional, it is not crucial for making anything work about your server. Setting up a static IP address is explained below.
Open up your command prompt, and run the command «ipconfig /all» without the quotes. Then, search the IPv4 Address of the Ethernet-Adaptor LAN Area or something like that, the Subnet Mask, and the Default Gateway. We will use this information later.
Next, open your start menu, and click on «Control Panel». Then, search the «Network and Internet» entry, and click on the button which should say something like «Show Network status».
After this, right click on «LAN-Connection», and then click on «Properties».
You should see a list of which Elements your connection uses. Double-click «Internet Protocol Version 4», and you should enter the IP Settings of it. After you have done this all, tick «Use the following IP-Address». Doing this should automaticly tick «Use the following DNS-Serveraddress:»
The IP-Address you insert is the static one. It should be very similiar to your actual IP address. Let’s say, your actual IP address is 192.168.2.255 (see what I did there?). In the box, you type in 192.168.2.248.
The Subnet Mask is the one you got from your ipconfig. Same with the Standard Gateway.
Now, you have to fill out the DNS Server addresses. To get the ones you need, you can log into your Router’s Webpage, and then view the Stats of your router. There should be an entry somewhere for DNS Servers.
To make it simple and clear, I listed up the steps you have to do to add workshop addons for your server:
An authkey is required to make +host_workshop_collection work. You can get one here.
You can use anything as the domain name.
You need to add the authkey to the parameter line as well. To do this, use this parameter:
Well, the addons might be on your server now, but all addons that have their own content will show error signs and checkerboard textures, and missing sounds, if the player doesn’t have the addon installed on their client. So we need to force a download of their content, in a way which will be explained below.
This is a list of the most commonly used and useful console commands which can be used to manage and configure your server to your likings.
That was all (or well, most) stuff I know about hosting a Garry’s Mod Server. If something went wrong during installing the server, then you can ask in the comments, and I, or someone else, can maybe help you solve the problem.
Italic = Question
Bold = Answer
What is the Parameter Line?
The Parameter Line is the «Target» line you have to type the parameters in.
IT IS NOT WORKING
That isn’t even a question, but well. If it doesn’t work, then point out WHAT doesn’t work, and I, or maybe someone can help you.
When I run app_update 4020 validate, it says «no subscription» and refuses to install the app. How do I fix that?
You have to log in anonymously by running the command «login anonymous» to make it work. You seem to have forgot to do this.
When I try to install the app, I get error «Error! App ‘4020’ is x after update job.» What does that mean?
That means, that the directory you determined with force_install_dir seems to be invalid. It may not be your client GMod directory, use a completely different one, and make sure it contains no spaces(this shouldn’t actually cause this error, but just to be safe, do not put any spaces into your directory). I recommend to use a completely new directory just for your server, to keep everything clean.
I get this error: [ERROR] lua/autorun/addons.lua:1: attempt to call field ‘AddWorkshop’ (a nil val
ue) when I make my lua file for downloading workshop content. What can I do about that?
Make sure the lua file is located in lua/autorun/server of your server files, and that you use «resource.AddWorkshop( «id» )» for marking all the workshop addons you want to be downloaded by the players.
My server is running, and I forwarded the port, but my friends still cannot join!
Seems like you port forwarded incorrectly. You can «experiment» with the values, try changing them a little, and it might work. I had this problem too, and I fixed it by doing this. Also, make sure that your Firewall is disabled. This isn’t required for everyone, but you should try disabling it.
How to host gmod server
A tutorial on how to host a Garry’s Mod Server using SteamCMD, completely written from scratch. It will include: Installation, port forwarding, and how to add workshop addons, and a few more details.
NOTE (08. Feb 2022): This is a very old guide which I have not properly updated at least since 2017. It is possible that parts of this guide are outdated and that the process has changed in some way. If this happens to be the case, then it is highly unlikely that I will update that part to reflect the changes that have been made in GMod’s update history. I stopped playing Garry’s Mod years ago, so I haven’t followed its updates since then either. This really shows in the poor spelling and wording at some places that probably hasn’t changed since I wrote this guide back in 2013, when my English skills were still leaving a lot to be desired.
97,106 | уникальных посетителей |
1,205 | добавили в избранное |
First, you need to download SteamCMD, of course. This program is used to install the actual files for your server, and to install the Garry’s Mod files.
You can download SteamCMD here.
(Direct download link http ://media.steampowered(.)com/installer/steamcmd.zip)
Now, that SteamCMD is ready, we will begin installing the server.
First, you start off by logging in. Type this command in the command prompt that is currently open:
The command prompt should return this information:
After logging in, you have to determine the path where the server will be installed.
To do this, use this command:
If you want to set the path to something further than just the C:\ drive, then type out the path carefully, and make sure it contains no spaces, otherwise it will make seperate folders.
To install the Garry’s Mod files, type the following command in the prompt:
If you have quite slow internet, then this process could take about half an hour. Fast internet however can do this quickly in just a few minutes.
4020 is the ID of «Garry’s Mod Dedicated Server», not to be confused with 4000, which is the AppID of the game Garry’s Mod itself. http://steamdb.info/app/4020/
To add other game content to your server(e.g:TF2, DoD:S etc.), you have to use the app_update command again. You just have to change the ID 4020 to the ID of the game you want to mount, and change the force_install_dir as well (I recommend making a folder inside the server folder which you install it into). However, it is very likely that these install possibilities do not allow anonymous login. In this case, you have to login with your steam username and password.
Mostly copied from the valve developer wiki, only because it’s fairly useful material.
Only useful for updating your server.
You can also automate this process. There are 2 ways to do that:
Run the commands all at once:
+app_update 4020 validate +quit
If you are logging in with an account, use username password instead of «anonymous» at the +login command.
Then run this script with the +runscript command in SteamCMD:
Okay, our server is now installed. Now, we have to configure it, to make it fully work, and to keep things organized.
First thing you should do, is to configure the server.cfg file. This file is used to set the Sandbox limits, and to set all console commands that are getting automatically executed when the server is booting up.
This file is located here: drive name:/Program Files(x86)/yourfilepath/blah/steamcmd/garrysmod/cfg
An example of a server.cfg file would look like this:
//The lines are used to make big spaces, since using blank spaces does not work in Steam. Replace the lines with blank spaces, or press «TAB» around 6 times to make a big space.
«hostname»———————————————«My Garry’s Mod Sandbox Server»
«rcon_password»————————————-«serveradmin»
«sbox_noclip»——————————————«1» //Enables noclip
«sbox_maxprops»————————————«500»
«sbox_maxeffects»————————————«15»
«sbox_maxemitters»———————————«15»
«sbox_maxthrusters»———————————«30»
«sbox_maxsents»————————————«35»
//etc.
«sbox_playershurtplayers»————————-«1» //Enables PVP Damage
//And you can put in some different console commands which you want to be «autoexecuted»
Note that this is just an example to show you how a proper config file looks like syntactically.
Formated in a table:
An unconfigured server.cfg file only contains 3 blank lines.
For better security, I recommend to put the RCON password into the parameter line of your srcds.exe shortcut with +rcon_password password. However, you can also completely disable RCON by simply not setting a password.
To run your server, you must exit the «garrysmod» folder,and make a shortcut of the srcds.exe file.
Then, right click on the srcds.exe shortcut, click on «Properties», and enter this command line in the parameter line:
And then add the commands after it.
(Unfortunately I couldn’t change the language of Windows to English, because I don’t have the appropriate Windows 7 edition for that.)
Double-click the shortcut, and the server should run smoothly.
Simply doing these steps is not enough. The server seems to run, and you are able to join, but something else is missing. The server will not respond to your friends. When they try to join by joining your game, it will kick them because they «failed after 4 retries». This is because nobody but you, at the moment, has the permission to connect to your host. Port forwarding will not make your router settings accessible from anywhere, it will only make it possible for everyone to join your server, which is hidden behind a router wall.
What you have to do in steps:
1. Go to your desktop and open up your start menu.
2. Search for «cmd» in the search bar. A command prompt should open.
3. In the command prompt, type «ipconfig» and press ENTER.
4. A list of IPs, IDs and whatnot should appear. Search the «Ethernet Adaptor LAN» section.
5. When you found it, look up the Standard Gateway of that section, and remember it in any way.
6. Open up your web browser, type in the default gateway into the URL bar, and press enter. A login screen should appear, either a windows screen or a website login page.
7. Enter the login information for your router. If you don’t know the information, ask anyone who knows it or might know it, or look it up on your router box. If possible, use the default login «admin», for username and password.
8. Set up the port forward. For this, find a section for forwarding ports (it’s different on all router pages), and fill in all required values and information. You can set the Service Port as 27015-27016(Use 27015 only if only one port is required), the IP Address your IPv4 Address, and the Protocol «Any» or «All» or «TCP/UDP» (Again, depending on your router page).
9. Start up the port forward, and you’re done.
This step is entirely optional, it is not crucial for making anything work about your server. Setting up a static IP address is explained below.
Open up your command prompt, and run the command «ipconfig /all» without the quotes. Then, search the IPv4 Address of the Ethernet-Adaptor LAN Area or something like that, the Subnet Mask, and the Default Gateway. We will use this information later.
Next, open your start menu, and click on «Control Panel». Then, search the «Network and Internet» entry, and click on the button which should say something like «Show Network status».
After this, right click on «LAN-Connection», and then click on «Properties».
You should see a list of which Elements your connection uses. Double-click «Internet Protocol Version 4», and you should enter the IP Settings of it. After you have done this all, tick «Use the following IP-Address». Doing this should automaticly tick «Use the following DNS-Serveraddress:»
The IP-Address you insert is the static one. It should be very similiar to your actual IP address. Let’s say, your actual IP address is 192.168.2.255 (see what I did there?). In the box, you type in 192.168.2.248.
The Subnet Mask is the one you got from your ipconfig. Same with the Standard Gateway.
Now, you have to fill out the DNS Server addresses. To get the ones you need, you can log into your Router’s Webpage, and then view the Stats of your router. There should be an entry somewhere for DNS Servers.
To make it simple and clear, I listed up the steps you have to do to add workshop addons for your server:
An authkey is required to make +host_workshop_collection work. You can get one here.
You can use anything as the domain name.
You need to add the authkey to the parameter line as well. To do this, use this parameter:
Well, the addons might be on your server now, but all addons that have their own content will show error signs and checkerboard textures, and missing sounds, if the player doesn’t have the addon installed on their client. So we need to force a download of their content, in a way which will be explained below.
This is a list of the most commonly used and useful console commands which can be used to manage and configure your server to your likings.
That was all (or well, most) stuff I know about hosting a Garry’s Mod Server. If something went wrong during installing the server, then you can ask in the comments, and I, or someone else, can maybe help you solve the problem.
Italic = Question
Bold = Answer
What is the Parameter Line?
The Parameter Line is the «Target» line you have to type the parameters in.
IT IS NOT WORKING
That isn’t even a question, but well. If it doesn’t work, then point out WHAT doesn’t work, and I, or maybe someone can help you.
When I run app_update 4020 validate, it says «no subscription» and refuses to install the app. How do I fix that?
You have to log in anonymously by running the command «login anonymous» to make it work. You seem to have forgot to do this.
When I try to install the app, I get error «Error! App ‘4020’ is x after update job.» What does that mean?
That means, that the directory you determined with force_install_dir seems to be invalid. It may not be your client GMod directory, use a completely different one, and make sure it contains no spaces(this shouldn’t actually cause this error, but just to be safe, do not put any spaces into your directory). I recommend to use a completely new directory just for your server, to keep everything clean.
I get this error: [ERROR] lua/autorun/addons.lua:1: attempt to call field ‘AddWorkshop’ (a nil val
ue) when I make my lua file for downloading workshop content. What can I do about that?
Make sure the lua file is located in lua/autorun/server of your server files, and that you use «resource.AddWorkshop( «id» )» for marking all the workshop addons you want to be downloaded by the players.
My server is running, and I forwarded the port, but my friends still cannot join!
Seems like you port forwarded incorrectly. You can «experiment» with the values, try changing them a little, and it might work. I had this problem too, and I fixed it by doing this. Also, make sure that your Firewall is disabled. This isn’t required for everyone, but you should try disabling it.
How to host gmod server
A tutorial on how to host a Garry’s Mod Server using SteamCMD, completely written from scratch. It will include: Installation, port forwarding, and how to add workshop addons, and a few more details.
NOTE (08. Feb 2022): This is a very old guide which I have not properly updated at least since 2017. It is possible that parts of this guide are outdated and that the process has changed in some way. If this happens to be the case, then it is highly unlikely that I will update that part to reflect the changes that have been made in GMod’s update history. I stopped playing Garry’s Mod years ago, so I haven’t followed its updates since then either. This really shows in the poor spelling and wording at some places that probably hasn’t changed since I wrote this guide back in 2013, when my English skills were still leaving a lot to be desired.
97,106 | уникальных посетителей |
1,205 | добавили в избранное |
First, you need to download SteamCMD, of course. This program is used to install the actual files for your server, and to install the Garry’s Mod files.
You can download SteamCMD here.
(Direct download link http ://media.steampowered(.)com/installer/steamcmd.zip)
Now, that SteamCMD is ready, we will begin installing the server.
First, you start off by logging in. Type this command in the command prompt that is currently open:
The command prompt should return this information:
After logging in, you have to determine the path where the server will be installed.
To do this, use this command:
If you want to set the path to something further than just the C:\ drive, then type out the path carefully, and make sure it contains no spaces, otherwise it will make seperate folders.
To install the Garry’s Mod files, type the following command in the prompt:
If you have quite slow internet, then this process could take about half an hour. Fast internet however can do this quickly in just a few minutes.
4020 is the ID of «Garry’s Mod Dedicated Server», not to be confused with 4000, which is the AppID of the game Garry’s Mod itself. http://steamdb.info/app/4020/
To add other game content to your server(e.g:TF2, DoD:S etc.), you have to use the app_update command again. You just have to change the ID 4020 to the ID of the game you want to mount, and change the force_install_dir as well (I recommend making a folder inside the server folder which you install it into). However, it is very likely that these install possibilities do not allow anonymous login. In this case, you have to login with your steam username and password.
Mostly copied from the valve developer wiki, only because it’s fairly useful material.
Only useful for updating your server.
You can also automate this process. There are 2 ways to do that:
Run the commands all at once:
+app_update 4020 validate +quit
If you are logging in with an account, use username password instead of «anonymous» at the +login command.
Then run this script with the +runscript command in SteamCMD:
Okay, our server is now installed. Now, we have to configure it, to make it fully work, and to keep things organized.
First thing you should do, is to configure the server.cfg file. This file is used to set the Sandbox limits, and to set all console commands that are getting automatically executed when the server is booting up.
This file is located here: drive name:/Program Files(x86)/yourfilepath/blah/steamcmd/garrysmod/cfg
An example of a server.cfg file would look like this:
//The lines are used to make big spaces, since using blank spaces does not work in Steam. Replace the lines with blank spaces, or press «TAB» around 6 times to make a big space.
«hostname»———————————————«My Garry’s Mod Sandbox Server»
«rcon_password»————————————-«serveradmin»
«sbox_noclip»——————————————«1» //Enables noclip
«sbox_maxprops»————————————«500»
«sbox_maxeffects»————————————«15»
«sbox_maxemitters»———————————«15»
«sbox_maxthrusters»———————————«30»
«sbox_maxsents»————————————«35»
//etc.
«sbox_playershurtplayers»————————-«1» //Enables PVP Damage
//And you can put in some different console commands which you want to be «autoexecuted»
Note that this is just an example to show you how a proper config file looks like syntactically.
Formated in a table:
An unconfigured server.cfg file only contains 3 blank lines.
For better security, I recommend to put the RCON password into the parameter line of your srcds.exe shortcut with +rcon_password password. However, you can also completely disable RCON by simply not setting a password.
To run your server, you must exit the «garrysmod» folder,and make a shortcut of the srcds.exe file.
Then, right click on the srcds.exe shortcut, click on «Properties», and enter this command line in the parameter line:
And then add the commands after it.
(Unfortunately I couldn’t change the language of Windows to English, because I don’t have the appropriate Windows 7 edition for that.)
Double-click the shortcut, and the server should run smoothly.
Simply doing these steps is not enough. The server seems to run, and you are able to join, but something else is missing. The server will not respond to your friends. When they try to join by joining your game, it will kick them because they «failed after 4 retries». This is because nobody but you, at the moment, has the permission to connect to your host. Port forwarding will not make your router settings accessible from anywhere, it will only make it possible for everyone to join your server, which is hidden behind a router wall.
What you have to do in steps:
1. Go to your desktop and open up your start menu.
2. Search for «cmd» in the search bar. A command prompt should open.
3. In the command prompt, type «ipconfig» and press ENTER.
4. A list of IPs, IDs and whatnot should appear. Search the «Ethernet Adaptor LAN» section.
5. When you found it, look up the Standard Gateway of that section, and remember it in any way.
6. Open up your web browser, type in the default gateway into the URL bar, and press enter. A login screen should appear, either a windows screen or a website login page.
7. Enter the login information for your router. If you don’t know the information, ask anyone who knows it or might know it, or look it up on your router box. If possible, use the default login «admin», for username and password.
8. Set up the port forward. For this, find a section for forwarding ports (it’s different on all router pages), and fill in all required values and information. You can set the Service Port as 27015-27016(Use 27015 only if only one port is required), the IP Address your IPv4 Address, and the Protocol «Any» or «All» or «TCP/UDP» (Again, depending on your router page).
9. Start up the port forward, and you’re done.
This step is entirely optional, it is not crucial for making anything work about your server. Setting up a static IP address is explained below.
Open up your command prompt, and run the command «ipconfig /all» without the quotes. Then, search the IPv4 Address of the Ethernet-Adaptor LAN Area or something like that, the Subnet Mask, and the Default Gateway. We will use this information later.
Next, open your start menu, and click on «Control Panel». Then, search the «Network and Internet» entry, and click on the button which should say something like «Show Network status».
After this, right click on «LAN-Connection», and then click on «Properties».
You should see a list of which Elements your connection uses. Double-click «Internet Protocol Version 4», and you should enter the IP Settings of it. After you have done this all, tick «Use the following IP-Address». Doing this should automaticly tick «Use the following DNS-Serveraddress:»
The IP-Address you insert is the static one. It should be very similiar to your actual IP address. Let’s say, your actual IP address is 192.168.2.255 (see what I did there?). In the box, you type in 192.168.2.248.
The Subnet Mask is the one you got from your ipconfig. Same with the Standard Gateway.
Now, you have to fill out the DNS Server addresses. To get the ones you need, you can log into your Router’s Webpage, and then view the Stats of your router. There should be an entry somewhere for DNS Servers.
To make it simple and clear, I listed up the steps you have to do to add workshop addons for your server:
An authkey is required to make +host_workshop_collection work. You can get one here.
You can use anything as the domain name.
You need to add the authkey to the parameter line as well. To do this, use this parameter:
Well, the addons might be on your server now, but all addons that have their own content will show error signs and checkerboard textures, and missing sounds, if the player doesn’t have the addon installed on their client. So we need to force a download of their content, in a way which will be explained below.
This is a list of the most commonly used and useful console commands which can be used to manage and configure your server to your likings.
That was all (or well, most) stuff I know about hosting a Garry’s Mod Server. If something went wrong during installing the server, then you can ask in the comments, and I, or someone else, can maybe help you solve the problem.
Italic = Question
Bold = Answer
What is the Parameter Line?
The Parameter Line is the «Target» line you have to type the parameters in.
IT IS NOT WORKING
That isn’t even a question, but well. If it doesn’t work, then point out WHAT doesn’t work, and I, or maybe someone can help you.
When I run app_update 4020 validate, it says «no subscription» and refuses to install the app. How do I fix that?
You have to log in anonymously by running the command «login anonymous» to make it work. You seem to have forgot to do this.
When I try to install the app, I get error «Error! App ‘4020’ is x after update job.» What does that mean?
That means, that the directory you determined with force_install_dir seems to be invalid. It may not be your client GMod directory, use a completely different one, and make sure it contains no spaces(this shouldn’t actually cause this error, but just to be safe, do not put any spaces into your directory). I recommend to use a completely new directory just for your server, to keep everything clean.
I get this error: [ERROR] lua/autorun/addons.lua:1: attempt to call field ‘AddWorkshop’ (a nil val
ue) when I make my lua file for downloading workshop content. What can I do about that?
Make sure the lua file is located in lua/autorun/server of your server files, and that you use «resource.AddWorkshop( «id» )» for marking all the workshop addons you want to be downloaded by the players.
My server is running, and I forwarded the port, but my friends still cannot join!
Seems like you port forwarded incorrectly. You can «experiment» with the values, try changing them a little, and it might work. I had this problem too, and I fixed it by doing this. Also, make sure that your Firewall is disabled. This isn’t required for everyone, but you should try disabling it.
How to host gmod server
6,512 | уникальных посетителей |
86 | добавили в избранное |
This guide is for anyone who wants to host their own Garry’s Mod server. It is quite technical in parts but should be simple enough to follow.
I made this guide so there is a complete, start to finish guide, covering the entire process.
Any sections surrounded by angled brackets «<>» should be modified to suit your use-case / need.
The first step of all Garry’s Mod server installations is to download SteamCMD. SteamCMD is a command line utility program created by Valve to making downloading and updating servers and content easy.
Instead of having to manually type out each command when downloading or updating your server it is a good idea to write a update script.
Create a file with a name like «update_gmod.txt»
Inside write the following:
app_update 4020 validate quit
Garry’s Mod dedicated servers don’t require you to own the game to allow installation. Therefore we get away with using «login anonymous».
If successful you will see «Success! App ‘4020’ fully installed.». Otherwise read the error, check the troubleshooting section and, if need be, google it.
To get content such as Counter Strike: Source you will need to download it through SteamCMD just like you downloaded the dedicated server.
It is advised that you make two different update files; one for anonymous downloads, and another for ones where login is required. See below for example layouts:
/sharedcontent app_update 232250 validate force_install_dir
/sharedcontent app_update 232330 validate exit
/sharedcontent app_update 420 validate force_install_dir
/sharedcontent app_update 220 validate force_install_dir
/sharedcontent app_update 380 validate exit
You may need to own the game on the account you use for the login-required content items
App IDs and other information
Locate the mount.cfg file. It is located at /garrysmod/cfg.
For each piece of content added you must add a new line with its path as shown below:
/sharedcontent/tf» //TF2 «episodic» «
/sharedcontent/episodic» //HL2 Episode 1 «cstrike» «
/sharedcontent/cstrike» //CSS «ep2» «
/sharedcontent/ep2″ //HL2 Episode 2 «hl2» «
IMPORTANT: Do not add slashes to the end of file paths
There are several ways of adding addons to your server and having it downloaded by players who connect; each has its strength and weaknesses. In order to be consise we will use the simplest method.
Advanced Usage
If you plan on adding lots of addons of various types you can make multiple collections, each of a separate type then add each of those collections to a parent collection.
To load the collection for your server you will need to register an API key.
DO NOT SHARE THIS KEY
Later, when you come to start the server, you will need to tell it which collection to load.
You will need the collection ID. You can find this in the page URL by looking at the URL bar or by clicking «Share» and copying the number at the end.
You will also need your API key.
These are the parameters you will need to add to your start script
How to host gmod server
18,773 | уникальных посетителей |
186 | добавили в избранное |
Hello! I am aj, the owner of AstroGmod, and people have been asking me how to set up a server, so here ya go! This is how I do it, and I am well aware that there are other ways to do this.
Unfortunately, mac gmod servers can no longer be installed with the normal steamcmd tools. You can try to use Wine instead
To install a DS (dedicated server, remember that) for pretty much any source game, you need to have SteamCMD installed. If you already have it installed, skip to the Downloading the Server header.
Installing cmd is different for different operating systems, so here are the different installs:
You now have SteamCMD installed and I will show you how to use it in the next step
Ok! now that you have SteamCMD installed, we have to download the actual server.
dont forget the space before login (one between the executable and the login)
Now that we have the server installed, we should test it to make sure it is working!
In my case it would be 192.168.7.5:11111
NOTE: when you want to send the ip to your friends later, send them the public ip!
You should start joining your server
You can now stop your server by typing quit
Congrats! Your server is now working! The next part will show you how to add addons to your server.
In order to add addons to your server, we must make a workshop collection and put all of the addons you want in there.
To create a collection, just go to the Garry’s Mod workshop page, hover over Browse, and click Collections. Then go ahead and click Create Collection
Go ahead and fill out everything it asks for, and click Save and Continue.
Then add all of the addons you want on the next page.
To add addons after this part, go to the addon page and click Add to Collection (right under the pictures), then check the box next to the collection name.
Make sure to replace WORKSHOPID with the collection id that can be found in the url bar.
So your start command should look something like this: (the file for windows will be different, but the part after srcds_run is the same)
When you start your server, the server will download all of the addons in that collection.
Your server now has addons! Next I will show you how to mount CSS so you will not just go through some props.
Even if you have textures, you may still pass through some css props if a map has it, which can sometimes break a game (and make some players mad). In order to fix this, we must install a Counter Strike: Source (CSS) server.
You need to tell your server where it can find the css files, right? To do this, go into your garrysmod server folder, go to garrysmod/cfg and open the mount.cfg. Remove the slashes infront of cstrike and put your path in the second quotes (replace the path that was already there)
So, your file should look something like this: (on windows make sure to put the drive letter before, like C, or D)
Now you can change the name, loading screen, and the password of your server!
All of these will be done in server folder/garrysmod/cfg/server.cfg
This will make the server show up as AstroGmod in the server list.
Simply add sv_loadingurl then the URL in quotes.
Example:
This will make show my loading screen when players are loading (this is the URL I use for my servers)
DO NOT PUT MUSIC ON THE LOADING SCREEN!!
This annoys 99.9% of players that want to watch a video or something in the background while they are downloading all of your addons
Use this if you are just setting up a server for you and your friends and don’t want random people to join.
Just add sv_password then the password you want in quotes.
Example:
Make you have port forwarded with ports 27005 through 27015 (make the last number higher if you have more servers). Make sure you have also allowed both TCP AND UDP.
If that still does not work, make sure you are giving them the public ip, and not a 192.168.#.## or 10.#.#.## (local IP).
Make sure you use the LAN IP (192.168.#.## or 10.#.#.##) and give your friends the public one.
Please mount CSS (read the mounting CSS part of this guide).
See the Customization part of the guide.
See the Customization part of the guide.
Thank you for taking the time to read my guide and set up a server! This is my first guide, so if you find any mistakes, then please tell me and I will try to fix it.