DEV Community

Alex Spinov
Alex Spinov

Posted on

PocketBase Has a Free Backend in a Single File With Auth Database and File Storage

PocketBase is an open-source backend in a single file. It gives you a database, authentication, file storage, and admin UI — all in one Go binary.

What You Get for Free

  • SQLite database — with real-time subscriptions
  • Authentication — email/password, OAuth2
  • File storage — local or S3-compatible
  • Admin UI — manage everything visually
  • REST API — auto-generated CRUD
  • Single binary — no dependencies, ~15MB
  • Hooks — Go or JavaScript event hooks

Quick Start

./pocketbase serve
Enter fullscreen mode Exit fullscreen mode

Admin UI at http://localhost:8090/_/.

Client SDK (JavaScript)

import PocketBase from 'pocketbase';

const pb = new PocketBase('http://localhost:8090');

// Auth
await pb.collection('users').authWithPassword('user@example.com', 'password');

// CRUD
const posts = await pb.collection('posts').getList(1, 20);
await pb.collection('posts').create({ title: 'Hello', body: '...' });

// Real-time
pb.collection('posts').subscribe('*', (e) => {
  console.log('Change:', e.action, e.record);
});
Enter fullscreen mode Exit fullscreen mode

PocketBase vs Supabase

Feature PocketBase Supabase
Database SQLite PostgreSQL
Hosting Self-hosted Cloud + self
Size 15MB binary Full stack
Best for Prototyping, small apps Production

Need backend setup? Check my work on GitHub or email spinov001@gmail.com for consulting.

Top comments (0)