How to Make Garry's Mod Auto Download Addons
Workshop addons are add-ons within Steam's workshop that can enhance your Garry's mod experience with prebuilt assets, maps, and or other scripts to add to your game.
You can find all the addons here: https://steamcommunity.com/workshop/browse/?appid=4000
There are two ways to add addons to Garry's Mod, on the client side (your game) or the server side (your server)
By default, your server won't serve these addons to your players on connect, this guide will show you how to fix that, so that your addons will auto download on connection for your players.
Downloading on connect means that the client will download Workshop assets, you won't have to store those assets on your GMod server. Instead, they'll be stored in the game client. (You can find more info about this on the GMod developer documentation). Players must finish downloading all configured addons before they can fully connect to the server.
You can automatically download to the game client by adding a .lua file in the garrysmod/lua/autorun/server folder that automatically downloads gmod addons to the client with the resource.AddWorkshop( "STEAMID" ) command.
For this tutorial, we'll be using the resource library. As stated by Facepunch:
The resource library is used to control what files are sent to clients who join a server, this includes models, materials, sounds, text files but not Lua files.
Using this feature, you can put the workshop file on the server side to send to the client.
To create the autorun file that will tell your server to serve the workshop addons you've chosen:
Find your Garry's Mod addon on the Steam Workshop here.
Navigate to garrysmod/lua/autorun/server in the file manager. If the folder server doesn't exist, create the directory.
Create a new file, resource.lua in the server directory if you haven't already.
In the resource.lua file, add the line:
Replace STEAMID with the workshop ID.
You can see what this does in particular by looking at the documentation here: https://wiki.facepunch.com/gmod/resource.AddWorkshop
Save the resource.lua file, then restart the server.
To set up an entire workshop collection to automatically download for your players on connect:
Find the Steam Workshop collection that you want to add here (or make your own collection): https://steamcommunity.com/workshop/browse/?appid=4000§ion=collections
Copy the workshop ID from the URL:
Just like manually adding addons via the resource.lua, navigate to https://www.yourdevtools.com/gmod/workshop which automatically generates this for you from a workshop collection (instead of you manually having to add each one). Go to the link and copy the generated code from inputting the copied workshop ID from before.
As you can see, each addon must be on a different line in the lua file.
Log into your server panel (For SparkedHost, it's https://control.sparkedhost.us/)
Go to your server's file manager and navigate to garrysmod/lua/autorun/server. If the server folder doesn't exist, create it.
If there's not a resource.lua create one in the folder and paste the code you generated from before. If there is a resource.lua, append the code to the end of the file in the text editor.
Save the file and restart the Garry's Mod server for changes to take place.
Navigate here for documentation: https://wiki.facepunch.com/gmod/Addons_Usage
Go to the addons menu
Click on one of the menus on the side:
Install any addons you want
Go to the same from before
Go to the subscribed menu to see subscriptions
Hover over any addon and press uninstall for any addons you want to uninstall
Go to the same menu as before
Go to the subscribed menu
Hover over any addon and press disable for any addon that you want to disable
Go to the same menu as before
Go to the subscribed menu
Enable any addons that you want to enable
If the client doesn't see any addons, check the console for errors.
Deleting addonnomount.txt can help resolve certain addon issues. (Source: https://github.com/Facepunch/garrysmod-issues/issues/5663#issuecomment-1868450350)
If you did not find this answer helpful and you own a SparkedHost server, feel free to contact our support here.
By: Julian T.
Edited By: Mason Baker
You can find all the addons here: https://steamcommunity.com/workshop/browse/?appid=4000
There are two ways to add addons to Garry's Mod, on the client side (your game) or the server side (your server)
By default, your server won't serve these addons to your players on connect, this guide will show you how to fix that, so that your addons will auto download on connection for your players.
Downloading on Connect
Downloading on connect means that the client will download Workshop assets, you won't have to store those assets on your GMod server. Instead, they'll be stored in the game client. (You can find more info about this on the GMod developer documentation). Players must finish downloading all configured addons before they can fully connect to the server.
You can automatically download to the game client by adding a .lua file in the garrysmod/lua/autorun/server folder that automatically downloads gmod addons to the client with the resource.AddWorkshop( "STEAMID" ) command.
Why is the file in the autorun/server folder/directory?
For this tutorial, we'll be using the resource library. As stated by Facepunch:
The resource library is used to control what files are sent to clients who join a server, this includes models, materials, sounds, text files but not Lua files.
Using this feature, you can put the workshop file on the server side to send to the client.
How to Add Auto-Downloaded GMod Addons
To create the autorun file that will tell your server to serve the workshop addons you've chosen:
Find your Garry's Mod addon on the Steam Workshop here.
Navigate to garrysmod/lua/autorun/server in the file manager. If the folder server doesn't exist, create the directory.
Create a new file, resource.lua in the server directory if you haven't already.
In the resource.lua file, add the line:
resource.AddWorkshop( "STEAMID" )
Replace STEAMID with the workshop ID.
You can see what this does in particular by looking at the documentation here: https://wiki.facepunch.com/gmod/resource.AddWorkshop
Save the resource.lua file, then restart the server.
Adding a Workshop Collection for Auto Download
To set up an entire workshop collection to automatically download for your players on connect:
Find the Steam Workshop collection that you want to add here (or make your own collection): https://steamcommunity.com/workshop/browse/?appid=4000§ion=collections
Copy the workshop ID from the URL:
Just like manually adding addons via the resource.lua, navigate to https://www.yourdevtools.com/gmod/workshop which automatically generates this for you from a workshop collection (instead of you manually having to add each one). Go to the link and copy the generated code from inputting the copied workshop ID from before.
As you can see, each addon must be on a different line in the lua file.
Log into your server panel (For SparkedHost, it's https://control.sparkedhost.us/)
Go to your server's file manager and navigate to garrysmod/lua/autorun/server. If the server folder doesn't exist, create it.
If there's not a resource.lua create one in the folder and paste the code you generated from before. If there is a resource.lua, append the code to the end of the file in the text editor.
Save the file and restart the Garry's Mod server for changes to take place.
Managing Addons Client Side For Garry's Mod:
Navigate here for documentation: https://wiki.facepunch.com/gmod/Addons_Usage
Adding Addons
Go to the addons menu
Click on one of the menus on the side:
Install any addons you want
Uninstalling Addons
Go to the same from before
Go to the subscribed menu to see subscriptions
Hover over any addon and press uninstall for any addons you want to uninstall
Disabling Addons
Go to the same menu as before
Go to the subscribed menu
Hover over any addon and press disable for any addon that you want to disable
Enabling Addons
Go to the same menu as before
Go to the subscribed menu
Enable any addons that you want to enable
Still have some questions? Having some trouble?
If the client doesn't see any addons, check the console for errors.
Deleting addonnomount.txt can help resolve certain addon issues. (Source: https://github.com/Facepunch/garrysmod-issues/issues/5663#issuecomment-1868450350)
If you did not find this answer helpful and you own a SparkedHost server, feel free to contact our support here.
By: Julian T.
Edited By: Mason Baker
Updated on: 20/01/2025
Thank you!