Downloading a Dedicated Server

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (moved Hosting A Dedicated Server to Downloading a Dedicated Server: This article explains how to download it not how to host it.)
(Minor tweaks)
 
Line 37: Line 37:
 
=Linux=
 
=Linux=
  
''Main article: [http://wiki.garrysmod.com/page/Linux_Dedicated_Server_Hosting  Linux Dedicated Server Hosting]''  
+
''Main article: [[Linux Dedicated Server Hosting]]''  
  
 
==Installation==
 
==Installation==
  
Here's a useful script that will download SteamCMD into ~/Steam/ then extract and install it - and then install the Garry's Mod Dedicated Server.
+
Install SteamCMD as per the recommendations from the [https://developer.valvesoftware.com/wiki/SteamCMD#Linux Valve Developer Wiki].
  
<samp>mkdir ~/Steam
+
Then install the GMod dedicated server in a similar manner to Windows:
cd ~/Steam
+
 
wget <nowiki>http://media.steampowered.com/client/steamcmd_linux.tar.gz</nowiki>
+
<samp>steamcmd +login anonymous +force_install_dir ../gmodds +app_update 4020 validate +quit
tar -xvzf steamcmd_linux.tar.gz
+
./steamcmd.sh +login anonymous +force_install_dir ../gmodds +app_update 4020 validate +quit
+
 
</samp>
 
</samp>
  
The server is now available in ~/gmodds/
+
The server is now available in ~/gmodds/.
  
 
<samp>cd ~/gmodds/
 
<samp>cd ~/gmodds/
Line 65: Line 63:
 
<samp>uname -m</samp>
 
<samp>uname -m</samp>
 
See this article on the valve wiki.     
 
See this article on the valve wiki.     
[https://developer.valvesoftware.com/wiki/SteamCMD#32-bit_libraries_on_64-bit_Linux_systems 32-bit libraries on 64-bit Linux systems ]
+
[https://developer.valvesoftware.com/wiki/SteamCMD#32-bit_libraries_on_64-bit_Linux_systems 32-bit libraries on 64-bit Linux systems]
  
 
=macOS=
 
=macOS=
  
macOS dedicated servers are not officially supported, but they can still be used.
+
macOS dedicated servers are no longer shipped.
This command launches a basic dedicated server but more parameters can be added.
+
<samp>cd ~/Library/Application\ Support/Steam/SteamApps/common/GarrysMod
+
./srcds_run -game garrysmod -maxplayers 16 +gamemode sandbox +map gm_flatgrass</samp>
+
  
  

Latest revision as of 14:50, 15 May 2019

Contents

Windows

SteamCMD

Dedicated servers are now downloaded using SteamCMD. This is a command line version of Steam.

You can download it from this page.

The first time you run it it will update and you will be left at a STEAM> console. You will want to log in. You can log into an anonymous account by typing:

login anonymous

Installing & Updating Garry's Mod Dedicated Server

If you want to specify a download folder then before you update enter this command:

NOTE

This is known to cause problems when updating your server to a newer version. If your server fails to update, try not using the force_install_dir feature, or try reinstalling your server into another folder

force_install_dir c:\my_garrysmod_server\

You can then install or update the Garry's Mod Dedicated Server by using the command: app_update 4020

It will slowly download or update.

If you wish to verify your server, enter this instead of the above: app_update 4020 -validate

Once it's done you can type quit at the console to exit or just close the SteamCMD window.

Automated

You probably don't want to do that every time you want to install/update a server. Don't worry - it supports command lines too.

steamcmd.exe +login anonymous +app_update 4020 validate +quit

Linux

Main article: Linux Dedicated Server Hosting

Installation

Install SteamCMD as per the recommendations from the Valve Developer Wiki.

Then install the GMod dedicated server in a similar manner to Windows:

steamcmd +login anonymous +force_install_dir ../gmodds +app_update 4020 validate +quit

The server is now available in ~/gmodds/.

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

Troubleshooting

If you get the error message ./steamcmd.sh: line 29: /home/$USER/Steam/linux32/steamcmd: No such file or directory You are most likely running 64 a bit system and missing 32 bit libraries.

If the output of this command is x86_64, you are running a 64 bit system and need 32 bit libraries. uname -m See this article on the valve wiki. 32-bit libraries on 64-bit Linux systems

macOS

macOS dedicated servers are no longer shipped.


The Experimental Branches

To update your server to the development branch, you'll have to launch your SteamCMD and enter these commands manually:

login anonymous app_update 4020 -beta dev validate quit

For the pre-release branch: login anonymous app_update 4020 -beta prerelease validate quit

To revert back to stable branch: login anonymous app_update 4020 -beta NONE validate quit

The development branch is updated regularly.

Personal tools
Navigation