7 open-source alternatives ranked by real activity

Open-source Cloudflare D1 alternatives

A curated, ranked list of the 7 best open-source alternatives to Cloudflare D1.

The best open-source alternative to Cloudflare D1 is Supabase. If that doesn't suit you, other good options are DuckDB, TiDB, SurrealDB and rqlite.

Commercial alternatives to Cloudflare D1 include Upstash, CockroachDB, MongoDB Atlas and PlanetScale. See all 11.

Cloudflare D1 alternatives are mainly databases, but some are also backend-as-a-service tools. 6 of them shipped code in the last 30 days, 7 can be self-hosted, and 6 use a permissive licence.

Last updated November 12, 2026 · ranked by GitHub stars, growth and recent commits

Supabase

An open-source Postgres development platform bundling a database, auth, auto-generated APIs, realtime, storage and vector tools, often chosen as a Firebase alternative.

GitHub stars
115k
Last commit
today
Latest release
v1.26.08
Licence
Apache-2.0
Self-hosted
Yes
Hosted version
Available
supabase.comSupabase homepage screenshot

Supabase is a backend platform built around a dedicated Postgres database. It packages the pieces most web, mobile and AI apps need, including authentication and authorization, auto-generated APIs, file storage, serverless functions and a dashboard, so developers can start without assembling separate services. Its stated aim is a developer experience similar to Firebase, built from open-source components.

APIs are generated from your schema as REST and GraphQL, with realtime subscriptions over websockets. Logic can live in database functions or in Edge Functions that run on Deno. For AI work there is a toolkit for vectors and embeddings built on pgvector, and Postgres extensions such as PostGIS are available. Supabase combines existing open tools with ones it builds itself when nothing suitable exists.

The code is Apache-2.0 licensed. Supabase is offered as a hosted platform you can sign up for without installing anything, and the same stack can be self-hosted or run locally for development. It suits teams that want Postgres at the core of their app but prefer not to build the surrounding backend themselves.

Key features

  • Hosted Postgres database with a dashboard
  • Authentication and authorization
  • Auto-generated REST and GraphQL APIs
  • Realtime subscriptions over websockets
  • Edge Functions and database functions
  • File storage for user uploads
  • Vector and embeddings toolkit with pgvector

Pricing: Free plan with 50,000 monthly active users. Pro starts at $25 and Team at $599 per month, with usage and extra compute billed on top; Enterprise is custom.

Read more about SupabaseWebsiteGitHub#1 Cloudflare D1 alternative

DuckDB

An analytical, in-process SQL database that runs inside your application or from a CLI, with a rich SQL dialect and easy CSV and Parquet querying.

GitHub stars
43k
Last commit
today
Latest release
v2.0.0
Licence
MIT
Self-hosted
Yes
duckdb.orgDuckDB homepage screenshot

DuckDB is an analytical SQL database management system that runs in-process, meaning it is embedded in your application or notebook rather than running as a separate server. The goals are speed, reliability, portability and ease of use for analytical queries, and it is written in C++.

Its SQL dialect goes well beyond the basics: it handles arbitrary nested correlated subqueries, window functions, collations and complex types such as arrays, structs and maps, plus extensions that make SQL more convenient. CSV and Parquet files can be queried by naming them in a FROM clause. DuckDB is available as a standalone command line tool and has clients for Python, R, Java and WebAssembly, with deep integration into packages such as pandas and dplyr.

The project is MIT licensed. Building from source needs CMake, Python 3 and a C++17 compiler. Because it needs no server, DuckDB is popular with data analysts and engineers for exploring files and running local analytics, and it complements larger warehouses rather than replacing them.

Key features

  • In-process analytical SQL engine
  • Direct querying of CSV and Parquet files
  • Window functions and correlated subqueries
  • Arrays, structs and maps data types
  • CLI plus Python, R, Java and Wasm clients
  • Integrations with pandas and dplyr

Pricing: Free and open source under the MIT license.

Read more about DuckDBWebsiteGitHub#2 Cloudflare D1 alternative

TiDB

An open-source, MySQL-compatible distributed SQL database with horizontal scaling, ACID transactions, Raft-based high availability and support for analytics and vector search.

GitHub stars
41k
Last commit
today
Latest release
v7.5.8
Licence
Apache-2.0
Self-hosted
Yes
Hosted version
Available
tidb.ioTiDB homepage screenshot

TiDB is a cloud-native, open-source distributed SQL database from PingCAP. The name's Ti stands for titanium, and it is built for high availability, strong consistency and the ability to scale out as data and traffic grow, while staying compatible with MySQL so existing applications and tools can connect with little change.

