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.

Frostbase logo

Self-host Frostbase

Open-source Firebase alternative on Cloudflare Workers

ReleaseOpen SourceApache-2.0
Updated2 weeks ago
LanguageTypescript
Setup difficultyModerate
ThemeDark mode
Stars
241
Requires
Cloudflare Workers
Install with Cloudflare Workers

What is Frostbase?

Frostbase is an open-source backend platform that brings Firebase-like primitives to Cloudflare's global network. Each project gets isolated Durable Objects with embedded SQLite for strong tenant separation. You deploy it to your own Cloudflare account using Wrangler — no origin servers to manage. The stack has four agents (auth, database, storage, dashboard) deployable together or individually. Auth uses Better Auth per project with email/password and social providers. The database provides schemaless JSON collections and typed SQL tables with live queries, regional read replicas, and 30-day rollback. Storage uses Cloudflare R2 buckets with per-bucket access modes. Remote config offers feature flags you can flip without deploying. The self-hosted version runs on Cloudflare's free tier; optional R2 and Analytics Engine add capabilities. Licensed Apache-2.0.

Should you self-host Frostbase?

Frostbase scores 47/100 on selfhost.directory (how scoring works) and ranks #14 of 15 in Backend as a Service. It has 241 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is Apache-2.0-licensed and written mostly in Typescript.

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

Features

  • AI Copilot
  • Authentication
  • Branching
  • Object StorageRequires R2 subscription
  • OpenAPI
  • Point-in-time restore
  • Read Replicas
  • Realtime database
  • Realtime Sync
  • Remote Config
  • Self-hosted on Cloudflare
  • Service Keys
  • Typed SQL Tables
  • Zero Egress Fees

Frostbase README

How to install Frostbase

Install Frostbase with Cloudflare Workers

Environment variables
CONSOLE_SETUP_TOKEN, BUCKET, TRUSTED_ORIGINS, BETTER_AUTH_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, CF_ACCOUNT_ID, CF_ANALYTICS_API_TOKEN, SENTRY_DSN, SENTRY_ENV, CHAT_MODEL, EXPOSE_OPERATOR_API
git clone https://github.com/frostbase-dev/frostbase.git
cd frostbase && npm install
npm run dev          # localhost:5173/dashboard — no secrets, demo mode on

Deploy the whole stack to your account:

npx wrangler login
npm run deploy:all                             # one Worker per agent + the dashboard
npx wrangler secret put CONSOLE_SETUP_TOKEN    # 24+ chars — then claim the console at /login

Requires Node 20+ and a Cloudflare account (free tier sufficient)

How to configure Frostbase

  • AUTH_AGENTService binding to auth-agent for JWT verification

    Service binding to auth-agent for JWT verification

  • BETTER_AUTH_SECRETOptional: shared signing key for all projects; when unset each project generates its own

    Optional: shared signing key for all projects; when unset each project generates its own

  • BUCKETR2 bucket binding for storage agent

    R2 bucket binding for storage agent

  • CF_ACCOUNT_IDOptional: Cloudflare account ID for Analytics Engine SQL reads

    Optional: Cloudflare account ID for Analytics Engine SQL reads

  • CF_ANALYTICS_API_TOKENOptional: Cloudflare Analytics Engine API token

    Optional: Cloudflare Analytics Engine API token

  • CHAT_MODEL@cf/meta/llama-3.3-70b-instruct-fp8-fastWorkers AI model for AI copilot

    Workers AI model for AI copilot

  • CONSOLE_SETUP_TOKENSetup token (24+ chars) to claim the console at /login on first deploy

    Setup token (24+ chars) to claim the console at /login on first deploy

  • EXPOSE_OPERATOR_APItrueExpose operator plane routes (/overview, /admin/*, etc.) over HTTP

    Expose operator plane routes (/overview, /admin/*, etc.) over HTTP

  • GOOGLE_CLIENT_IDOptional: Google OAuth client ID for social sign-in

    Optional: Google OAuth client ID for social sign-in

  • GOOGLE_CLIENT_SECRETOptional: Google OAuth client secret for social sign-in

    Optional: Google OAuth client secret for social sign-in

  • SENTRY_DSNOptional: Sentry DSN for error reporting

    Optional: Sentry DSN for error reporting

  • SENTRY_ENVproductionSentry environment name

    Sentry environment name

  • TRUSTED_ORIGINSCSRF/CORS allowlist for extra origins (comma-separated, no trailing slash)

    CSRF/CORS allowlist for extra origins (comma-separated, no trailing slash)

FAQ

How is the Auth primitive actually built?

It runs as a Cloudflare Agent on top of Better Auth. Each project maps to one Durable Object with embedded SQLite, giving identities and sessions a strongly consistent home while Workers provide global ingress. Drizzle handles the schema and migrations.

More in Backend as a Service

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…