How to run your very own Garry's Mod server (listen and dedicated)

Introduction

So, you wanna run your very own Garry’s Mod server? That’s great! And that is also why I compiled this guide, to show everyone how to do it, I learned everything here from half done guides with crappy information, so I thought, “Why should people have to go running around the internet for 10 guides when I could make 1 super guide that is also idiot proof?” So, I did just that, and this is what came of it.

Making the Choice: Dedicated or Listen?

First things first: what is dedicated and what is listen? A dedicated server is a server that can be running 24/7 without the game running, and is generally much more stable; however, it could take up to 3 hours to install, more if your internet connection is shotty. A listen server is a server that is created in game by pressing the “Create Multiplayer” button and will take about ten minutes to set up; however, if your game crashes, so does the server. With that let’s get to the tutorial, I’ll be doing listen first as it will be much easier and probably more popular due to that.

Listen Server: Step 1 - Getting your INTERNAL IP

So, you decided to choose a listen server? Ok, the first thing we need to get is your internal IP adress, NOT to be confused with your external IP adress we will get in step 4. First push on your start button in XP, or that stupid orb thing in Vista/Se7en, then click run, and a small box will pop up. In this box type “cmd” no quotes, and push enter, another small box will appear, in this box type “ipconfig” and you should get a small list, the number you are looking for is this:

This is your internal IP, step 1 done!

Listen Server: Step 2 - Port Forwarding

Now that we have your internal IP, we need to head over to http://portforward.com/. Here you need to select your router model, if you do not know what model your router is, go violate it and it should say somewhere on it. Next click the SHIP THIS AD button at the top of the page to skip that stupid ad, then click the “Default Guide” button. It should look something like this:

Next read the short guide and it well tell you how to port forward, if your username and password the site gives you don’t work, then that means whoever set up the router changed it, so go bother them until they tell you. When it tells you to put in your IP adress, that is the IP you found in step 1. Next, the ports you are going to want to forward should be:

TCP - 27030 to 27039 and 27015
UDP - 27000 to 27015 and 27020 and 1200

Yours will most likely look different but mine look like this: (also note 27020 is in UDP, it has just been cut off)

That is how you Port Forward, step 2 done!

Listen Server: Step 3 - Finding your EXTERNAL IP

Definitely the easiest step. This is going to be the IP you give to your friends so that they can connect. In order to find it go to http://whatismyip.com/.

That is your external IP, step 3 done!

Listen Server: Step 4 - Getting the server running

This is also a pretty easy step, just open up Garry’s Mod and click the “Create Multiplayer” button. Afterwards you can set up all your setting and launch the server. Once the serve is open, open up the console and type “sv_lan 0”, if you don’t know how to open the console, see step 5.

That is how you get the server running, step 4 done!

Listen Server: Step 5 - inviting friends

Probably the most important part of having a multiplayer server. First tell your friends to open up the console, if they don’t know what that is, first shoot them in the face, then tell them to go to settings, advanced, and click the checkbox that says enable developer console. Next tell them to push the tilda key to open the console, if they don’t know what that is, shoot them again, tell them it’s the key beside the 1. Once they have the console open, in it tell them to type “connect xxx.xxx.xxx.xxx:27015” where “xxx.xxx.xxx.xxx” is the IP you got in step 3, and “:27015” must be appended to the end like a tumor in order for everything to work.

That is how you get people in your server, step 5 done!

Conclusions

And that is how you run a listen server! Congrats on running your first server!
If you found this guide useful, consider making a donation via paypal to devilwarier9@sect4.org to show your thanks.

If you find any spelling errors, or I missed anything let me know, also if you are having trouble at any step, and feel comfortable letting me control your computer for 10 minutes, then get crossloop, and add me on steam as devilwarier9 and I’ll help you out.

If you would like to play on my server the IP is: 24.141.148.88:27015

Dedicated Server: Step 1 - Getting the files

So, you decided to run a dedicated server? Alright, well step 1 is to get all the files you will need to properly run the server. Most guides at this point would give you broken links and poorly explain how to use command prompt, that’s not me, for the purpose of this guide I have constructed sever *.bat files, which will run all of the commands for you, so all you have to do is click them! You can download all of these files here:
http://www.multiupload.com/D7VKV1UBCZ

Thats how you download files, step 1 done!

Dedicated Server: Step 2 - Extracting

At this point in time you a folder downloaded, and it probably looks like a zipped up folder on your desktop. What you will want to do with this is simply open it, and then drag the folder inside called “srcds” into your C: drive, in order to access that, go to start in XP, or stupid orb thing in Vista/Se7en, then click my computer, and double click C:, also at this time it would be good to note your remaining hard drive space, as if it is less than 10GB then you will not have enough room for the server files, and it would be best if you ran a listen server. In Vista/Se7en this is shown as a bar under the picture, in XP right click and then hit properties. Once you have the C: folder open, drag the folder “srcds” into it, thats it.

That is how you extract the files, step 2 done!

Dedicated Server: Step 3 - Updating HLDSUpdateTool

