Self-hosting TrailBase the easy way

Self-hosting TrailBase the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
5 min

TrailBase is an open-source, sub-millisecond Firebase alternative built on Rust, SQLite, and Wasmtime. It gives you type-safe REST and realtime APIs, built-in authentication, file storage, and an admin dashboard - all packed into a single executable. If you're looking for a fast, lightweight backend without vendor lock-in, TrailBase is a solid choice.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get TrailBase up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy TrailBase >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's TrailBase preset. Here's what it includes:

  • Official trailbase/trailbase Docker image (version 0.27.5)
  • Persistent storage mounted to /app/traildepot for your database and files
  • Port 4000 exposed for the web interface and API
  • Ready to use out of the box with sensible defaults

Next steps

Once TrailBase is running on Sliplane, access it using the domain Sliplane provided (e.g. trailbase-xxxx.sliplane.app).

Default credentials

On first startup, TrailBase creates an admin account with a randomly generated password. Check your service logs on Sliplane to find it - look for a line like:

Created new admin user:
    email: 'admin@localhost'
    password: '<random-password>'

Copy the password from the logs and use it to log in. You can change it later through the admin dashboard.

Admin dashboard

The admin dashboard is available at /_/admin/ on your TrailBase instance (e.g. https://trailbase-xxxx.sliplane.app/_/admin/). From there you can:

  • Manage tables and schemas
  • Configure authentication (password and OAuth providers)
  • Set up access control rules
  • Explore and edit your data
  • Manage file storage

Key features

TrailBase comes with a lot built in:

  • Type-safe REST APIs auto-generated from your SQLite schema
  • Realtime subscriptions for live data updates
  • Authentication with password login and social/OAuth providers
  • File storage with configurable access control
  • Custom endpoints compiled to native code via Wasmtime (WebAssembly)
  • Client libraries for TypeScript, Dart/Flutter, Swift, Kotlin, Python, C#/.NET, Rust, and Go

Data storage

All TrailBase data lives in /app/traildepot, which the preset mounts to a persistent volume. This includes your SQLite database, uploaded files, and configuration. Your data survives container restarts and redeployments.

Logging

TrailBase logs go to STDOUT by default, which works well with Sliplane's built-in log viewer. For general Docker log tips, check out our post on how to use Docker logs.

Cost comparison

You can also self-host TrailBase with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What can I build with TrailBase?

TrailBase is ideal for mobile and web app backends, SaaS prototypes, and internal tools. It gives you a full backend with APIs, auth, and file storage out of the box, so you can focus on your frontend. Think of it as a self-hosted Firebase that runs on SQLite instead of a proprietary cloud.

How do I configure authentication providers?

Open the admin dashboard and navigate to the authentication settings. TrailBase supports password-based login out of the box. To add social login (Google, GitHub, etc.), configure the OAuth provider credentials in the admin UI. Check the TrailBase documentation for provider-specific setup details.

How do I update TrailBase?

Change the image tag in your service settings on Sliplane and redeploy. Check Docker Hub for the latest stable version.

Are there alternatives to TrailBase?

Yes, popular backend-as-a-service alternatives include Directus (headless CMS with auto-generated APIs), Strapi (open-source headless CMS), PocketBase (another single-binary backend), and Supabase (open-source Firebase alternative with PostgreSQL).

How fast is TrailBase compared to other backends?

TrailBase claims sub-millisecond response times for API requests, making it significantly faster than alternatives like PocketBase and Supabase. This is thanks to its Rust core, SQLite for storage, and Wasmtime for compiling custom endpoints to native code. For most use cases, you won't need a dedicated caching layer.

Self-host TrailBase now - It's easy!

Sliplane gives you everything you need to run TrailBase without server hassle.