ghstats
Your own GitHub analytics. GitHub forgets your traffic after 14 days, ghstats keeps it forever. Track stars, views and clones, and show them off with cards and
What is ghstats?
Your own GitHub analytics. GitHub forgets your traffic after 14 days, ghstats keeps it forever. Track stars, views and clones, and show them off with cards and badges.
Overview of ghstats
What it is
ghstats is a self-hosted GitHub traffic analytics tool that stores long-term history of repository metrics. GitHub only keeps traffic data for 14 days, but ghstats continuously pulls data from the GitHub API and saves it in a local SQLite database. It tracks views, clones, stars, forks, issues, and pull requests. The project is written in Rust and distributed as a Docker image.
Key features
- Long-term history for GitHub repository traffic beyond the 14-day GitHub limit
- Per-repository dashboards for stars, clones, views, referrers, and popular paths
- Automatic hourly sync for public repos, with optional private repo support
- Repo filtering by owner, exact name, forks, and archived status
- JSON API for exposing collected stats to personal sites or other tools
- Embeddable SVG badges and cards for repository, portfolio, and service metrics
- Small self-hosted deployment: one Rust binary, one SQLite database, one Docker image
Use cases
Use ghstats for personal projects, open-source portfolios, organization dashboards, or public stats pages where GitHub's built-in traffic tab is too short-lived. It is suitable for anyone who wants to own their repository traffic history for months or years instead of losing it after two weeks.
Getting started
shdocker run -d --env-file .env -p 8080:8080 -v ./data:/app/data --name ghstats ghcr.io/vladkens/ghstats:latestOpen http://127.0.0.1:8080 after the container starts. A Docker Compose example is also provided in the README. For detailed setup instructions, see the repository README.
License and pricing
The project is licensed under MIT and is open source. No pricing information is stated.
Based on the project's public README and repository metadata.