CloudflareBase is one of the more ambitious Cloudflare-native projects in this series.

It is not a single Docker app, and it is not only a dashboard. It is trying to be a Firebase-style backend platform where auth, database, realtime, storage, remote config, and hosting all run on Cloudflare primitives.

That makes it a good follow-up to the Cloudflare Workers, D1, KV, and R2 serverless stack post. CloudflareBase is what happens when that idea grows into a reusable backend platform.

What is CloudflareBase?

CloudflareBase describes itself as:

The open-source Firebase alternative on Cloudflare.

The core idea is architectural isolation. Each project gets its own Durable Objects, so tenant separation is not just a WHERE project_id = ... condition in one shared database.

It currently covers:

  • authentication with Better Auth;
  • JSON document collections;
  • typed SQL-style tables;
  • realtime subscriptions;
  • remote config and feature flags;
  • R2-backed file storage;
  • static/app hosting through Workers for Platforms;
  • CLI deployment workflows;
  • dashboard management UI;
  • generated OpenAPI documents per project.

The project is Apache-2.0 licensed ❤️.

The Most Important Self-Hosting Detail

CloudflareBase is self-hostable, but not in the usual homelab Docker sense.

Self-hosting here means:

deploy the CloudflareBase control plane and agents into your own Cloudflare account

It does not ship a docker-compose.yml, Postgres service, Redis service, or local single-node server stack.

That is consistent with the product: it is built around Workers, Durable Objects, D1, R2, service bindings, Analytics Engine, Workers AI, and Workers for Platforms.

If you want a container you can run on a Raspberry Pi or VPS without Cloudflare, CloudflareBase is the wrong shape. If you want a Firebase-like backend that lives in your Cloudflare account, it is exactly the kind of project to inspect.

Architecture Overview

CloudflareBase is a dashboard Worker plus multiple backend agents.

Component What It Does Main Cloudflare Primitives
Dashboard / console SvelteKit UI, project registry, API proxy, setup and operator flows Workers, D1, service bindings, Rate Limiting
Auth agent Better Auth per project, users, sessions, roles, JWTs Durable Objects with SQLite, optional Email, optional Analytics Engine
Database agent JSON collections, typed tables, live queries, remote config, views Durable Objects with SQLite, WebSockets, optional Analytics Engine
Storage agent Buckets, access modes, signed URLs, object index R2 plus Durable Objects
Hosting agent Static sites and Workers under app subdomains Workers for Platforms, Durable Objects
CLI Init, add agents, deploy, service keys, schema generation npm package plus Wrangler

This is a very different shape from something like FeedLog or Seeder.

Project Main Shape Local/Homelab Path Cloudflare Path
FeedLog Feedback, roadmap, changelog Docker app + Postgres/pgvector Workers-compatible, but still needs Postgres
Seeder Project/client workspace Single Docker container + SQLite Workers + D1 + R2
CloudflareBase Backend platform/Firebase alternative Local dev only, no Docker deployment Native multi-Worker platform on your Cloudflare account

CloudflareBase is the most platform-like of the three. It is less “install this app” and more “deploy a backend-as-a-service into your Cloudflare account.”

What Each Primitive Provides

The README mentions many Cloudflare services, so it is worth separating required pieces from optional enhancements.

Cloudflare Primitive Why CloudflareBase Uses It Required?
Workers Runs the dashboard and every agent Yes
Durable Objects with SQLite Per-project/per-collection/per-table state and isolation Yes
D1 Control-plane project registry for the dashboard Yes for the console
Service bindings Private dashboard-to-agent calls Yes in the multi-worker install
R2 File bytes for storage buckets Needed for full storage
Rate Limiting binding API abuse control Configured in the dashboard Worker
Analytics Engine Auth/database/hosting charts Optional
Workers AI Copilot/chat surfaces Optional
send_email Verification and auth email Optional
Workers for Platforms User app hosting and functions Optional paid feature
Sentry Error reporting Optional

That “optional” wording matters.

The README states that storage needs R2, hosting needs Workers for Platforms, auth-event charts need Analytics Engine, and Google/GitHub sign-in, email, and Sentry are opt-in. Without those, the relevant feature degrades or returns setup guidance instead of taking the entire platform down.

Database Model: Powerful, But Not PostgreSQL

CloudflareBase’s database is clever, but you need to understand the constraints before comparing it with Supabase.

JSON documents are Firestore-like. You create collections, write documents, query them, and subscribe to live changes over WebSockets.

Typed tables are schema-first and can be queried through a Drizzle-style interface.

The architectural tradeoff is this:

one collection or table = one Durable Object with its own SQLite database

That gives strong isolation and scale-by-shard behavior, but it also means CloudflareBase is not a normal relational database cluster.

The README calls out important boundaries:

  • SQL is single-table by design;
  • filters, aggregates, subqueries, and CTEs are supported in that model;
  • cross-table joins happen through read-only views;
  • views replicate 2-5 member tables into one SQLite database;
  • views are eventually consistent, around a few seconds, and meant for reporting reads;
  • realtime subscriptions send snapshots and deltas over WebSockets.

For Firebase-like app data, this is a good fit.

For general OLTP with broad joins, arbitrary transactions, and a single relational schema, PostgreSQL is still the more natural model.

Hosted vs Self-Hosted

There are two ways to think about CloudflareBase.

The hosted path is the normal SaaS path: create an account, create a project, point your app at its project API, and use the console.

The self-hosted path deploys the stack into your Cloudflare account:

git clone https://github.com/cloudflarebase/cloudflarebase.git
cd cloudflarebase
npm install
npx wrangler login
npm run deploy:all
npx wrangler secret put CONSOLE_SETUP_TOKEN

CONSOLE_SETUP_TOKEN is the first thing I would not skip.

The setup token proves that you control the deployment before the first console owner is created. Without a claim gate, a fresh public Workers URL could be claimed by the first person who visits /login.

Local Development

The README documents a local demo mode:

npm install
npm run dev

The dev script starts several processes:

Process Port
Auth agent 8788
Database agent 8789
Hosting agent 8790
Storage agent 8791
Dashboard 5173

In local mode, the dashboard runs with demo behavior enabled. That is useful for development, but it is explicitly not how you should operate a private production deployment.

Field Note: My Local Trial

I did not complete the local run on this machine because the available runtime is too old.

The repository pins:

Node 22.18.0

This environment has:

Node 18.19.1
npm 9.2.0

Running install failed immediately with:

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! notsup Required: {"node":"^22.18.0 || >=24.11.0"}

So for readers: use Node 22.18.0 or a newer supported Node 24 release before trying npm install.

Comparison: CloudflareBase vs Rolling Your Own Workers Stack

You can absolutely build a Cloudflare app directly with Workers, D1, KV, R2, Durable Objects, Queues, and Cron.

CloudflareBase sits one level higher.

Approach Good For Tradeoff
Raw Workers + D1/KV/R2 One app with explicit architecture You build auth, realtime, dashboard, SDKs, admin flows
CloudflareBase Many app backends with reusable primitives You adopt its platform model and Durable Object boundaries
Firebase Mature managed backend Proprietary, Google-owned platform
Supabase PostgreSQL-first backend platform Less Cloudflare-native, more database/server stack oriented

My mental model:

Firebase = managed product backend on Google
Supabase = open Postgres backend platform
CloudflareBase = open backend platform built around Workers and Durable Objects

FAQ