DEV Community

Alex Spinov
Alex Spinov

Posted on

PocketBase Has a Free Backend in a Single File

PocketBase is a free, open-source backend that runs as a single binary. Download one file, run it, and you have a complete backend.

What Is PocketBase?

PocketBase gives you a database, authentication, file storage, and admin dashboard in a single 15MB binary.

Key features:

  • Embedded SQLite database
  • Built-in authentication (email, OAuth2)
  • File storage with thumbnails
  • Real-time subscriptions
  • Admin dashboard
  • REST API auto-generated
  • Single binary (15MB)
  • Zero dependencies

Quick Start

wget https://github.com/pocketbase/pocketbase/releases/latest/download/pocketbase_0.23_linux_amd64.zip
unzip pocketbase_0.23_linux_amd64.zip
./pocketbase serve
Enter fullscreen mode Exit fullscreen mode

Admin: localhost:8090/_/ | API: localhost:8090/api/

JavaScript SDK

import PocketBase from "pocketbase";
const pb = new PocketBase("http://localhost:8090");

await pb.collection("users").authWithPassword("user@email.com", "pass");

const posts = await pb.collection("posts").getList(1, 20, {
  filter: "status = published",
  sort: "-created",
  expand: "author"
});

pb.collection("posts").subscribe("*", (e) => {
  console.log(e.action, e.record);
});
Enter fullscreen mode Exit fullscreen mode

PocketBase vs Alternatives

Feature Supabase Firebase PocketBase
Setup Docker/Cloud Cloud Single file
Auth Yes Yes Yes
Storage Yes Yes Yes
Real-time Yes Yes Yes
Self-host Complex No One binary
Size ~2GB N/A 15MB

With 42K+ GitHub stars. Complete backend in 2 minutes.


Need external data? Check out my web scraping tools on Apify — extract data from any website. Custom solutions: spinov001@gmail.com

Top comments (0)