This is where my *.bat files come into play, and where you start doing way less work, and start using my old work. Open the folder named “srcds” that you put in your C: drive, and you should see 7 files and 1 folder. Open the file called “HLDS updater” This will open a window that will do this step for you. This could take about 10 minutes, and should be rerun about once every other week to ensure everything is kept up to date on your server. Go get a drink and come back and it should be done.

That is how you update the HLDSUpdateTool, step 3 done!

Dedicated Server: Step 4 - Getting the Server Files

This is also one of my *.bat files, and will download props for TF2, CS:S, DOD:S, HL2, HL2:EP1, HL2:DM, Gmod, Ship, and Sin. To do this, simply open the file called “Content Updater”. This will run for about 2 or 3 hours depending on your internet connection, so go ride a bike or watch TV, cause if you use your computer it will go even slower. This also should be run every other week to keep everything up to date, and don’t worry, it only takes this long the first time, future launched should take about 15 minutes. Once the window says “Your server is ready to use!” you can close this window.

In order to get content for HL2:EP2 and Portal, it is a little more (not much) complicated. You first need to get GCFScape from the website http://nemesis.thewavelength.net/index.php?p=26. Once you have it, close steam and open it. Next navigate to the folder “C:\Program Files\Steam\SteamApps” (assuming you used the default directory). Here you need to open “portal content” and “portal english”. Extract the contents of both to “C:\srcds\orangebox”. Next open up “half-life 2 episode 2 english” and extract that to the same place.

That is how you get server content, step 4 done!

Dedicated Server: Step 5 - Fixing the TF2 conflict

If you were to try running your server at this point in time, you would get an error that says something like: “SetupArrayProps_R: array prop ‘(null)’ is at index zero”. This is cause by a conflict between the TF2 and HL2 source engines because one is updated weekly, and the other hasn’t been updated. Just run the file called “TF2 Fix”. This could also take about 10 minutes, so go get another drink since you are exhausted from your bike ride. This file only needs to be run when you get that eerror when running your server.

That is how you fix the TF2 conflict, step 5 done!

Dedicated Server: Step 6 - Getting your INTERNAL IP

So, you decided to choose a listen server? Ok, the first thing we need to get is your internal IP adress, NOT to be confused with your external IP adress we will get in step 11. First push on your start button in XP, or that stupid orb thing in Vista/Se7en, then click run, and a small box will pop up. In this box type “cmd” no quotes, and push enter, another small box will appear, in this box type “ipconfig” and you should get a small list, the number you are looking for is this:

This is your internal IP, step 6 done!

Dedicated Server: Step 7 - Fixing srcds.bat

In the file called “srcds” with the icon that looks like a gear, there is a line in which you must input your internal IP, and since I don’t know yours, you have to do that for yourself. Go into the folder called “orangebox” inside the “srcds” folder, and you should find the file name “srcds” with a gear on a window icon. Right click this, then hit edit. Inside the file on the 7th line if you scroll over, you will find something that says “-ip 192.168.0.10” on this line replace “192.168.0.10” with the IP you got in 6. Also in this file, the line that says “-maxplayers 5” can be changed to however many players you want. The rest should be left alone.

That is how you fix my srcds.bat, step 7 done!

Dedicated Server: Step 8 - Making a shortcut

While you still have the folder that contains the srcds folder open, you should make a shortcut of it. This is very easy to do, simply right click on it and select the “Send To:” drop down, then click “Desktop (create shortcut)”. Once the shortcut is made you can rename it anything you want.

That is how you make a shortcut, step 8 done!

Dedicated Server: Step 9 - Editing server.cfg

If you go inside the folder called “orangebox”, there should be another folder in there called “garrysmod”, and inside that a folder called “cfg”. Inside the “cfg” folder you should find a file named “server”. Open this file by double clicking it, Windows will ask you want you want to open it with, select choose my own program, then scrol down until you see “Notepad” in the list. Select it and push OK. once you have the file open you will need to edit the line where it says “Garrys Mod” and you can put in here whatever you want your server to be named, the next line is your rcon password, this is the master password to mess up your server and should be changed and kept secret. The following lines are setting you can customize to your liking.

That is how to edit your server.cfg file, step 9 done!

Dedicated Server: Step 10 - Port Forwarding

Now that we have your internal IP, we need to head over to http://portforward.com/. Here you need to select your router model, if you do not know what model your router is, go violate it and it should say somewhere on it. Next click the SHIP THIS AD button at the top of the page to skip that stupid ad, then click the “Default Guide” button. It should look something like this:

Next read the short guide and it well tell you how to port forward, if your username and password the site gives you don’t work, then that means whoever set up the router changed it, so go bother them until they tell you. When it tells you to put in your IP adress, that is the IP you found in step 1. Next, the ports you are going to want to forward should be:

TCP - 27030 to 27039 and 27015
UDP - 27000 to 27015 and 27020 and 1200

Yours will most likely look different but mine look like this: (also note 27020 is in UDP, it has just been cut off)

That is how you Port Forward, step 10 done!

