TrailBase
An open-source, single-executable Firebase alternative with sub-millisecond REST and realtime APIs, built-in auth, a WebAssembly runtime, and an admin UI.
Open source alternative to:



TrailBase is an open-source backend-as-a-service built on Rust, SQLite, and Wasmtime. It ships as a single executable that provides type-safe REST and realtime APIs, authentication, file uploads, geospatial support, an admin UI, and a WebAssembly runtime for custom server-side logic. Sub-millisecond latencies aim to remove the need for dedicated caches.
Self-hosting is a first-class story: download a pre-built binary for Linux, macOS, or Windows, or run the official Docker image, and a local trailbase depot is bootstrapped on first start. Client libraries cover JavaScript/TypeScript, Dart/Flutter, Rust, C#/.NET, Swift, Kotlin, Go, and Python. SQLite is the default database, with experimental PostgreSQL support.
Compared to Firebase, TrailBase gives you full control and portability of your data and infrastructure. Its copyleft OSL-3.0 license covers only modifications to TrailBase itself, so your own application code is not affected. The project is funded through the EU's NGI Zero Core program.
Categories:
Build with:
Frequently Asked Questions
Which platforms does TrailBase run on?
TrailBase ships as a single executable for Linux, macOS, and Windows, plus a Docker image, so it can run anywhere. Official client libraries are available for JavaScript/TypeScript, Dart/Flutter, Rust, C#/.NET, Swift, Kotlin, Go, and Python.
What authentication options does TrailBase support?
TrailBase includes email/username plus password sign-in, OAuth2 via external providers such as Google and Microsoft, email one-time passwords, anonymous authentication, and TOTP-based two-factor authentication. Built-in login and profile pages are served under /_/auth/.
Does TrailBase have an API, realtime subscriptions, or a CLI?
Yes. TrailBase exposes type-safe REST APIs, server-sent event realtime subscriptions, and a CLI called trail for running and managing instances. Custom server-side logic can run in the built-in WebAssembly runtime.
Can I import existing data into TrailBase?
Yes. Because TrailBase stores data in standard SQLite, you can import and export data with regular SQLite tooling, for example piping an SQL script into the main.db file.
Can I extend or customize TrailBase?
Yes. You can write custom server-side logic in the WebAssembly runtime and add components from the TrailBase registry, such as the auth_ui component that mounts authentication pages. Code contributions to the project are also welcome.
Repository details
Updated 8/7/2026, 5:00:26 AM
View Repository
TrailBase vs Supabase