Skip to content

JustinMissmahl/DatabuddySelfHost

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3,976 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Databuddy

License: AGPL TypeScript Next.js React Turborepo Bun Tailwind CSS

CodeRabbit Pull Request Reviews Code Coverage Security Scan Dependency Status

Vercel OSS Program

Discord GitHub Stars Twitter

A comprehensive analytics and data management platform built with Next.js, TypeScript, and modern web technologies. Databuddy provides real-time analytics, user tracking, and data visualization capabilities for web applications.

🌟 Features

  • πŸ“Š Real-time analytics dashboard
  • πŸ‘₯ User behavior tracking
  • πŸ“ˆ Advanced data visualization // Soon
  • πŸ”’ Secure authentication
  • πŸ“± Responsive design
  • 🌐 Multi-tenant support
  • πŸ”„ Real-time updates // Soon
  • πŸ“Š Custom metrics // Soon
  • 🎯 Goal tracking
  • πŸ“ˆ Conversion analytics
  • πŸ” Custom event tracking
  • πŸ“Š Funnel analysis
  • πŸ“ˆ Cohort analysis // Soon
  • πŸ”„ A/B testing // Soon
  • πŸ“ˆ Export capabilities
  • πŸ”’ GDPR compliance
  • πŸ” Data encryption
  • πŸ“Š API access

πŸ“š Table of Contents

  1. How do I get started? Follow the Getting Started guide.

Prerequisites

  • Bun 1.3.4+
  • Node.js 20+

🏠 Self-Hosting

Databuddy can be self-hosted using Docker Compose. The repo includes two compose files:

File Purpose
docker-compose.yaml Development only β€” starts infrastructure (Postgres, ClickHouse, Redis) for local dev
docker-compose.selfhost.yml Production / self-hosting β€” full stack with all application services from GHCR images

Quick Start

# 1. Configure environment
cp .env.example .env
# Edit .env β€” at minimum set BETTER_AUTH_SECRET and BETTER_AUTH_URL

# 2. Start everything
docker compose -f docker-compose.selfhost.yml up -d

# 3. Initialize databases (first run only)
docker compose -f docker-compose.selfhost.yml exec api bun run db:push
docker compose -f docker-compose.selfhost.yml exec api bun run clickhouse:init

Services started:

  • API β†’ localhost:3001
  • Basket (event ingestion) β†’ localhost:4000
  • Links (short links) β†’ localhost:2500
  • Uptime monitoring is optional β€” uncomment in the compose file and set QStash keys.

All ports are configurable via env vars (API_PORT, BASKET_PORT, etc.). See the compose file comments for the full env var reference.

Troubleshooting

If the init job fails and Postgres logs show password authentication failed for user "databuddy", the Postgres volume was likely initialized with an older password.

Changing POSTGRES_PASSWORD or DATABASE_URL in your environment does not update the password stored inside an existing Postgres data volume.

To keep the existing data, update the password inside the running Postgres container to match your current environment and redeploy:

docker exec -it databuddy-postgres psql -U databuddy -d databuddy

Then inside psql:

ALTER USER databuddy WITH PASSWORD 'your-current-postgres-password';

Make sure the password in DATABASE_URL matches the same value.

If you do not need to preserve the database, remove the existing volume and start fresh so Postgres initializes with the current environment values:

docker compose -f docker-compose.selfhost.yml down -v
docker compose -f docker-compose.selfhost.yml up -d

🀝 Contributing

See CONTRIBUTING.md for guidelines.

πŸ”’ Security

See SECURITY.md for reporting vulnerabilities.

❓ FAQ

General

  1. What is Databuddy? Databuddy is a comprehensive analytics and data management platform.

  2. How do I get started? Follow the Getting Started guide.

  3. Is it free? Check our pricing page.

Technical

  1. What are the system requirements? See Prerequisites.

  2. How do I deploy? See the deployment documentation in our docs.

  3. How do I contribute? See Contributing.

πŸ’¬ Support

πŸ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

Copyright (c) 2025 Databuddy Analytics, Inc.

About

Databuddy is a privacy-first analytics platform with a focus on user experience, with it's foundation built on privacy, it ensures complete compliance with most major data privacy laws out of the box

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 91.9%
  • MDX 7.0%
  • CSS 0.5%
  • HTML 0.4%
  • Shell 0.1%
  • Dockerfile 0.1%