Garrys Mod Dedicated Server Setup

Garrys Mod Dedicated Server Setup

Gmodlogo

You can make a Garry’s Mod Server on Windows, Linux, or Mac.  There are tons of addons and configurations you can do after setting up a dedicated server and some of those that I found to be highly recommended I have listed in a seperate tab.  Resource usage for Garry’s Mod servers varies by a large ammount.  Depending on mods, max players, and many other variables its hard to say exactly how much RAM or CPU usage you need.

For my server configuration tests I used 2 GB ram and a dual core processor.  The server ran great until I had multiple people on it and stuff was being created left and right.  Keep an eye on your resources and if you plan on running a public server make sure to monitor the RAM as it can get filled up very easy!

Ports that need to be opened

  • TCP/UDP: 27015
  • TCP/UPD: 27005

If you are not using a public IP for your dedicated server make sure to forward those ports from your router to the internal IP address.

Step 1: Download and install SteamCMD

 Download SteamCMD from http://media.steampowered.com/installer/steamcmd.zip

Extract the folder.

Launch steamcmd.exe for the program to start downloading necessary files.

Created a directory to store Garry’s Mod Server files (ex C:\gmodserver\)

Step 2: Login to SteamCMD and Download Gmod Server Files.

Launch SteamCMD and enter the following codes

login anonymous

force_install_dir c:\gmodserver\

app_update 4020 validate

This can take some time to completely download the need files.

After install browse to the server directory and edit the server.cfg file.  Check the other tab for a template and server.cfg generator link for help on this.

After everything is configured start the server!

 

Step 1:  Install SteamCMD and Download needed Gmod Server Files


mkdir ~/Steam
cd ~/Steam
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz
./steamcmd.sh +login anonymous +force_install_dir ../gmodds +app_update 4020 validate +quit

Step 2: Navigate to the created folder and start the server.


cd ~/gmodds/
./srcds_run -game garrysmod +maxplayers 32 +map gm_construct

You can also setup a server.cfg and use a template to setup the server based on your needs.

Here is a great tool for creating server.cfg files based on the game modes you want to run.

http://gmod-servercfg.appspot.com/

logging on
hostname "GameServerSetup.com Config Template"
rcon_password "SuperPassword"
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
//Sandbox Settings
sbox_allownpcs 1
sbox_godmode 0
sbox_plpldamage 0
sbox_playergod 0
sbox_noclip 1
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
//Server Settings
net_maxfilesize 30
sv_minrate 0
sv_maxrate 2500
decalfrequency 10
sv_maxupdaterate 66
sv_minupdaterate 10
//Execute ban files
exec banned_ip.cfg
exec banned_user.cfg

 

Common RCON Commands

sv_kickerrornum 0 //Disables kicking for lua errors, useful for debugging
sv_downloadurl “URLGOESHERE” //Setting your servers FastDownload URL, allowing players to download content from a webserver.
hostname “NAME” //This field sets the servers name, also known as the host name
rcon_password “” //Sets the servers rcon password
sv_unlag 1 //Disables lag compensation
sv_password “PASSWORD” //Sets the servers password, which is required to join
tv_enable 0 //Enables HL2TV, not reccomended for Garry’s Mod