Distributed transactions use a two-phase commit protocol to keep ACID guarantees even across nodes, through network partitions or node failures. It scales horizontally by adding nodes or vertically by adding resources, without downtime, and its architecture separates compute from storage so each can be adjusted independently. Built-in Raft consensus keeps multiple replicas in sync and handles automated failover. Topics also mention HTAP workloads, analytics and native vector search.

TiDB is written in Go under the Apache-2.0 license. It can be deployed on your own infrastructure or consumed as a managed cloud service, and it suits teams that have outgrown a single MySQL server and want horizontal scale without sharding by hand.

Key features

  • MySQL-compatible distributed SQL
  • Distributed ACID transactions
  • Horizontal and vertical scaling without downtime
  • Separated compute and storage layers
  • Raft-based replication and automated failover
  • Analytics and vector search support

Pricing: TiDB Community is free and Cloud Starter has a monthly free quota. Cloud Premium starts from $1800 per month and Dedicated from $0.22 per hour; Self-Managed is priced on request.

Read more about TiDBWebsiteGitHub#3 Cloudflare D1 alternative

SurrealDB

A multi-model database written in Rust that combines document, graph, relational, time-series and vector data with real-time features, from embedded use to distributed clusters.

GitHub stars
33k
Last commit
4 days ago
Latest release
v4.0.1
Self-hosted
Yes
Hosted version
Available
surrealdb.comSurrealDB homepage screenshot

SurrealDB is a Rust-based multi-model database that brings several data models into one engine: key-value, document, graph, relational, time-series and geospatial data. Search and retrieval options include full-text, vector and hybrid, and it adds real-time and event-driven capabilities, queried through its SQL-like language, SurrealQL.

Because it supports end-user authentication, SurrealDB can also act as a backend-as-a-service, reducing the amount of server-side code an app needs. It ships as a single Rust binary that can run embedded inside an application, in the browser via WebAssembly, at the edge, as a self-hosted single node, or as a distributed cluster in the cloud. Typical workloads include data-intensive systems that need several data types, storage for AI agents, knowledge graphs, live applications such as recommenders and fraud detection, and embedded or edge deployments.

The repository license is listed as 'Other' on GitHub, so confirm the terms before commercial use. SurrealDB also offers cloud-hosted database service, and topics tag it as a serverless, realtime database for the web.

Key features

  • Document, graph and relational models in one engine
  • Full-text, vector and hybrid search
  • Real-time and event-driven queries
  • Built-in user authentication
  • Single binary: embedded, edge or cluster
  • SurrealQL SQL-like query language

Pricing: The Start plan includes one free instance with 1GB of storage; extra instances are from $0.021 per hour. Scale is $0.192 per node hour with a three-node minimum; self-hosted Enterprise is custom.

Read more about SurrealDBWebsiteGitHub#4 Cloudflare D1 alternative

rqlite

A lightweight, fault-tolerant distributed relational database built on SQLite and Raft consensus, easy to run on cloud or edge.

GitHub stars
18k
Last commit
2 days ago
Latest release
v10.7.1
Licence
MIT
Self-hosted
Yes
rqlite.iorqlite homepage screenshot

rqlite is a distributed relational database that uses SQLite as its storage engine and the Raft consensus algorithm to keep a cluster consistent. The project describes it as lightweight, developer-friendly and easy to operate, and compares it to etcd but with relational modeling, meaning you store important data with the guarantees of a replicated system while querying it with SQL.

Because it embeds SQLite, you get full SQL support including full-text search and JSON. Extensions can be loaded to add capabilities such as vector search and cryptographic functions, and multiple SQL statements can be executed atomically within one API request. Change data capture is listed among the key features, and a multi-node cluster can be formed in seconds following the quick start. It is written in Go.

rqlite is MIT licensed and aimed at resilient services in the cloud and reliable applications at the edge, where a full database server would be too heavy but a single SQLite file would be a single point of failure. You run it yourself, and the website, Slack community and developer guide help with getting started.

Key features

  • Distributed SQLite with Raft consensus
  • Full SQL including full-text search and JSON
  • Loadable SQLite extensions
  • Atomic multi-statement requests
  • Change data capture
  • Simple multi-node clustering

Pricing: Free and open source under the MIT license.

Read more about rqliteWebsiteGitHub#5 Cloudflare D1 alternative

libSQL

libSQL is an open-contribution fork of SQLite from Turso that adds embedded replicas and remote access; the team now builds its newer Rust database separately.

