How to Add Mods to Your Garry's Mod Server ​
There are two ways to get addons onto your server: through a Steam Workshop collection that the server downloads automatically on startup, or by uploading the addon folders manually via SFTP.
Caution
Stop your server before uploading files. After a game update addons can become incompatible and cause errors or crashes.
Set up a Workshop collection ​
The server can load exactly one Workshop collection. All addons you want to use on the server therefore have to be in the same collection.
Create a collection
Create your own collection in the Steam Workshop for Garry's Mod and add the addons you want.Caution
The collection must be public or unlisted. The server cannot access private collections.
Copy the collection ID
You can find the collection ID in the URL of the collection. Copy the number after?id=.Example
In the URL
https://steamcommunity.com/sharedfiles/filedetails/?id=157384458the collection ID is157384458.Open the dashboard
Open the dashboard of your server.Open the settings
Navigate to the Settings.Enter the collection ID
Enter the collection ID in the Workshop ID field. The server then starts with the parameter:+host_workshop_collection 157384458Restart the server
Save the setting and restart your server. The addons of the collection are downloaded and mounted on startup.
Note
By default the server checks for addon updates every time it starts. You can disable this automatic updating with the ConVar host_workshop_autoupdate 0.
Upload addons manually ​
Addons that do not come from the Workshop (so-called legacy addons) are uploaded to the server as an extracted folder.
Stop the server
Stop your server via the dashboard.Prepare the addon
If the addon comes as a.gmafile you have to extract it first. Usegmad.exefrom your local game installation under…\GarrysMod\bin\. What goes onto the server afterwards is the extracted folder, not the.gmafile.Connect via SFTP
Connect to your server via SFTP.Upload the addon
Upload the addon folder to the following directory:/garrysmod/addons/Each addon lives in its own subfolder, e.g.
/garrysmod/addons/my-addon/containing subfolders such aslua/,materials/,models/orsound/.Start the server
Start your server.
Important
The server runs on Linux and file paths there are case-sensitive. My-Addon, my-addon and my_addon are three different folders. Always name addon folders in lowercase and avoid spaces and special characters.
Install a gamemode ​
Gamemodes are not placed in the addons folder but in their own directory.
Upload the gamemode
Upload the gamemode folder via SFTP to the following directory:/garrysmod/gamemodes/Select the gamemode
Enter the folder name of the gamemode in the Gamemode field in the Settings of your server. The server then starts with the parameter+gamemode <foldername>.Restart the server
Save the setting and restart your server.
Force players to download the addons ​
Players do not automatically download the Workshop addons of your server. Only the current map and the gamemode are transferred automatically, and only if they come from your server's collection. Every other addon has to be enforced individually.
Open the file
Open the following file via SFTP:/garrysmod/lua/autorun/server/workshop.luaAdd the addons
The file already contains an emptyresource.AddWorkshop( "" )line. Replace it and add one line per addon with the respective addon ID — not the collection ID:luaresource.AddWorkshop( "104606562" ) resource.AddWorkshop( "1234567890" )Restart the server
Save the file and restart your server.
Note
Content that does not come from the Steam Workshop (e.g. custom models or sounds) is not distributed this way. For that you need FastDL via the ConVar sv_downloadurl in the file /garrysmod/cfg/server.cfg.
Mount content from other games ​
Content from other Source games (e.g. Counter-Strike: Source) is mounted through the following file:
/garrysmod/cfg/mount.cfg