Open-source, privacy-friendly web and product analytics that positions itself as an alternative to Google Analytics.
msgbyte/tianji
Self-hosted all-in-one tool combining website analytics, uptime monitoring, and server status pages in one app.
Open-source alternative to:Google Analytics
UptimeRobot
- Stars
- 3,119
- Forks
- 198
- Open issues
- 144
- Last commit
- 22 hours ago
What is it?
Tianji is a self-hosted application that brings together three kinds of monitoring that are often handled by separate tools: website analytics, uptime monitoring, and server status. Its goal is to let small teams and individual developers cover common needs with one deployment instead of running several services.
On the analytics side, it tracks page views, visitors and per-page visits, similar in purpose to Google Analytics or umami. The uptime monitor checks the availability and connectivity of services, and it also supports receiving results passively. A server status feature reports the health of machines via a reporter component. The project also includes problem notifications, team collaboration, an OpenAPI interface, and a Helm chart for Kubernetes deployment.
The project is written in TypeScript, uses PostgreSQL as its database, and can be started with Docker Compose, which runs the application and database together on port 12345 by default. It is licensed under Apache-2.0 and ships with a bilingual-friendly i18n setup.
Key features
- 01Website analytics for page views, visitors and per-page visit counts
- 02Uptime monitoring with support for passive result reporting
- 03Server status reporting through a reporter component
- 04Problem notifications and team collaboration
- 05OpenAPI interface and Helm chart for Kubernetes deployment
Use cases
- Replacing Google Analytics with a self-hosted alternative for a website
- Monitoring the uptime of web services and receiving alerts when they fail
- Checking the health of several servers from one dashboard
- Running a single lightweight tool instead of separate analytics, uptime and server monitoring stacks
Quick start
- 1
Run the Docker Compose stack from the repository root
docker compose up -d - 2
Open the application in your browser at localhost port 12345
Things to know
- Requires running a PostgreSQL database alongside the app.
- Some features such as translation generation need an OpenAI API key.
In collections
Topics
FAQ
- What is tianji?
- Self-hosted all-in-one tool combining website analytics, uptime monitoring, and server status pages in one app. Tianji is a self-hosted application that brings together three kinds of monitoring that are often handled by separate tools: website analytics, uptime monitoring, and server status. Its goal is to let small teams and individual developers cover common needs with one deployment instead of running several services.
- Is tianji free to use? What license does it have?
- tianji is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is tianji still maintained?
- Actively maintained. The last commit to tianji was on Oct 23, 2026.
- What can I use tianji for?
- Replacing Google Analytics with a self-hosted alternative for a website Monitoring the uptime of web services and receiving alerts when they fail Checking the health of several servers from one dashboard Running a single lightweight tool instead of separate analytics, uptime and server monitoring stacks
- How do I install tianji?
- Run the Docker Compose stack from the repository root: docker compose up -d Open the application in your browser at localhost port 12345
- Where can I get tianji?
- The source code and installation instructions are on GitHub: https://github.com/msgbyte/tianji
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Privacy-first web analytics platform that tracks traffic, campaigns, behavior, conversions and revenue without cookies, self-hosted or in the cloud.
Open source, cookie-free web analytics tool positioned as a privacy-first alternative to Google Analytics, available as cloud or self-hosted.
Open source, privacy-friendly web analytics that you can use as a hosted service or self-host, as an alternative to Google Analytics.
Self-hosted, privacy-focused website analytics built on Node.js and MongoDB, with a minimal interface and no cookies.
Self-hosted uptime and infrastructure monitoring app that checks HTTP, ping, port, DNS, Docker and more, with status pages and incident alerts.