EN · $ USD
Survival and Sandbox Servers

How to Add a Workshop Collection to Your GMod Server

7 min read Updated: OyunBulut technical team

In short

To add a Workshop collection to a GMod server, create a public collection on Steam and put its ID on the launch line with the +host_workshop_collection parameter. The server downloads the content itself; for players to download models and materials automatically, add a resource.AddWorkshop("ID") line for each item in a file under lua/autorun/server.

In this guide
  1. Two separate downloads: server and player
  2. 1. Create the collection
  3. 2. Add the host_workshop_collection parameter
  4. 3. Make players download content with resource.AddWorkshop
  5. Keeping your collection secure
  6. Keeping your collection lean
  7. Splitting collections by gamemode
  8. Keeping players informed on the loading screen
  9. Common problems
  10. Collection size and server resources
  11. Next step: connect your collection to your server

The standard way to add Workshop content to a Garry's Mod server is a Workshop Collection. When you put the collection ID in the +host_workshop_collection launch parameter, the server downloads and loads every item itself. But that alone doesn't make players download the content: the fix for missing textures (purple and black checkerboards) and red ERROR models is resource.AddWorkshop lines. This guide covers both steps together, plus ways to keep your collection lean.

Two separate downloads: server and player

Workshop content is needed in two different places, and mixing them up is the most common mistake:

Who downloads it?How is it triggered?What does it do?
Server+host_workshop_collection KOLEKSIYON_IDLoads addon Lua code, maps and content on the server
Playerresource.AddWorkshop("OGE_ID")Downloads models, materials and sounds when the player connects

The server sends client-side Lua code automatically, but it doesn't send model, texture or sound files. That's why on servers that only add the collection parameter, players see weapons as ERROR text and maps with purple and black textures. The active map, if it's a Workshop map, is downloaded to the client automatically.

1. Create the collection

  1. Go to the Garry's Mod Workshop page on Steam and use the Create Collection option.
  2. Give the collection a descriptive name and set its visibility to Public. The server can't download private or friends-only collections.
  3. Add your content: addons, maps, models.
  4. Note the number after ?id= in the collection page URL. That number is the collection ID.
https://steamcommunity.com/sharedfiles/filedetails/?id=1234567890
                                                     ^^^^^^^^^^ collection ID

Every item you add to the collection also has its own ID; you'll need those in the next step.

2. Add the host_workshop_collection parameter

Add the collection ID to the launch line. On a web panel, there's usually a separate field like "Workshop Collection" in the startup settings; just enter the ID there. On your own server, the command line looks like this:

./srcds_run -game garrysmod -console -port 27015 +maxplayers 24 +map gm_construct +gamemode sandbox +host_workshop_collection 1234567890 +sv_setsteamaccount GSLT_TOKENINIZ

This parameter goes on the launch line, not in server.cfg, because the content is downloaded while the server starts. A GSLT token must also be set. For getting a token and the basic setup, see the Garry's Mod server setup guide.

When you restart the server, you should see console lines showing the Workshop items being downloaded and mounted. The first launch can take a while if the collection is large; on later launches, only updated items are downloaded. If you see a download error for an item in the console, check whether that item has been removed from the Workshop or hidden.

3. Make players download content with resource.AddWorkshop

On the server side, create a Lua file that runs automatically on every startup:

-- garrysmod/lua/autorun/server/workshop.lua

-- Player model pack
resource.AddWorkshop("111111111")

-- Weapon pack (models and sounds)
resource.AddWorkshop("222222222")

-- Map content pack
resource.AddWorkshop("333333333")
  • The numbers here are not the collection ID; they're the IDs of the individual items in the collection.
  • The file must be in the autorun/server folder; if you put it in client or the root autorun folder, the function tries to run on the client and throws an error.
  • You don't need resource.AddWorkshop for addons that contain only Lua code (no models, textures or sounds); Lua files are already sent automatically. Leaving those items off the list reduces the player's download size.

Players' Workshop downloads depend on the download preference in their game settings. If a player has turned off content downloads, they may still see ERROR models; a reminder about this setting in your server rules or on the loading screen helps.

Keeping long lists organized

As your collection grows, the workshop.lua file grows to dozens of lines. To keep it readable, you can collect the item IDs in a table and add them with a single loop:

-- garrysmod/lua/autorun/server/workshop.lua
local icerikler = {
    "111111111", -- player models
    "222222222", -- weapon pack
    "333333333", -- map content
}

for _, id in ipairs(icerikler) do
    resource.AddWorkshop(id)
end

Writing a comment next to each line about what the content is helps you remember which item belongs to what when you clean up the list months later.

Keeping your collection secure

Every addon from the Workshop runs code on your server. So the content you add to the collection directly affects your server's security:

  • Prefer addons that have been published for a long time and have a healthy comment and update history.
  • Avoid copied or reuploaded addons; they carry a higher risk of containing backdoors.
  • Try a new addon on a test server first, then add it to the main collection.
  • When an addon author publishes an update, your server picks up the new version automatically on its next restart; follow the update notes for critical addons.

Keeping your collection lean