GitHub stars
17k
Last commit
6 days ago
Latest release
libsql-server-v0.24.32
Licence
MIT
Self-hosted
Yes
Hosted version
Available
turso.techlibSQL homepage screenshot

libSQL is a fork of SQLite, open source and open to outside contributions, created and maintained by Turso. It extends SQLite with capabilities such as embedded replicas and remote access, with the goal of serving far more scenarios than the original SQLite was built for, and it draws on third-party open-source code where that makes sense. The core is in C, with Rust and WebAssembly work around it.

The README makes an important distinction. libSQL, this repository, inherits SQLite's basic limitations, including the single-writer model. The Turso database is a separate project from the same team: a SQLite-compatible database written anew in Rust rather than forked, which adds concurrent writes and two-way sync that can work offline, and is currently in beta. The team says libSQL remains actively maintained but that new features are being developed in the Turso database, and suggests new projects look there first.

libSQL is MIT licensed, and it is used both embedded in applications and through Turso's hosted platform. Documentation, a manifesto, a Discord community and tutorials are provided. It suits developers who like SQLite's simplicity but need replication or remote access.

Key features

  • Open-contribution fork of SQLite
  • Embedded replicas for local reads
  • Remote access to databases
  • Rust and WebAssembly components
  • Hosted platform from Turso
  • Separate Rust-based Turso database in beta

Pricing: Free hosted plan for up to 100 databases. Developer costs $5.99, Scaler $29 and Pro $499 a month (less billed yearly), with overage rates above allowances; Enterprise is custom.

Read more about libSQLWebsiteGitHub#6 Cloudflare D1 alternative

Neon

An open-source serverless Postgres platform that separates storage from compute to offer autoscaling, database branching and scale to zero.

GitHub stars
23k
Last commit
2 mo ago
Latest release
release-proxy-8853
Licence
Apache-2.0
Self-hosted
Yes
Hosted version
Available
neon.techNeon homepage screenshot

Neon is a serverless Postgres database platform that is open source. It separates storage from compute and replaces the PostgreSQL storage layer with one that distributes data across a cluster of nodes, which enables autoscaling, branching of databases in the style of code, and scaling down to zero.

A running Neon system is made up of compute nodes plus a dedicated storage engine. The compute nodes are stateless PostgreSQL instances backed by that engine, whose two main components are the Pageserver, a scalable storage backend for the compute nodes, and the Safekeepers, a redundant write-ahead-log service that keeps WAL durably until the Pageserver has processed it and uploaded it to cloud storage. Developer documentation describes the architecture in more detail.

The easiest way to try Neon is the hosted Neon Free Tier, connecting with psql, DBeaver or the online SQL editor. The project is also written in Rust and licensed under Apache-2.0 so you can compile and run it locally for experiments, with build instructions for Linux and macOS. It suits teams that want Postgres with branching for development workflows and elastic scaling.

Key features

  • Serverless Postgres with autoscaling
  • Separated storage and compute
  • Database branching for development
  • Scale to zero when idle
  • Pageserver and Safekeeper storage engine
  • Hosted free tier available

Pricing: Free plan has no time limit. Launch is usage-based at $0.106 per CU-hour plus $0.35 per GB-month of storage; Scale is $0.222 per CU-hour.

Read more about NeonWebsiteGitHub#7 Cloudflare D1 alternative

Commercial Cloudflare D1 alternatives

Hosted, closed-source products that compete with Cloudflare D1.

Cloudflare D1 alternatives: questions

What is the best open-source alternative to Cloudflare D1?
Supabase is the top-ranked open-source alternative to Cloudflare D1 on Enlisted: An open-source Postgres development platform bundling a database, auth, auto-generated APIs, realtime, storage and vector tools, often chosen as a Firebase alternative. Other strong options are DuckDB, TiDB, SurrealDB and rqlite.
What are the best commercial alternatives to Cloudflare D1?
Upstash, CockroachDB, MongoDB Atlas, PlanetScale and Akeyless are among the hosted, closed-source alternatives to Cloudflare D1 listed on Enlisted, which lists 11 in total. Compare their pricing and features on each tool page.
Are these Cloudflare D1 alternatives free?
All 7 are open source, so the code is free to use under its licence, and all of them can be self-hosted on your own server or computer. 5 also offer a paid or managed cloud version if you'd rather not host it yourself.
How is this list of Cloudflare D1 alternatives ranked?
By a score built from GitHub stars, star growth over the last 30 days and how recently the code changed. 6 of these projects shipped code in the last 30 days. Data is refreshed daily, and nobody can pay to move up.

People also look for alternatives to…

View all