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.

ChartDB logo

Self-host ChartDB

v1.21.0

Database diagram editor with single-query schema import

BetaOpen SourceAGPL-3.0
Updatedlast week
LanguageTypescript
Setup difficultyEasy
ThemeDark mode
Stars
23 120
Port
80 (HTTP web interface)
Docker
ghcr.io/chartdb/chartdb
Install with Docker
ChartDB AI Database Editor interface

What is ChartDB?

ChartDB is a web-based database diagramming editor that lets you visualize your database schema by running a single query in your database and pasting the JSON output. It supports PostgreSQL, MySQL, SQL Server, MariaDB, SQLite, CockroachDB, and ClickHouse. Key capabilities include AI-assisted SQL export for cross-database migration, interactive visual editing, and diagram versioning. The self-hosted edition runs via Docker or npm without needing database credentials. Licensed under AGPL-3.0 and currently in public beta.

ChartDB alternatives

All self-hosted alternatives to dbdiagram.io → All self-hosted alternatives to DBeaver ERD → All self-hosted alternatives to DrawSQL →

Should you self-host ChartDB?

ChartDB scores 75/100 on selfhost.directory (how scoring works) and ranks #7 of 41 in Database Management. It has 23 120 GitHub stars, +130 in the last 30 days.

It shipped 6 stable releases in the past year. The latest, v1.21.0, came out on 1 November 2026. New versions land roughly every 5 weeks.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is supabase (90/100, 114 995 stars). It scores higher overall, so compare the two before you pick. See ChartDB vs supabase side by side.

Features

  • AI-Powered SQL ExportRequires OpenAI API key or custom LLM endpoint
  • DBML Editor
  • DBML Import/Export
  • Diagram Import/Export (JSON)
  • Embeddable DiagramsOnly available in ChartDB Cloud
  • Image Export
  • Instant Schema Import
  • Interactive Diagram Editing
  • Multi-database Support
  • Real-Time CollaborationOnly available in ChartDB Cloud (Teams plans)
  • SQL Export
  • Sync Database to DiagramCloud version has automated sync via API; self-hosted requires manual re-import
  • Version History & DiffsOnly available in ChartDB Cloud

ChartDB README

How to install ChartDB

Install ChartDB with Docker

Environment variables
OPENAI_API_KEY, OPENAI_API_ENDPOINT, LLM_MODEL_NAME, DISABLE_ANALYTICS

docker run -e OPENAI_API_KEY=<YOUR_OPEN_AI_KEY> -p 8080:80 ghcr.io/chartdb/chartdb:latest

Optional: add -e DISABLE_ANALYTICS=true to disable analytics

How to configure ChartDB

  • OPENAI_API_KEYOpenAI API key for AI features (export, diagram generation)
  • DISABLE_ANALYTICSDisable Fathom Analytics tracking

    values: true

  • VITE_OPENAI_API_ENDPOINTBuild-time custom OpenAI-compatible API endpoint
  • VITE_LLM_MODEL_NAMEBuild-time model name for custom inference server
  • VITE_DISABLE_ANALYTICSBuild-time flag to disable Fathom Analytics

    values: true

ChartDB releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Database Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…