Is there any official way to download workshop items in SteamCMD running on an off-site server? Examples would be maps for CS:GO or Garry's Mod. It is possible to download the files from a third-party website with wget
or upload them using FTP. But is there an official way to subscribe to them so that SteamCMD downloads them and manages the updates?
2 Answers
You can do that using Steam's Workshop.
First of all, you need an API Key that's going to be placed inside your server configuration script (script for CSGO). Then, it deppends on what kind of items you want to implement in your server but, for CSGO maps, you just need to add their workshop id to your mapcycle.txt
(it also works for collections).
For different kind of items, I'd be different (as you are obviously not going to add a AK47 Skin to your map rotation) but the procedure would be very similar.
By adding content to your server this way, you ensure that it's going to be updated (make sure you find the right item and not copy & pasta ones)
-
Do you coincidentally know how it works for Garry's Mod maps? Commented Dec 2, 2016 at 18:18
-
About Garry's Mod
You can't download addons with SteamCMD but IIRC you can with srcds (Source Dedicated Server) downloadable via SteamCMD which I won't be covering, this is long enough as it is
This also covers regular addons
I have worked with workshop maps on dedicated servers if that is what yours wondering, I launch my server through a .bat file so everything is set up for a single file.
Firstly, Gmod doesn't use map cycles, its exists so that mountable games can't load their one mapcycle.txt and cause errors, but knowing the workshop theres probably an addon that can cycle maps or at the very least let you change it without needing to start a new server.
I have a link to some srcds info and a .bat template Right here
To get addons in GMod servers you need to create a steam workshop collection with what you wish to have
then add -authkey followed by your API Key somewhere after /wait srcds.exe, you should have got one with CSGO from Alex
Finally add +host_workshop_collection followed by the ID of your collection, to see this either use your web browser or the steam client with URLs turned on and load your collection page, you are looking for the string at the end after ?id=
And then if you have an map addon simply replace it with whatever workshop map you want to start with
IIRC the server checks the addons for updates everything you launch the server and automatically downloads them for you
If all goes well the addons should download and the server should start, then you should be able to connect to it with your addons correctly downloaded, just make sure you have the same addons before trying to connect
Yeah, this was about as confusing my first time around getting addons to a dedicated server, I wish you luck
If anyone beats me to this I will literally flip