Hosting A Dedicated Server
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:
Installing Garry's Mod Dedicated Server
You can install the Garry's Mod DS using the command
app_update 4020 validate
It will slowly download. If you want to specify a download folder then before you update enter this command:
Once it's done you can type quit at the console to exit.
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
The development branch
To update your server to the development branch your app_update should look like this.
app_update "4020 -beta development"
The development branch is updated extremely regularly.
Main article: Linux Dedicated Server Hosting
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.
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
The server is now available in ~/gmodds/
cd ~/gmodds/ ./srcds_run -game garrysmod +maxplayers 32 +map gm_construct
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.
See this article on the valve wiki. 32-bit libraries on 64-bit Linux systems