A big collection makes three things worse at once: server startup time, RAM usage and how long a new player waits on their first connection. Long waits are one of the most common reasons new players leave a server.

Practical rules

  1. Remove what you don't use. Review the collection every month; content you never see in game shouldn't be in the collection.
  2. Weed out duplicate content. Two different packs with the same models cause conflicts on the server and make the download bigger.
  3. Avoid giant packs. If you only use a few models from a pack with hundreds, look for a smaller alternative.
  4. Separate your maps. Remove maps that aren't in rotation from the collection; the active map is downloaded automatically anyway.
  5. Keep the AddWorkshop list in sync with the collection. When you remove an item from the collection, delete it from the Lua file too.

Workshop or FastDL?

If you have custom content that isn't on the Workshop, you can distribute it with FastDL, meaning through a web server set with sv_downloadurl. Using the Workshop for Workshop content and FastDL for custom files is the most balanced approach. We cover the setup in the GMod FastDL guide.

Splitting collections by gamemode

If you run more than one server (for example, a TTT server and a DarkRP server), use a separate collection for each. One shared giant collection forces TTT players to download roleplay models they'll never use and makes every server start up slower than it needs to. Adding shared content (for example, the same player model pack) to both collections separately is fine; Steam won't make the player download the same item twice.

Keeping a test copy of the collection also helps: add new addons to the test collection first and try them on a separate test server, then move them to the main collection if there are no problems. That way, players on your live server never run into broken content because of an update.

Keeping players informed on the loading screen

Even when the download time on first connection can't be avoided, letting players know what to expect lowers the number who leave. Set the sv_loadingurl option in server.cfg to the URL of your own loading screen page to show your server rules, your Discord link and a "downloading content on first join" notice.

Common problems

  • The server doesn't download the collection: Check that the collection is public, the ID is correct and a GSLT token is set.
  • Players see ERROR models: The resource.AddWorkshop line for that item is missing, or the file is in the wrong folder.
  • Players drop when the map changes: If the new map isn't in the collection, the server can't load it. Check that every map in rotation is in the collection and that its name matches the name in +map or in your map vote addon exactly.
  • I updated an addon but the server still has the old version: Restart the server; Workshop updates are checked at startup.
  • Lua errors show up in the console: Two addons in the collection may be conflicting. To diagnose it, see the GMod Lua errors guide.

Collection size and server resources

The server loads every addon and piece of content in the collection, so RAM needs and disk usage grow as the collection grows. As a general guideline, a Sandbox or TTT server with few addons runs on modest resources, while 8 GB RAM is a comfortable starting point for servers running a collection with dozens of addons and model packs.

For this scenario, the OB-GMOD-3 Garry's Mod server plan with 4 CPUs, 8 GB RAM and 45 GB NVMe SSD leaves both disk space for Workshop content and memory headroom for addons. For a smaller or larger setup, you can compare all Garry's Mod server plans.

Next step: connect your collection to your server

Once your collection is public, entering its ID in the startup settings and creating the workshop.lua file takes just a few minutes. On OyunBulut Garry's Mod servers, you can manage launch parameters and Lua files from the web panel; plans include DDoS protection and automatic setup, servers run in our Istanbul data center, and you can open a support ticket whenever you get stuck. To start a server with Workshop content, check out the OB-GMOD-3 plan.

Frequently asked questions

Where do I find my GMod Workshop collection ID?

The number after ?id= in the collection page URL is the collection ID. You put that number in the +host_workshop_collection parameter.

I added host_workshop_collection but players still see ERROR models. Why?

That parameter only makes the server download the content. For players to download models and textures, add a resource.AddWorkshop line for each item in a file under lua/autorun/server.

Do I put the collection ID in resource.AddWorkshop?

No, you put in the IDs of the individual Workshop items in the collection. You don't need a line for addons that contain only Lua code.

Can my Workshop collection be private?

For the server to download it, the collection and the items in it must be public. Private or friends-only collections can't be downloaded.

How do I cut down players' download time?

Remove unused and duplicate content from the collection, use resource.AddWorkshop only for items with models, textures or sounds, and remove maps that aren't in rotation.

For this guide

Recommended plans

With 8 GB RAM and 45 GB NVMe SSD, OB-GMOD-3 lets you host a large Workshop collection on your server comfortably and manage launch parameters easily from the web panel.

OB-GMOD-3

Recommended

8 GB RAM

$7.47/mo

+VAT

  • Processor4 CPU
  • Disk45 GB NVMe
  • LocationIstanbul
  • DDoS Protection
  • Automatic Setup
  • Web Panel
  • 7/24 Support

4 GB RAM

$3.54/mo

+VAT

  • Processor4 CPU
  • Disk30 GB NVMe
  • LocationIstanbul
  • DDoS Protection
  • Automatic Setup
  • Web Panel
  • 7/24 Support

6 GB RAM

$5.31/mo

+VAT

  • Processor4 CPU
  • Disk35 GB NVMe
  • LocationIstanbul
  • DDoS Protection
  • Automatic Setup
  • Web Panel
  • 7/24 Support

Garry’s Mod — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.