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.
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. -
Copy the collection ID
You can find the collection ID in the URL of the collection. Copy the number after?id=. -
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 157384458 -
Restart the server
Save the setting and restart your server. The addons of the collection are downloaded and mounted on startup.
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.
Install a gamemode
Gamemodes are not placed in the addons folder but in their own directory. A detailed guide with folder names, matching maps and common mistakes is available under Change Gamemode.
-
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.lua -
Add 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:resource.AddWorkshop( "104606562" ) resource.AddWorkshop( "1234567890" ) -
Restart the server
Save the file and restart your server.
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
