selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Betterlytics logo

Self-host Betterlytics

v1.5.1

Privacy-first web analytics with session replay and uptime

ReleaseOpen SourceAGPL-3.0
Updatedlast week
LanguageTypescript
Setup difficultyModerate
Stars
180
RAM
2 GB
Storage
a few GB of free disk
Port
80 (HTTP web interface (container port))
Requires
ClickHouse, PostgreSQL
Docker
ghcr.io/betterlytics/betterlytics-selfhost
Install with Docker Compose
Dashboard overview showing traffic metricsGeography insights with visitor distribution by countryEvents and live event insightsCore Web Vitals dashboardUptime and SSL monitoring dashboard

What is Betterlytics?

Betterlytics is an open-source web analytics platform that unifies traffic analytics, session replay, client-side error tracking, Core Web Vitals monitoring, and uptime monitoring with public status pages in a single dashboard. It runs without cookies, is GDPR/CCPA/PECR compliant, and can be self-hosted via Docker Compose on your own infrastructure. The platform is built on Rust, Next.js, ClickHouse, and PostgreSQL. Self-hosting uses a dedicated repository with an interactive setup script that generates configuration and deploys containers for the app, PostgreSQL, and ClickHouse. The tracker script is ~3.5KB gzipped and loads asynchronously. Features include multi-user access with roles and permissions, two-factor authentication, OAuth via Google and GitHub, a built-in MCP server for AI-assisted analytics queries, and integrations with Slack, Discord, Teams, and webhooks for alerts. The self-hosted edition includes all core features but may receive updates after the cloud version.

Should you self-host Betterlytics?

Betterlytics scores 49/100 on selfhost.directory (how scoring works) and ranks #12 of 27 in Analytics. It has 180 GitHub stars.

It shipped 2 stable releases in the past year. The latest, v1.5.1, came out on 18 October 2026. New versions land roughly every 8 months.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Plausible Analytics (81/100, 29 701 stars). It scores higher overall, so compare the two before you pick. See Betterlytics vs Plausible Analytics side by side.

Features

  • Cookieless tracking
  • Core Web Vitals monitoring
  • Custom Events
  • Data Anonymization
  • Email ReportsRequires email configuration
  • Error Tracking
  • Funnels & User Journeys
  • MCP Server
  • OAuth Authentication
  • Public status pages
  • Role-based Access Control
  • Session Replay
  • Two-factor authentication
  • Uptime Monitoring
  • Web analytics

Betterlytics README

How to install Betterlytics

Install Betterlytics with Docker Compose

Environment variables
PUBLIC_URL, TLS, HTTP_PORT, BIND_ADDRESS, SECRET_BASE, ENABLE_EMAILS, SMTP_*, MAILER_SEND_API_TOKEN, ENABLE_GEOLOCATION, MAXMIND_*, SESSION_REPLAYS_ENABLED, REPLAY_RETENTION_DAYS, S3_*, ALLOW_PRIVATE_TARGETS, TELEMETRY_ENABLED, LOG_LEVEL, PUSHOVER_APP_TOKEN, BACKGROUND_JOBS_ENABLED, PUBLIC_ENABLE_FAVICON_FETCHING, SKIP_VERSION_CHECK, DO_NOT_TRACK, TRUSTED_PROXIES, AUTH_TRUSTED_PROXIES, SSL_EMAIL, ACME_CA, GEOLOCATION_MODE, ENABLE_ASN_LOOKUP, REPLAY_STORAGE, DATA_RETENTION_DAYS, S3_SSE_ENABLED

git clone https://github.com/betterlytics/betterlytics-selfhost.git cd betterlytics-selfhost ./setup.sh docker compose up -d --wait

Interactive setup script generates .env and docker-compose.override.yml; supports Standalone (auto HTTPS), Basic (behind reverse proxy), and Try Locally modes

Betterlytics releases & version history

FAQ

Still have questions?

Join the Discord community or reach out via email at support@betterlytics.io. You can also browse the Installation Overview or Pricing & Billing pages.

For how long is my data stored?

On Cloud: Growth retains 1+ year, Professional 3+ years, Enterprise 5+ years. Session Replay recordings are kept for 60 days. Self-hosted retention is entirely under your control.

How does Betterlytics compare to other analytics tools?

Detailed comparison pages cover features, privacy, performance, and pricing side by side against Google Analytics, Matomo, Plausible, PostHog, Fathom Analytics, and Umami.

What's the performance impact of the tracking script?

The script loads asynchronously and is about 3.5KB gzipped, designed not to block rendering. Optional add-ons like Core Web Vitals and Session Replay are disabled by default and only load when opted in.

Is there a free plan?

Yes, the Growth plan is free up to 10,000 events per month and includes core analytics features. Paid plans offer higher limits and longer data retention.

Do Betterlytics Cloud and self-hosted have the same features?

Mostly, but not always at the same time. New features launch on Cloud first, and the self-hosted image is updated periodically from stable releases. Session replay, error tracking, uptime monitoring, and status pages are all included in the self-hosted image.

Who is Betterlytics for?

Teams of all sizes that want actionable insights without cookie banners: anyone who would rather run one tool than juggle separate analytics, error tracking, and uptime monitoring services, plus privacy-conscious organizations that value data ownership.

Can I query my analytics with AI?

Yes, Betterlytics has a built-in MCP server so you can connect AI assistants like Claude, Cursor, or Codex directly to your analytics data and ask questions in natural language.

How do I integrate it?

Add a single async script tag with your Site ID, or use the @betterlytics/tracker NPM package for React and modern frameworks. Optional features like Session Replay, Dynamic URLs, Outbound Links, and Web Vitals can be enabled via script attributes.

What insights can I get?

The dashboard shows unique visitors, pageviews, bounce rate, scroll depth, visit duration, referrers, geography, devices, custom events, funnels, user journeys, outbound links, Core Web Vitals, client-side errors with stack traces, session replays, and uptime/SSL monitoring.

How does it ensure privacy?

Betterlytics does not use cookies or collect personally identifiable information. Visitor IP addresses are never stored and are combined into an anonymous identifier using a daily rotating salt. Each website's data is isolated to prevent cross-site tracking.

Is Betterlytics compliant with privacy regulations?

Yes, Betterlytics is compliant with GDPR, CCPA and PECR out of the box. Data on the hosted service is processed on EU infrastructure, visitor IP addresses are never stored, and no personal data is collected.

What is Betterlytics?

Betterlytics is a privacy-first, cookieless platform that combines web analytics, client-side error tracking, session replay, and uptime monitoring in a single tool.

More in Analytics

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…