Back to services

Trailbase

TrailBase is an open, single-executable backend positioned as a Firebase alternative. Built on Rust, Wasmtime and SQLite, it provides type-safe REST and realtime APIs, built-in authentication and an admin dashboard.

View alternatives to Trailbase
Suggest edit
Open source
Self-hostable
OSL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

TrailBase is an open, sub-millisecond-latency Firebase alternative delivered as a single executable. It is built on Rust, Axum, Wasmtime and SQLite, with experimental Postgres support at the moment. It brings the capabilities an application backend commonly needs into a single process, reducing the number of components you have to maintain in a deployment.

Key features

  • Type-safe APIs: RESTful CRUD APIs for tables and views, with type-safe bindings generated for multiple languages via JSON Schema.
  • Realtime subscriptions: Push-based subscriptions to data changes, useful for keeping multiple clients in sync. TanStack/db ships with a built-in TrailBase integration.
  • Built-in authentication: Comes with its own auth system and UI, supporting password login as well as social/OAuth login such as Google and Discord. Authentication combines short-lived stateless JWTs with long-lived stateful refresh tokens and uses asymmetric cryptography, so other backends can also verify a user's identity.
  • Access control: Authorization based on ACLs and SQL access rules, on top of which you can build mechanisms such as groups, permissions or content moderation.
  • WebAssembly runtime: Runs custom endpoints with Wasmtime, supporting multiple guest languages.
  • File storage: Provides a file storage API.
  • Admin dashboard: A built-in, optional admin UI for configuring an instance and browsing data visually. You can also manage everything entirely through configuration files and migration scripts, which suits integration tests or managing many deployments in bulk.
  • Other capabilities: The website also lists multi-DB support, geospatial support and SSR.
  • Client support: Official clients or examples are provided for TypeScript, Dart/Flutter, Python, C#/.NET, Rust, Swift, Kotlin, Go and more.

Target users and use cases

Well suited to solo developers and small teams who want to self-host a backend without running several separate services. It can be used for mobile, web and desktop apps, as well as projects that need a consistent deployment across development, testing, staging and production (including edge environments).

Core strengths

  • Performance: The official benchmarks claim its APIs are about 14 times faster than PocketBase and nearly 48 times faster than Supabase, with memory usage around 1/50 that of Supabase. The project says this is enough for a small server to handle tens of thousands of concurrent users. These figures come from the project's own benchmarks.
  • Simple architecture: A single executable with a thin, standardized abstraction underneath. You can adopt it as a whole or use only parts of it, which helps avoid vendor lock-in.
  • Low latency: The project says sub-millisecond latency removes the need for a dedicated cache, avoiding stale or inconsistent data.

Installation and deployment

On Linux/macOS you can run the install script provided on the website:

curl -sSL https://trailbase.io/install.sh | bash

Windows installation is also supported, as is running it from a Docker image (trailbase/trailbase). See the official documentation for detailed steps.

Other notes

  • The license is Open Software License 3.0 (OSL-3.0).
  • The website offers a live demo (demo.trailbase.io), along with documentation, a blog and a Discord community.