Learn how to add addons to your gmod server in under 5 minutes

Installing Workshop addons on a gmod server (dedicated server)

To install addons such as M9K Weapons, FA:S 2 Weapons, SCars or workshop maps you need to use the workshop. Installing a workshop addon requires a few steps. Learn how to do it here.

Step 1: Generating a web api authorization key

In order to use a workshop collection on your server, it must first have a web api authorization key. You can get one here. Once you have your key, add a new launch parameter to your srcds.exe command line: -authkey YOURAUTHKEYHERE.

Step 2: Creating a server workshop collection

Next create a workshop collection here. Select Server Content as Type and fill the rest of the fields. Next add all of the addons that you want to have installed on your server (for example M9K Weapons, SCars, FA:S 2 or workshop maps). It’s easier to find if you subscribe/fav it first.

Publish the collection
On the last page when creating the collection, click “Publish”. You might have to agree to the Steam TOS to proceed. The URL of the collection should look something like this when you are finished: http://steamcommunity.com/sharedfiles/filedetails/?id=123123123. Write down the numbers from the URL.

Step 3: Add the collection to your server

When you have written down the workshop id from the previous step, add a new launch parameter to your srcds.exe command line: +host_workshop_collection 123123123, replacing the numbers with the number you wrote down. Your launch parameters should now include both, the workshop collection and the authkey from the first step: +host_workshop_collection 123123123 -authkey YOURAUTHKEYHERE.

When you restart your server it will now download and install the addons from the collection automatically!

Step 4: Add workshop addons as downloads

There is still one problem: Players who join the server don’t downlaod the addons automatically. They could get “ERROR” models or missing textures.

To fix this you need to force players to download the server’s workshop addons.

FTP to your server and create a new file in garrysmod/autorun/server called workshop_download.lua. Use this template to add downloads:

resource.AddWorkshop( "12345" )
resource.AddWorkshop( "312321" )

You need to change the numbers to be the ids of the addons which you can get from each item of your collection.

There is also a good tool that will generate this for you from your workshop collection id (the one from Step 2) here