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.

Traks logo

Self-host Traks

v0.1.45

Privacy-friendly web analytics on Cloudflare

BetaOpen SourceMIT
Updated4 hours ago
LanguageTypescript
Setup difficultyModerate
MobileResponsive
Stars
331
Requires
Cloudflare D1, Cloudflare Durable Objects, Cloudflare KV, Cloudflare Pipelines, Cloudflare R2, Cloudflare R2 Data Catalog (Apache Iceberg), Cloudflare R2 SQL, Cloudflare Workers Paid plan

What is Traks?

Traks is a self-hosted web analytics platform deployed into your own Cloudflare account. A cookieless 1.5KB tracker feeds a real-time dashboard showing live visitor counts, pageviews, sources, locations, devices, custom events, goals, funnels, and segments. An MCP server lets AI agents query analytics, while bot and crawler detection runs separately. Multi-site workspaces support team invitations. Data remains in your Cloudflare account — events go to R2 with Apache Iceberg and are queried via R2 SQL. Authentication uses Better Auth on D1 (email/password only). A wizard at traks.dev/deploy provisions Workers, D1, KV, R2 bucket with Data Catalog, Pipelines stream and Iceberg sink in about 2 minutes. Updates and removal are one-click. Costs are your Cloudflare bill only (~$5/mo base for most sites). Open source under MIT license.

Should you self-host Traks?

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

It shipped 11 stable releases in the past year. The latest, v0.1.45, came out on 28 October 2026.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Litlyx (57/100, 1 748 stars). It scores higher overall, so compare the two before you pick. See Traks vs Litlyx side by side.

Features

  • 404 capture
  • Automatic outbound click and download tracking
  • Bot and crawler analytics
  • Cookieless tracking
  • Custom Events
  • Filters and segments
  • Goals and funnels
  • MCP server for AI agents
  • Multi-site from day one
  • Plausible migration
  • Privacy-first (GDPR/ePrivacy/PECR compliant)
  • Real-Time Analytics
  • Self-hosted on Cloudflare
  • WebMCP agent tool metering
  • Workspaces and teams

Traks README

How to configure Traks

  • ADMIN_KEYAdmin key for traks-home (deploy wizard)

    Admin key for traks-home (deploy wizard)

  • BETTER_AUTH_SECRETSecret for Better Auth authentication

    Secret for Better Auth authentication

  • CATALOG_TOKENToken for R2 Data Catalog provisioning

    Token for R2 Data Catalog provisioning

  • CLAIM_TOKENOne-time worker secret for first-run instance claim

    One-time worker secret for first-run instance claim

  • R2_SQL_TOKENWorkers R2 SQL Read token on the warehouse bucket

    Workers R2 SQL Read token on the warehouse bucket

  • VISITOR_HASH_SECRETSecret for daily-rotating visitor hash (HMAC)

    Secret for daily-rotating visitor hash (HMAC)

Traks releases & version history

More in Analytics

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…