DEV Community

Great Sage
Great Sage

Posted on

PocketBase in one command: a Firebase-sized backend that's just a SQLite file

PocketBase in one command: a Firebase-sized backend that's just a SQLite file

If you've ever reached for Firebase or Supabase for a side project and immediately hit the "wait, why do I need three dashboards and a billing alert for a todo app" wall — PocketBase is worth ten minutes of your time.

It's a single Go binary. No separate database server, no message broker, nothing to wire together. It ships with:

  • SQLite as the datastore (yes, really — and for anything under a few hundred concurrent writers it's genuinely fine, Litestream-style backups aside)
  • Built-in auth (email/password, OAuth2 providers, API keys)
  • Realtime subscriptions over SSE
  • File storage with image thumbnailing baked in
  • An admin UI at /_/ for managing collections without touching SQL

The whole thing is one process. That's the pitch and also the honest limitation: it's not built for horizontal scaling or huge concurrent write volume. If you're building the next Discord, don't. If you're building an MVP, an internal tool, a mobile app backend, or literally 80% of "I just need auth + a database + file uploads" projects, it removes an entire category of infra decisions.

Deploying it

I maintain a Railway template for it — full disclosure, I get a kickback if you deploy through it: https://railway.com/deploy/pocketbase-regular-update?referralCode=Z1xivh&utm_medium=integration&utm_source=template&utm_campaign=devto

It's the stock ghcr.io/muchobien/pocketbase image with a volume mounted at /pb_data so your SQLite file and uploads survive a redeploy (the one thing people forget when they run this in a bare container — no volume means your whole database vanishes on every push), plus the admin password generated as a random secret instead of a default you have to remember to change.

If you'd rather not go through the template, it's the same image on any Docker host:

docker run -d \
  -v pb_data:/pb_data \
  -e PB_ADMIN_EMAIL=you@example.com \
  -e PB_ADMIN_PASSWORD=<something-real> \
  -p 8090:8090 \
  ghcr.io/muchobien/pocketbase:latest
Enter fullscreen mode Exit fullscreen mode

Either way, once it's up, the admin dashboard is at https://<your-domain>/_/ — define your collections there (or via the REST API), and every collection automatically gets a CRUD + realtime API for free.

Where it actually fits

  • Prototyping something that needs auth + a database + file uploads without spinning up three services
  • A self-hosted Firebase/Supabase alternative when you don't need Supabase's Postgres-specific features (RLS, extensions like pgvector)
  • Backend for a mobile app where you want realtime sync without hand-rolling websockets
  • Internal admin tools where the built-in dashboard is the whole UI you need

Where it doesn't: anything that needs multi-writer horizontal scaling, or a use case that genuinely needs Postgres under the hood. SQLite is the right tool until it very suddenly isn't — know your write volume before you commit.

Top comments (0)