Skip to content

Cloudflarebase

Open-source Firebase alternative with auth, a realtime database, file storage and remote config on Cloudflare

Cloudflarebase console overview of a demo project, with Auth and Database agents and the Workers AI copilot panel

Every Cloudflarebase project gets its own Durable Objects, so its data is kept apart from other projects. A SvelteKit console manages the projects. The backend services, which the project calls agents, also ship as npm packages that can be added to an existing Worker.

Auth is Better Auth per project, with email and password, social sign-in, roles and project-signed JWTs. The database has schemaless JSON collections and typed SQL tables, live queries on both over one WebSocket per client, regional read replicas, export and import, and 30-day rollback. Each table is its own Durable Object with up to 10 GB, and SQL on a table supports filters, aggregates, subqueries and CTEs. Remote Config serves feature flags and tuning values targeted by country, role, version or rollout percentage. Storage buckets on R2 support public, authenticated and owner-only access, signed URLs and multipart uploads. Server code such as crons and webhooks uses each agent's admin client with a project-scoped service key. Every project also serves an OpenAPI document. A self-hosted install is five Workers: auth, db, storage and hosting agents plus the console. The console uses D1 for its project registry, Workers AI for a project copilot and service bindings to reach the agents. The agents run on SQLite-backed Durable Objects. The db agent writes event metrics to Analytics Engine, and the auth agent sends mail through a send_email binding. The cloudflarebase CLI scaffolds a Worker with auth and adds the db and storage agents to it, merging their wrangler config without overwriting existing settings. A hosted version of the same code runs at cloudflarebase.com.

Built for: Developers and small product teams building on Cloudflare who want a Firebase-style backend that runs in their own account.

An alternative to: Appwrite Cloud, Back4App, Convex, Firebase, Supabase

What you can use it for

  • Give a web or mobile app sign-in, data storage and file uploads
  • Build realtime lists and dashboards on live queries
  • Roll out feature flags in stages without shipping a release
  • Keep each tenant's data in separate Durable Objects
  • Add auth or a document database to an existing Worker

Deploy

  • CLI · main path

    Branch main

    deploy:all publishes the auth, db, storage and hosting agents and then the console Worker. After setting CONSOLE_SETUP_TOKEN, claim the console at /login.

    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
  • One-click

    Branch main

    The README has one Deploy to Cloudflare button per Worker. Use them in the deploy:all order: auth, db, storage, hosting and finally the console, which the README labels dashboard. Then set CONSOLE_SETUP_TOKEN on the console Worker.

From a clone, npm run deploy:all publishes all five Workers; you then set CONSOLE_SETUP_TOKEN (24 or more characters) and claim the console at /login. Storage, hosting, social sign-in and email each need extra setup.

What it needs to run

  • Workers AIAI
  • Analytics Enginecloudflarebase_auth_events, cloudflarebase_db_events, cloudflarebase_hosting_requests_local
  • D1 databasescloudflarebase-control-plane, cloudflarebase-hosting-analytics-local
  • Durable ObjectsAuthAgent, DbAgent, DbCollection, DbGateway, DbTable, DbView, HostingAgent, StorageAgent, StorageBucket
  • KV namespacesKV
  • R2 bucketscfbase-storage-local
  • Email sendingEMAIL

Also uses

  • GitHub OAuth (optional): Social sign-in with GitHubSource
  • Google OAuth (optional): Social sign-in with GoogleSource
  • Sentry (optional): Error reportingSource

Good to know

Storage only works after you create an R2 bucket and add the BUCKET binding to the storage agent's config. SQL tables do not support DDL or cross-table joins; joins across two to five tables run only in read-only views, which are eventually consistent (about 3 seconds). Auth-event charts need Analytics Engine enabled and two lines added to the auth agent config. Cloudflarebase is an independent project, not affiliated with Cloudflare.

Cost on Cloudflare

Depends on usage

Auth, database and the console use D1, SQLite-backed Durable Objects, Workers AI and Analytics Engine, which all have Workers Free allowances. File storage needs R2 enabled on the account. Website hosting is the one feature that needs a paid product, Workers for Platforms.

Source

The estimate is based on Cloudflare’s documented limits and the app’s configuration. What you pay depends on your usage and plan.

Where this comes from

Listing history

  • Oct 2, 2026 · Cloudflarebase listed