Sign inSign up

kdvkrs/cs2-inventory-tracker

By kdvkrs

Updated 4 months ago

Config-first CS2 inventory tracker with Steam price history in a single Docker container.

Image
0

786

kdvkrs/cs2-inventory-tracker repository overview

CS2 Inventory Tracker

A tiny self-hosted tracker for long-term CS2 item positions.

CS2 Inventory Tracker is a Dockerized, config-driven dashboard for tracking a small manually defined Counter-Strike 2 inventory over time. Instead of mirroring your visible Steam inventory, it lets you define a “fantasy” inventory in a config file: items, owned amounts, and optional buy lots.

That makes it useful for long-term case, capsule, sticker, or storage-crate positions where the holdings you care about may be spread across storage units, accounts, spreadsheets, or simply not worth importing from Steam.

The app periodically fetches Steam Market prices, stores local price history in SQLite, and serves a static dashboard showing current value, cost basis, unrealized return, and historical price movement.

It is intentionally boring: no Steam login, no trading, no inventory sync, no accounts, no cloud service.

Why?

Most CS2 inventory tools answer:

What is my visible Steam inventory worth right now?

This app answers a slightly different question:

If I define my own long-term CS2 inventory, how has that position performed over time?

That is useful when your actual position is not the same thing as your public inventory: storage crates, hidden/private inventories, manually tracked buys, multiple accounts, or items you simply want to watch as a thesis.

Your config file is the source of truth. Steam is only used as a price oracle.

Features

  • Define your own CS2 inventory in a static config file
  • Track holdings that do not need to match your visible Steam inventory
  • Optional buy lots for cost basis and return calculations
  • Periodic Steam Market price fetching
  • Local SQLite price history
  • Current value, cost basis, unrealized P/L, and return %
  • 24h / 7d / 30d price movement
  • Historical price charts
  • Optional estimated value after Steam fees
  • Single Docker container
  • No Steam login or API key required

Non-goals

This is not:

  • A full Steam inventory valuation tool
  • A live trading terminal
  • A market bot
  • A multi-user portfolio app
  • A Steam account integration
  • A general accounting system

It is optimized for small, mostly static, long-term CS2 item positions.

Configuration-first by design

The tracker treats your config file as the canonical inventory:

/config/config.yaml  -> declared holdings
/data/prices.sqlite  -> observed market history

Changing your holdings means editing the config file and restarting the container. This is deliberate: the app is meant for long-term positions, not frequent trading or day-to-day inventory management.

Quick start (Docker)

1) Create local folders and config
mkdir -p config data

Create config/config.yaml:

currency: EUR
fetch_interval_hours: 6
fetch_on_startup: true
render_on_startup: true
request_delay_seconds: 2
user_agent: "cs2-crate-tracker/0.1"

http:
  host: "0.0.0.0"
  port: 8080

valuation:
  steam_fee_rate: 0.15
  show_net_after_fee: true

items:
  - market_hash_name: "Operation Phoenix Weapon Case"
    label: "Operation Phoenix Weapon Case"
    owned: 250
    buys:
      - price: 0.12
        amount: 250

  - market_hash_name: "Spectrum 2 Case"
    label: "Spectrum 2 Case"
    owned: 750
    buys:
      - price: 0.03
        amount: 750
2) Run the container
docker run -d \
  --name cs2-inventory-tracker \
  -p 8080:8080 \
  -v "$(pwd)/config:/config" \
  -v "$(pwd)/data:/data" \
  --restart unless-stopped \
  kdvkrs/cs2-inventory-tracker:latest

Open: http://localhost:8080

Docker Compose example

services:
  cs2-inventory-tracker:
    image: kdvkrs/cs2-inventory-tracker:latest
    container_name: cs2-inventory-tracker
    ports:
      - "8080:8080"
    volumes:
      - ./config:/config
      - ./data:/data
    restart: unless-stopped

Data locations

  • Config source of truth: /config/config.yaml
  • SQLite history cache: /data/prices.sqlite
  • Generated dashboard: /public/index.html (inside container)

Reset history

Delete the SQLite file and restart:

rm -f data/prices.sqlite
docker restart cs2-inventory-tracker

Caveats

  • Steam price observations are gross market snapshots.
  • They are not guaranteed liquidation prices.
  • Network/API behavior may vary; failed item fetches are logged and skipped per run.

Tag summary

Content type

Image

Digest

sha256:096fe8e93

Size

55 MB

Last updated

4 months ago

docker pull kdvkrs/cs2-inventory-tracker