Install
Workshop-shaped mod on the dedicated server, plus a host-side collector that
POSTs snapshots to the KnoxStats API. Full detail:
knoxstats/docs/install.md in the repo.
1. Enable the mod
- Publish (or distribute) the
KnoxStatsB42 mod so every joiner has it. - On the dedicated server, enable
Mods=KnoxStatsand the Workshop item when published. On VaultPanel hosts usevp.py enable-local KnoxStats— do not hand-edit mod lists. - Until Workshop publish, every client needs local mod files or joiners get mod-mismatch kicks.
2. What the mod writes
~/Zomboid/Lua/knoxstats.json # Windows: %USERPROFILE%\Zomboid\Lua\knoxstats.json
3. Run the API and create a token
cd knoxstats/api python -m venv .venv # Windows: .venv\Scripts\activate pip install -r requirements.txt python admin.py create-token --server-name "My PZ Server" # Windows: .\run_api.ps1 or .\run_api.ps1 -Port 8743
4. Install the collector
Windows
cd knoxstats\collector .\install_collector.ps1 # Edit config.toml — api_url + token .\run_collector.ps1
Linux (systemd)
cd knoxstats/collector python3.11 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt sudo cp config.example.toml /etc/knoxstats/config.toml # edit token + api_url sudo cp systemd/knoxstats-collector.service /etc/systemd/system/ sudo systemctl enable --now knoxstats-collector
5. Verify
Production DNS/HTTPS and Workshop publish are operator steps — see
knoxstats/docs/workshop-publish-checklist.md and privacy docs.
Do not enable on a live public PZ server until joiners have the mod.