Dedicated Server: Step 11 - Finding your EXTERNAL IP

Definitely the easiest step. This is going to be the IP you give to your friends so that they can connect. In order to find it go to http://whatismyip.com/.

That is your external IP, step 11 done!

Dedicated Server: Step 12 - Getting addons

Now that your server is pretty much ready to run, we are going to need to get some addons. Some of the most popular addons for servers are:

AssMod - Admin plugin
PHX - Building props that don’t suck
Wire - I can’t explain the awesome
Advanced Duplicator - Save stuff
EasyEngine - Make cars

All of these are available for download on http://www.garrysmod.org for free, and can be placed in the addons folder inside the garrysmod folder on your server.

That is how you get addons, step 12 done!

Dedicated Server: Step 13 - Running your server

Finally, we have made it this far. Running your server is the easiest thing you could do. Remember that shortcut we made in step 8? Ya, just double click that and 2 windows will pop up, one titled “Server Watchdog” that will restart your server in the event of a crash, and one titled whatever you named your server. As soon as you see the line “VAC secure mode is activated” on the one with your server name, your server is ready to use.

That is how you run your server, step 13 done!

Dedicated Server: Step 14 - Inviting friends

Probably the most important part of having a multiplayer server. First tell your friends to open up the console, if they don’t know what that is, first shoot them in the face, then tell them to go to settings, advanced, and click the checkbox that says enable developer console. Next tell them to push the tilda key to open the console, if they don’t know what that is, shoot them again, tell them it’s the key beside the 1. Once they have the console open, in it tell them to type “connect xxx.xxx.xxx.xxx:27015” where “xxx.xxx.xxx.xxx” is the IP you got in step 11, and “:27015” must be appended to the end like a tumor in order for everything to work. It should also show up in the public master game list if you did everything correctly, so they can join through there if you give them the name, but who wants to sort through all that? This does; however, mean that other people can see it, so you might find some random passerby’s dropping into your server!

That is how you get people in your server, step 14 done!

Conclusions

And that is how you run a dedicated server! Congrats on running your first server!
If you found this guide useful, consider making a donation via paypal to devilwarier9@sect4.org to show your thanks.

If you find any spelling errors, or I missed anything let me know, also if you are having trouble at any step, and feel comfortable letting me control your computer for 10 minutes, then get crossloop, and add me on steam as devilwarier9 and I’ll help you out.

If you would like to play on my server the IP is: 24.141.148.88:27015

Do you really think we are going to donate for a guide, but it was nice however.

And did you really make the bat files or did you just get slayers bat files?

[editline]07:43PM[/editline]

Also note you have to manually upload the files for games such as portal and other singleplayer games that you want the content from to your server if you are going to run a dedicated server.

[editline]07:46PM[/editline]

Also it’s “definitely”, not defiantly. Can people stop saying that.

[editline]07:47PM[/editline]

You can also add the server to favorites which probably is a easier way to tell if people can see your server, or even if you can.

No it’s “definitely”

Not really expecting, just hoping, youd be surprised as to what people get donations for

I made them

i KNEW i forgot something

blame firefox’s autospell

i know, console is just more fun

How do i install thing like EP 1 and 2 and Portal Dods?

ep1 and DOD:S are included in that guide, ill include ep2 and portal as soon as i decide to stop being so lazy

[editline]06:23PM[/editline]

updated OP with how to get EP2 and Portal

Shit that makes me a fool, thanks for pointing that out

THANK YOU any other games you could add?
Im fucked up right now and cant read well - Did you explain how to set up a static IP for dedicated servers?

i cant think of anything else, i showed TF2, CS:S, DOD:S, HL2, HL2:EP1, HL2:EP2, HL2:DM, Gmod, Portal, Ship, and Sin

and no, forgot the static thing, had my static for years didnt even think of it

How come people can only join my server through IP and not find it on the server listing? Yes I forwarded both ports. And I have a linksys router.

It’s a range of ports, not two ports.

Very good guide, finally got the right ports open, thank you so much :]

20700 to 27050 tpc/utp right?

I followed the instructions exactly and even disabled my firewall, yet people simply CAN NOT join my servers. The odd part though, is that I USE to be able to host for garry’s mod and I can currently host for Left 4 dead and a couple other non valve games.

I don’t get it.

bump for knowledge since i just saw 5 threads asking how to do this

Well, yea, a good tutorial, but this doesn’t word with me…

When I put my internal IP into the address bar of Internet Explorer or Firefox, it always says it couldn’t load the page… Why is this?

Also, I am hardwired to my router, and a friend said that means I don’t have to port forward, so now I have skipped port forward and I have my server up, but I can’t join! The weirdest part is that my friends can join off master server list or IP and I cannot join off of either one! How do I connect to my server?

Often times you cant connect from the computer your hosting form. I dont know why, thats just how some routers work

someone should sticky this, there are like 5 new threads a day asking how to do this

Whenever my friend is on step 6, of a dedicated server, and he types “Ipconfig” it states: “Ethernet adapter local area connection is Media Disconnected” How do we fix this, and retrieve the IP?