CS:GO Workshop For Server Operators

From Valve Developer Community
Jump to: navigation, search
CS:GO Workshop For Server Operators

How to host Workshop Maps with a CS:GO Dedicated Server


This will start the server with an "se + mirage collection" and set the start map to de_dust2_se.

srcds -game csgo -console -ip YOUR.PUBLIC.IP.ADDR.HERE +game_type 0 +game_mode 1 +host_workshop_collection 125499818 +workshop_start_map 125488374 -authkey YOURAUTHKEYHERE

Getting Your Web API Authorization Key

To download maps from the workshop, your server needs access to the steam web api. To allow this you'll need an authorization key which you can generate here.

Once you have your key, run your server with the commandline parameter '-authkey XXXXXXX' where XXXXXXX is your key. Also you can add the key as a single line into the file webapi_authkey.txt under the mod directory csgo.

Your auth key is tied to your steam account, so keep it private!

Hosting Workshop Maps

There are two possible ways to add workshop hosted maps to your server.

  • Adding fileids or collectionids to the respective config files.
  • Using engine commands to host maps on the fly. (preferred way)

Using Subscription Lists

These files are automatically loaded on startup and every time one calls ds_get_newest_subscribed_files which reloads the webapi_authkey.txt, subscribed_collection_ids.txt and subscribed_file_ids.txt and retrieves the latest version of these workshop files.

These two files are searched within the csgo directory (the mod directory, where cfg, materials etc. reside) or in the platform directory (not tested).

└── csgo
    ├── subscribed_collection_ids.txt
    └── subscribed_file_ids.txt

These files contain one line per file/collection id, see next section on how to retrieve them.

Example for subscribed_file_ids.txt:


Using Engine Commands

Note.png Note: Servers do not need to subscribe to Workshop maps. Instead, they load them directly using the concommands host_workshop_map and host_workshop_collection. Subscriptions are only relevant to clients.

The console command for hosting a workshop map is

host_workshop_map <file id>

Note that you can also add this to the srcds command line, in the form

+host_workshop_map <file id>

You can find the file id for a workshop map in its workshop page url. Workshopfileidurl.jpg

This command will download the latest version of the map, create a mapgroup with that map as a single entry and host it.

You can also host workshop collections the same way. Use the command

host_workshop_collection <collectionid>

where collectionid is the number found the same way as above but in the collection page's url. This command will then download all maps in the collection and create a mapgroup out of them, then host it.

Map Updates

When changing levels to a workshop map, your server will first check if a newer version is available and download it if needed. Clients will be notified with chat messages of the download and its progress. You can control these messages and their frequency with these convars:

sv_broadcast_ugc_downloads <0|1>
sv_broadcast_ugc_download_progress_interval <seconds>

Connecting clients will download the latest version of the hosted workshop map as a part of the connection process.

CS:GO Official Maps and _SE Maps

_SE maps are no longer distributed with CS:GO. Official CS:GO and _SE maps can be added from CS:GO Official's Workshop Items. Maps that are "official content that comes included with Counter-Strike: Global Offensive." are the newest version. Compatibility Versions should be avoided unless you know what your doing. ("official content" maps vertigo, militia, dust, and aztec were broken when those maps were removed from the game, choose a compatibility version?) a

CS:GO Official has made a collection that you can use. In addition you may use any that are community created.



  • Dust II_se
  • Inferno_se
  • Nuke_se
  • Train_se
  • Mirage

to use this collection, add

+host_workshop_collection 125499590

to your command line.


To enable verbose spew, set

sv_debug_ugc_downloads 1
developer 1

With these set, your server will spew the results it gets from steam. When working, you'll see output like this:

