Self-host sqlchat
Chat-based SQL client driven by natural language
- Stars
- 5 856
- Port
- 3000 (the Next.js web application)
sqlchat/sqlchatWhat is sqlchat?
SQL Chat is a database client whose entire interface is a conversation: you describe what you want and it produces the SQL, covering reads as well as inserts, updates and drops. It is written with Next.js and supports MySQL, PostgreSQL, MSSQL, TiDB Cloud and OceanBase, with more engines planned. The language model comes from your own OpenAI API key, from any OpenAI-compatible endpoint, or from a local Ollama deployment; users can also be allowed to bring their own key. For personal use you can run the published Docker container with just a NextAuth secret and an API key; pointing it at a Postgres database instead turns on accounts, per-user quotas, usage tracking and payments, which is how the hosted edition was operated. A one-click Vercel deployment is offered from the repository, and connecting to a database on the same machine requires host.docker.internal. Note that the container image was last updated about six months ago and the project's own domain currently serves Bytebase marketing pages rather than the client.
sqlchat alternatives
datalineSelf-hosted, open-source AI tool to chat with data and generate SQL, charts, reports — supports PostgreSQL, MySQL, Snowflake, SQLite, CSV, Excel.Comparedataline with sqlchat
orbitSelf-hosted AI gateway connecting private data to local or hosted LLMs via one OpenAI-compatible API with built-in auth, quotas, audit logs, and admin UI.Compareorbit with sqlchat
ChartDBOpen-source database diagram editor that visualizes schemas with a single query, supports major databases, exports SQL, and self-hosts via Docker.CompareChartDB with sqlchat
WhoDBOpen-source, self-hosted database workspace: browse and edit data, query in a scratchpad, visualise schema graphs, with optional Ollama, OpenAI or Anthropic AI chat.CompareWhoDB with sqlchat
OrcaQOrcaQ is a self-hosted, open-source database editor for PostgreSQL, MySQL, MariaDB, Oracle, SQLite, and Redis with AI-assisted querying and a dark native workspace.CompareOrcaQ with sqlchat
nextgptNextGPT is a self-hosted AI chatbot with document processing, RAG search, and web search. Deploys via Docker Compose or to AWS/GCP.Comparenextgpt with sqlchat
Open-WebUIOpen WebUI is a self-hosted AI platform connecting to Ollama and OpenAI-compatible APIs with RAG, plugins, voice/video calls, and enterprise auth on your hardware.CompareOpen-WebUI with sqlchat
QA-PilotQA-Pilot is a self-hosted, open-source chat app that helps developers understand GitHub code repositories using local or cloud LLMs with code graph visualization.CompareQA-Pilot with sqlchat
Should you self-host sqlchat?
sqlchat scores 59/100 on selfhost.directory (how scoring works) and ranks #27 of 41 in Database Management. It has 5 856 GitHub stars, +13 in the last 30 days.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.
Its closest alternative on selfhost.directory is supabase (90/100, 114 758 stars). It scores higher overall, so compare the two before you pick. See sqlchat vs supabase side by side.
Features
- Billing & paymentsOnly active in database mode.
- Bring-your-own AI model endpoint
- Multi-database Support
- Natural-language chat interface
- Per-user quota enforcement
- SQL Editor
- Usage analytics
- User AccountsRequires NEXT_PUBLIC_USE_DATABASE=true and a Postgres database.
- User-supplied API keys
sqlchat README
More in Database Management
SQLPageFast SQL-only data application builder. Automatically build a UI on top of SQL queries.
StackRenderStackRender is a self-hosted, open-source database schema design tool for visually creating ER diagrams, generating SQL migrations, and tracking schema evolution.
supabaseSelf-hosted open-source Postgres platform with database, auth, realtime, storage, edge functions, and vector embeddings as a Firebase alternative.
supabase-automated-self-hostA bash script that automates deploying Supabase with Nginx or Caddy reverse proxy, Let's Encrypt SSL, and optional Authelia 2FA on Linux using Docker Compose.
SupabaseMetaOpen-source, self-hosted REST API that manages Postgres over HTTP: list and alter tables, columns, roles, functions and triggers, run SQL, generate types.
supa-managerSupaManager is an open-source API for managing self-hosted Supabase instances via Supabase Studio, a self-hosted alternative to Supabase Cloud.
teableSelf-hosted AI Spreadsheet combining spreadsheets, databases, and app building. Open-source Airtable alternative built on PostgreSQL with AI chat, automations.
terminusdbOpen-source knowledge graph database with built-in version control for branching, merging, and time-travel queries using Datalog.
TimescaleDBA time-series database for high-performance real-time analytics packaged as a Postgres extension
Typesense-DashboardA Typesense Dashboard to manage and browse collections.
velldVelld is a self-hosted, open-source database backup tool for PostgreSQL, MySQL, MongoDB, and Redis with automated scheduling, S3 storage, and notifications.
VitessVitess enables unlimited horizontal scaling through generalized sharding while maintaining MySQL compatibility.





0 comments