Main features
- Real-time page views, unique visitors, bounce rate and time on site
- Referrers, entry and exit pages
- UTM campaigns
- Browsers, platforms, device types and screen sizes
- Optional country and city
- Custom events with properties
- Server-side event ingestion
- Bot and referrer spam filtering
- Configurable retention and pruning
- Teams, API keys and single sign-on with OpenID Connect
What Liwan does
Liwan is one of the youngest and smallest projects in this category: its repository was created in June 2024. It is written in Rust and ships as a single binary, or a container, with its dashboard and database built in. It reports page views, unique visitors, bounce rate, time on site, referrers, entry and exit pages, campaigns, devices and optional locations, and it accepts custom events from the browser or from your server.
Unusually for a small self-hosted tool, it has teams, project visibility controls, API keys and single sign-on with Google Workspace, Microsoft Entra ID or any OpenID Connect provider.
Privacy and cookies
Liwan uses no tracking cookies or cross-site identifiers. The server uses the request’s IP address while processing it and then discards it. Visitors are grouped with a hash of the IP address, user agent, site and a salt that changes daily, and you can switch to other grouping methods or limit location detail, campaign fields, session metrics and retention.
There is no built-in consent manager. If your consent tool needs to stop tracking, it can set a disable-liwan flag in local storage. The project does not state a legal position on consent.
Self-hosting Liwan
Liwan needs no separate database: data is kept in an embedded DuckDB database. Binaries are available for Linux on x86-64 and ARM64 and for macOS on ARM, and there are Docker and Docker Compose setups. By default DuckDB may use up to 80% of the server’s memory and all CPU cores, so on a small shared server you should lower those limits as the documentation explains. A reverse proxy is recommended for HTTPS.
Hosted version
There is no official hosted service. A public demo shows the dashboard.
Limitations
Liwan is young and has a small community compared with the larger projects here, and its API and JavaScript client are marked experimental. It focuses on traffic: no funnels, heatmaps or session recordings are documented.
Who it suits
Liwan suits developers and small teams who want traffic analytics with the least possible infrastructure, one binary and one data file, and who value detailed privacy settings and single sign-on.
Technical details
Self-hosting needs
- Embedded DuckDB only
Built with
- Rust
- TypeScript
- React
GitHub topics
- analytics
- privacy
- rust
- selfhosted
- tracking
Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.