Koito
Listening Stats
Open SourcePrimary tool for tracking personal music listening history, backed up nightly via its API export.
Koito is the primary tool for tracking personal music listening history, similar in spirit to Last.fm but fully self-hosted, with stats updating in real time rather than the monthly reporting cycle typical of online platforms. Listening data can be filtered by week, year, or all time, and a rewind feature surfaces monthly or yearly recaps. Maloja runs alongside it as a secondary, backup tracker for the same listening data.
Its listen history is backed up nightly using the same logic as the koito_backup role: authenticating against Koito’s /apis/web/v1/export endpoint with a token-based Authorization header, downloading the full history as a single JSON export, and writing it to both NAS targets as koito_export_<timestamp>.json, keeping only the last 5 backups per NAS. The nightly run itself is a standalone shell script deployed by cron_configuration, since a cron job can’t supply the interactive become password Ansible needs. The koito_backup role stays useful for running the same backup by hand, on demand.