– ply = Player Name/Player (The Target Of The Command)
– time= Amount Of Time The Command Will Last (e,g Fire will last for 300 seconds)
– amt = Amount Of Said Item (e,g armor is the amount of armor, normally ranging through 0-100)
– sound = The Sound Title/Sound File Name
– dmg = Damage Amount, The Amount Of Damage Dealt
– You Can Use * As A Universal Selector, (e,g !slay * | Will lslay everyone)
—————————————- Start —————————————-
ulx slay <ply> – !slay <ply> — Kills/Slays The Selected Target(s)
ulx slaynr <ply> – !slaynr <ply> –Marks The Target(s) To Be Slain The Following Round(s)
ulx rslaynr <ply> – !slaynr <ply> –Removes/Revokes Slay(s) From The Selected Target(s)
ulx vslaynr <ply> – !vslaynr <ply>
ulx nr <ply> <role> – !nr <ply> <role> –Marks The Target(s) To Be What Role You Select Them (e,g Traitor, Innocent, Detective)
ulx credits <ply> – !credits <ply> –Gives An Amount Of Credits To The Target(s)
ulx gag <ply> – !gag <ply> –Gags The Target(s), Making It So They Cannot Talk/Use Microphone
ulx ungag <ply> – !ungag <ply> –Ungags The Target(s) Making It So They Can Talk
ulx mute <ply> – !mute <ply> –Making It So The Target(s) Cannot Type In Chat, The Gag For Chat
ulx unmute <ply> – !unmute <ply> –Unmutes The Specified Target(s)
ulx csay <msg> – !csay <msg> –Sends A Message To All Players Ingame, Printing It On The Middle Of Their Screens
ulx psay <ply> <msg> – !psay <ply> <msg> –Sends A Message To Specified Player(s)
ulx gimp <ply> – !gimp <ply> –Gimps The Specified Target(s), Making Them Say Pre-Set Messages Rather Then What They Typed, Easy To Abuse And Spam
ulx ungimp <ply> – !ungimp <ply> –UngimpsThe Specified Target(s)
ulx thetime – !time –Displays The Serverwide Time
ulx armor <ply> <amt> – !armor <ply> <amt> –Sets The Specified targets(s) Armor
ulx blind <ply> <time> – !blind <ply> <time> –Blinds The Selected/Specified Target(s)
ulx unblind <ply> – !unblind <ply> –Unblinds The Specified Target(s)
ulx cloak <ply> <time> – !cloak (ply> <time> –Cloaks The Specified Target(s)
ulx uncloak <ply> – !uncloak <ply> –Uncloaks The Specified Target(s)
ulx freeze <ply> <time> – !freeze <ply> <time> –Freezes The Player In Place For However Long You Want, Default Is Indefinitely
ulx unfreeze <ply> – !unfreeze <ply> –Unfreezes Specified Target(s)
ulx god <ply> – !god <ply> –Grants God Mode Upon Selected Target(s)
ulx ungod <ply> – !ungod <ply> –Revokes God Mode From Selelected Target(s)
ulx hp <ply> <amt> – !hp <ply> <amt> –Sets The Specified Target(s) HP Level (Health)
ulx ignite <ply> <time> – !ignite <ply> <time> –Ignites The Specified target(s) On Fire
ulx unignite <ply> – !unignite <ply> –Extinguses The Selected Target(s)
ulx igniteall – !igniteall –Ignites Everything
ulx unigniteall – !unigniteall –Extinguses Everything
ulx jail <time> – !jail <ply> <time> –Jails The Selected Target(s) For The Specified Time
ulx unjail <ply> – !unjail <ply> –Unjails The Selected Target(s)
ulx maul <ply> !maul <ply> –Mauls The Selected Target(s)
ulx playsound <sound> – N/A — Plays The Selected Sound If Installed Onto Server
ulx ragdoll <ply> – !ragdoll <ply> –Ragdolls The Selected Target(s)
ulx unragdoll <ply> – !unragdoll <ply> –Unragdolls The Selected Target(s)
ulx slap <ply> <dmg> – !slap <ply> <dmg> –Slaps The Selected Target(s) With Said Damage
ulx whip <ply> <amt> <dmg> – !whip <ply> <amt> <dmg> –Whips The Selected Target(s) For Said Amount Of Times With Said Damage
ulx sslay <ply> – !sslay <ply> –Silently Slays The Selected Target(s)
ulx strip <ply> – !strip <ply> –Strips The Selected Target(s) Of All Of Their Weapons
ulx motd – !motd –Displays The Message Of the Day
ulx afk <ply> – !afk <ply> –Moves The Selected Target(s) Into Spectator Mode(AFK)
ulx unafk <ply> – !unafk <ply> –Moves The Selected Target(s) Back To Player
ulx force <ply> <role> – !force <ply> <role> –Forces The Selected Target(s) To Take The Role Specified
ulx karma <ply> <amt> – !karma <ply> <amt> –Sets The karma For The Specified Target(s)
ulx respawn <ply> – !respawn <ply> — Respawns The Player, Deleting The Corspe And Unid’ing It
ulx bodyarmor <ply> – !bodyarmor <ply> –Gives The Specifed Target(s) Body Armor
ulx bring <ply> – !bring <ply> –Brings The Selected Target To You
ulx goto <ply> – !goto <ply> –Goto The Selected Target
ulx send <ply> <ply> – !send <ply> <ply> –Sends The Selected Target To Another Target
ulx teleport <ply> – !teleport <ply> –Teleports The Selected Target To You
ulx ban <ply> <time> <reason> – !ban <ply> <time> <reason> –Bans The Selected Target(s) For The Said Amount Of Time
ulx unban <ply> – !unban <ply> —Unbans The Selected Target
ulx banid <steam_id> <time> <reason> – N/A –Bans The Selected Steam ID
ulx kick <ply> – !kick <ply> –Kicks The Selected target(s)
ulx noclip <ply> – !noclip <ply> –Sets Flow Mode To Active Allowing You To Noclip Through Objects, Use !noclip/ulx noclip for yourself or specify or other people
rp_setmoney <ply> <amt> —Sets a specified amount of money for the specified target(s) (DarkRP only)
rp_tellall <msg> –Places the specified message on the player’s screen
rp_arrest <ply> –Arrests the specified target(s)
rp_unarrest <ply> –Unarrests the specified target(s)
rp_resetallmoney –Resets everyone’s money
rp_cancelvote –Cancels the most recent vote
rp_setname <ply> <name> –Sets the specified target(s) name
rp_tell <ply> <msg> –Sends a message to the specified target

Here are some recommended addons for Gmod players/server from reddit user Questions_For_Days

  • Zombie/NPC Invasion: NPCs and enemies spawn after customization and enabling it (under options > ZINV). Only works if your map has a node graph (original CS maps won’t work), and the creator’s recommended node graph editor/creator doesn’t work. I suggest gm_freespace_13.
  • ALL M9K Weapons Packs (BY INCONCIEVABLE; IMPORTANT!): Those things are a must-have. I have seen absolutely no glitches whatsoever with them, despite me having 200+ addons. (Heavy Weapons, Specialties, Assault Rifles, and Small Arms) Also get the Missing .WAV Files for M9K.
  • Crystal Clear Sounds: It’s not much, but damn is it nice, replacing many if not all default Gmod sounds with crisp, realistic ones.
  • Aperture Science Handheld Portal Device by Dr Awesome: Like the description says, one of the best portal guns there is.
  • ALL: LW Cars OR SGMCars OR TDMCars AND SCars Slim, SCars Basic, and SCars Extra: LW, SGM, and TDM cars are different, and more stylish than SCars (I reccommend TDMCars, by the way. Many more vehicles), but SCars are better to drive, with better handling, sounds, and more. NOTE: Model detail MUST be set to high, otherwise LW, SGM, and TDM cars WILL bug out.
  • Garry’s Bombs 5, both the Materials Pack and Base Edition: They won’t work without each other. These add a variety of explosives, from C4, to the Tsar Bomba (Google it), and are incredibly well detailed explosions. Again, model detail set to high. DO NOT, I repeat, DO NOT get Garry’s Bombs 4 with this. They are incompatible.
  • Lastly, Gm_SmallCity by L’ama Noctara: I’m tired of typing, so here’s an excerpt: “Features:

-LDR and HDR

-NPC navigation

-Scripted car traffic. (5 or 10 cars)*

-Helicopter patrol patch. (You can use scripted spawner or spawn your own)**

-3 place 5vs5 NPC scripted assault.*

-20vs20 NPC scripted battle.*

-Subway.

-3 buildings with interior.

-Good optimisation.**

*For spawning cars/helicopter/npc go to the skyscraper and press buttons.”

Links:

The reddit thread is here: https://www.reddit.com/r/gmod/comments/2mdjws/what_are_some_of_your_must_have_add_ons_for_gmod/

Coming Soon
  1. codycody11-20-2014

    What about installing and running the game modes?

    • NoxNox11-20-2014

      Good point ill fix this guide to include that. Thanks for the comment.

  2. Kennethan98Kennethan9806-29-2015

    You can use probably ULX and ULIB to get past the game mode but im not sure

  3. benben10-04-2015

    33like gmod yall like it even more!

  4. noonenoone12-11-2015

    can anyone join the server?

  5. NearbyfarawayNearbyfaraway03-06-2016

    Can my PC work as the server? I don’t have the money to buy one of those $100 per month servers

    • RiccousRiccous03-06-2016

      Your home PC should work fine as the server.

  6. tailsizkooltailsizkool07-04-2016

    noice tutorial m8

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.