# ghstats

> Self-hosted, open-source tool that pulls GitHub repo traffic via API into SQLite, keeping history beyond the 14-day limit. Includes dashboards, JSON API, and SVG badges.

- **Category:** Analytics
- **Licence:** MIT
- **Latest version:** v0.10.0
- **Open source:** oss
- **Languages:** Rust
- **Platforms:** Docker, Docker Compose
- **Tags:** Analytics, SQLite, API, Dashboard, Docker, Rust, Self Hosted, Badges, Traffic, Github stats, Github api, GitHub, Stargazers, Github Tracker, Github Traffic, Repo Analytics, Traffic Analytics

## Description

ghstats is a Rust-based, self-hosted service that fetches GitHub repository traffic data through the GitHub API and persists it in a local SQLite database, overcoming GitHub's built-in 14-day retention window. It presents per-repo dashboards with stars, clones, views, referrers, and top paths, syncs automatically on an hourly schedule (configurable via cron), and optionally tracks private repositories. A read-only JSON API and public SVG badge endpoints let you embed metrics on personal sites or READMEs. Repository visibility can be filtered by owner, name, fork status, or archived state. Deployment requires only the Docker image from ghcr.io/vladkens/ghstats and a mounted volume for the database — no external database, hosted account, or frontend build step. All settings are controlled through environment variables.

## Links

- [Homepage](https://github.com/vladkens/ghstats)
- [Docker](ghcr.io/vladkens/ghstats)
- [GitHub Repository](https://github.com/vladkens/ghstats)

---
Source: https://selfhost.directory/project/ghstats