Fetched 1076 bytes via HTTP:
 response {
   result int( 1 = 0x1 )
   resultcount int( 1 = 0x1 )
   publishedfiledetails {
     0 {
       publishedfileid int( 123868347 = 0x76214BB )
       result int( 1 = 0x1 )
       creator 76561197975050072
       creator_app_id int( 745 = 0x2E9 )
       consumer_app_id int( 730 = 0x2DA )
       filename mymaps/de_aztec_proper.bsp
       file_size int( 26420720 = 0x19325F0 )
       file_url http://cloud-2.steampowered.com/ugc/XXX/XXXXXXX/
       hcontent_file 884098750744150125
       preview_url http://cloud-2.steampowered.com/ugc/XXX/XXXXXX/
       hcontent_preview 884098750744170633
       title De_Aztec_Proper
       description Aztec with adjusted visibility. A rebalanced underpass area,two new routes and many other changes   remove the map's CT bias.
       time_created int( 1359545920 = 0x51090640 )
       time_updated int( 1359545920 = 0x51090640 )
       visibility int( 0 = 0x0 )
       banned int( 0 = 0x0 )
       subscriptions int( 3 = 0x3 )
       favorited int( 1 = 0x1 )
       lifetime_subscriptions int( 3 = 0x3 )
       lifetime_favorited int( 1 = 0x1 )
       views int( 13 = 0xD )
       tags {
         0 {
           tag Classic

When an error occurs, you may see something like the below:

host_workshop_map 122439431
Fetched 140 bytes via HTTP:
  response {
    result int( 1 = 0x1 )
    resultcount int( 0 = 0x0 )
    publishedfiledetails {
      0 {
        publishedfileid int( 122439431 = 0x74C4707 )
        result int( 9 = 0x9 )
Failed to parse file details KV for id 122439431. Result enum: 9
File id 122439431 not found. Probably removed from workshop

This is a common error (result 9, file not found) which can occur if a file is removed from workshop, or if the permissions are changed to friends-only or private. This error will also occur if there is a problem with your auth key.

Another common error may show spew like this:

Fetched 1042 bytes via HTTP:
CDedicatedServerWorkshopManager: received file details for id 125499818: 'Collection Title'.
Skipping download for file id 125499818:'Collection Title' - version on disk is latest.
Setting mapgroup to '125613177'
CModelLoader::Map_IsValid:  No such map 'maps/workshop/125499818/1360205838_collection_branding.bsp'
changelevel failed: workshop/125499818/1360205838_collection_branding not found

This is caused by passing a collection id to 'host_workshop_map' instead of 'host_workshop_collection'. Be sure to only pass the ID for a map to 'host_workshop_map' and pass only collection IDs to 'host_workshop_collection'.

Do not mix 'subscription lists' and the host_workshop commands. If your troubleshooting try removing the subscription list files.

Another way of doing it as explained by a reddit user

First off, go to the CS:GO Workshop in the steam community. (Note: You must be logged in to steam to continue.)

Find maps you like and click on them. (I prefer opening them in a bunch of different tabs.)

Favourite the maps.

After you've favourited all the maps you think you'll want, go to the Collections tab in the CS:GO workshop.

Click on "Create Collection".

Add all the files you want from your list of favourites. Here are my collections so you can see what they look like.

While creating your collection, you will be determining the map order. (mapcycle.txt doesn't work in GO.) You can move maps up or down in the list, but it's reaaaaaally slow so I like to just populate the list in the order I want them in the first place.

Once you add items, on the very last page of the walkthrough for creating your collection there will be a button called "Publish". This will be towards the top of your window (even though all the "Continue" buttons were at the bottom). Don't forget to click this button.

Once you do that, you'll get a URL that looks like this: http://steamcommunity.com/sharedfiles/filedetails/?id=125645871

The string of numbers at the end is your host workshop collection id.

You can also specify a startup map by using the command +workshop_start_map #############, where ########## is the ID number of a map. For example, dust_se is 125498851, which you can find from the URL.

Once you do that, you should start your server with a combination of these types of commands:

-authkey ########### +host_workshop_collection 125652555 +workshop_start_map 125488374

Restart your server, and it will go through a process of downloading all the maps from your collection onto the server. You should be able to see it in the console output to make sure it's working correctly.

Source: http://www.reddit.com/r/GlobalOffensive/comments/186z0g/map_workshop_and_servers/c8cantc