Pipeline downloads
Build your own CS2 server images (Docker, CI) with the current plugin files, gamedata and map files, straight from the license server. No Discord downloads, always the current release. For customers and partners.
1. Get a download key
- Customers: one key per license. Ask me on Discord: karola3vax. It downloads the products of that license, and only while the license is active.
- Partners: one key per partnership. Ask me on Discord: karola3vax. It downloads the products of the partnership while it is active.
- The key only downloads files. It cannot open the staff portal, reports or your license settings.
- Keep it in your CI secret store and never print it in build logs. If it leaks, ask for a new one: the old key stops at once.
No pipeline? The same files for your license are on the My license page.
2. What a server needs
- The plugin: the full package (the same ZIP as on Discord) or the smaller update ZIP. CS2FOW's full package also has its Metamod file, the navigation files and the map tools.
- The current gamedata: required. Install it after the ZIP. The gamedata inside a ZIP is from release day and goes out of date at the next CS2 update.
- CS2FOW navigation files: when Valve changes a map between releases, its new navigation file comes here first. Install it over the one from the ZIP.
- CS2FOW map tools: in the full package or the maps-and-tools ZIP, to prepare maps on the server.
Running plugins also fetch newer gamedata and map data by themselves when automatic updates are on. An image should still ship the current files, so a new container starts right.
3. Download
Send the key with every request: Authorization: Bearer <key>. Base address: https://license.karola3vax.com.
| Request | Answer |
|---|---|
GET /v1/partner/releases/latest | A list of the current releases for your key, with every file, its size and SHA-256. |
GET /v1/partner/releases/<product>/<version>/<platform> | The signed update ZIP. platform is linux or windows. |
GET /v1/partner/packages/<product>/<version>/<platform>/<kind> | A package ZIP. kind is full or maps_tools. |
GET /v1/partner/gamedata/<product>/<version> | The current gamedata for that release (CS2AC and CS2FOW). |
GET /v1/partner/official-nav/<map>/<sha256>.fownav | The current official CS2FOW navigation file of one map. |
Start with /v1/partner/releases/latest: it lists only the products your key covers, and for each one the update ZIPs (files), the full packages (packages), the gamedata (gamedata) and, for CS2FOW, the newer navigation files (official_nav), each with its download path, size and SHA-256. New fields may be added later; existing ones keep their names and meaning.
4. Example: build an image
Installs the plugin, then the current gamedata, then CS2FOW's newer navigation files. Every file is checked against its SHA-256 before use, and existing cfg files are kept. Needs curl, jq and unzip. The build stops on purpose when there is no gamedata for a current CS2 build yet, so an image never ships without it.
#!/bin/sh
set -eu
BASE=https://license.karola3vax.com
AUTH="Authorization: Bearer $CS2_DOWNLOAD_KEY" # from your CI secret store
SERVER_ROOT=/home/steam/cs2 # the folder that holds game/
PLATFORM=linux
curl -fsS -H "$AUTH" "$BASE/v1/partner/releases/latest" -o latest.json
fetch() { # fetch <download_path> <file name> <sha256>
curl -fsS -H "$AUTH" "$BASE$1" -o "$2"
echo "$3 $2" | sha256sum -c -
}
for PRODUCT in cs2ac cs2fow; do
P=$(jq -c --arg p "$PRODUCT" '.products[] | select(.product == $p)' latest.json)
[ -n "$P" ] || { echo "$PRODUCT: no release"; exit 1; }
# 1. The plugin: the full package when there is one, else the update ZIP.
ZIP=$(echo "$P" | jq -c --arg os "$PLATFORM" \
'([.packages[] | select(.kind == "full" and .platform == $os)] + [.files[] | select(.platform == $os) | . + {extract_to: ""}])[0]')
NAME=$(echo "$ZIP" | jq -r .file_name)
fetch "$(echo "$ZIP" | jq -r .download_path)" "$NAME" "$(echo "$ZIP" | jq -r .sha256)"
DEST="$SERVER_ROOT/$(echo "$ZIP" | jq -r .extract_to)"
unzip -oq "$NAME" -x 'cfg/*' 'game/csgo/cfg/*' -d "$DEST"
unzip -nq "$NAME" 'cfg/*' 'game/csgo/cfg/*' -d "$DEST" 2>/dev/null || true
# 2. The current gamedata. Required: the ZIP's own gamedata goes out of date at the next CS2 update.
GD=$(echo "$P" | jq -c .gamedata)
[ "$GD" != "null" ] || { echo "$PRODUCT: no gamedata for a current CS2 build yet"; exit 1; }
fetch "$(echo "$GD" | jq -r .download_path)" "$PRODUCT.games.txt" "$(echo "$GD" | jq -r .sha256)"
install -D -m 644 "$PRODUCT.games.txt" "$SERVER_ROOT/$(echo "$GD" | jq -r .install_path)/$PRODUCT.games.txt"
done
# 3. CS2FOW: navigation files newer than the package.
jq -c '.products[] | select(.product == "cs2fow") | .official_nav[]' latest.json | while read -r NAV; do
NAME=$(echo "$NAV" | jq -r .file_name)
fetch "$(echo "$NAV" | jq -r .download_path)" "$NAME" "$(echo "$NAV" | jq -r .sha256)"
install -D -m 644 "$NAME" "$SERVER_ROOT/$(echo "$NAV" | jq -r .install_path)/$NAME"
doneWhen something fails
| Status | Meaning |
|---|---|
401 | The key is missing, wrong, replaced or removed. |
403 | Your license or partnership is not active, or the product is not part of it. |
404 | Not the current release, or no file for it. Only the current release can be downloaded. |
429 | Too many requests. Wait the number of seconds in Retry-After. |
503 | The file is briefly unavailable. Try again later. |
Good practice
- Fetch the release list once per pipeline run, not once per container.
- Skip a download when its SHA-256 matches a file you already cached.
- Stop the build when a SHA-256 check fails. Never install a file that does not match.
- Rebuild when the SHA-256 of any file you use changes, not only when the version changes: gamedata and navigation files change after CS2 updates without a new plugin version.
Questions
Message me on Discord: karola3vax. Setup and common problems: Help.