DEV Community

Carlos Oliva Pascual
Carlos Oliva Pascual

Posted on Originally published at stacknotice.com

PocketBase vs Supabase (2026): When the Single Binary Beats the Full Platform

Both give you a database, auth, file storage, and real-time without building each piece manually. They are not interchangeable.

PocketBase is a single Go binary — download it, run it, full backend in under 2 minutes on a $6 VPS. SQLite, built-in admin UI, no Docker required. Supabase is a full platform built on PostgreSQL — scales to millions, Row-Level Security, JSONB, full-text search. The complexity is real, and so are the capabilities.

Setup Comparison

PocketBase: One Binary

wget https://github.com/pocketbase/pocketbase/releases/download/v0.22.0/pocketbase_0.22.0_linux_amd64.zip
unzip pocketbase_0.22.0_linux_amd64.zip
./pocketbase serve
# Admin UI: http://localhost:8090/_/
# API: http://localhost:8090/api/
Enter fullscreen mode Exit fullscreen mode

For production — a systemd service and you're done. Backups are cp on the SQLite file.

Supabase: Docker or Hosted

# Hosted — point SDK to your project URL
npm install @supabase/supabase-js

# Self-hosted — 8+ Docker containers, needs 4GB RAM minimum
git clone https://github.com/supabase/supabase
cd supabase/docker && cp .env.example .env
docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Auth

Both include email/password, OAuth2 (Google, GitHub, Discord), and magic links.

// PocketBase
const pb = new PocketBase('http://localhost:8090')
const auth = await pb.collection('users').authWithPassword('user@example.com', 'password')
// Token stored in pb.authStore, auto-refreshed

// Supabase
const { data } = await supabase.auth.signInWithPassword({ email, password })
// Supabase adds Row-Level Security — policies enforced at DB level
Enter fullscreen mode Exit fullscreen mode

Supabase's RLS is the key differentiator: access rules live in the database, not application code. Even a buggy query can't return data the user isn't allowed to see.

Real-Time

// PocketBase — SSE, any record change
pb.collection('posts').subscribe('*', (e) => {
  // e.action: 'create' | 'update' | 'delete'
  // e.record: the changed record
})

// Supabase — PostgreSQL logical replication, with filters + presence
supabase.channel('posts')
  .on('postgres_changes', {
    event: '*', schema: 'public', table: 'posts',
    filter: 'published_at=not.is.null'
  }, (payload) => console.log(payload))
  .subscribe()

// Supabase Presence — who's online
channel.on('presence', { event: 'sync' }, () => {
  const online = channel.presenceState()
})
Enter fullscreen mode Exit fullscreen mode

Supabase's real-time is more capable for collaborative apps. PocketBase's SSE is simpler and sufficient for notifications/dashboards.

Data Modeling

// PocketBase — SQLite, relations work, but no JSONB/full-text/arrays
// Schema built in admin UI or Go code

// Supabase — full PostgreSQL
CREATE TABLE posts (
  id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
  tags TEXT[] DEFAULT '{}',           -- native arrays
  metadata JSONB DEFAULT '{}',         -- JSONB operators
  search_vector TSVECTOR              -- full-text search
);

-- RLS policy  users only see their own posts
CREATE POLICY "own posts" ON posts FOR ALL
  USING (auth.uid() = author_id);
Enter fullscreen mode Exit fullscreen mode

Scale and Cost

Factor PocketBase Supabase
Database SQLite PostgreSQL
Practical scale ~50k active users Millions
Self-hosted cost ~$6-10/month VPS ~$20-50/month (4GB RAM)
Managed No official hosting Free → $25/month Pro
Horizontal scaling Single node Multiple replicas

SQLite writes are serialized — high write concurrency degrades. For read-heavy apps (blog, docs, internal tool), this rarely matters. For apps with thousands of concurrent writers, PostgreSQL is necessary.

Decision Framework

Choose PocketBase if:

  • Side project, internal tool, or prototype
  • You want full ownership, no cloud dependency
  • Budget is a constraint — $6 VPS covers a lot
  • Your data model fits SQLite (no complex JSON queries, no full-text at scale)

Choose Supabase if:

  • Building for production scale from the start
  • Row-Level Security matters as a security layer
  • Your queries need PostgreSQL features: JSONB, full-text, geo (PostGIS), embeddings (pg_vector)
  • You want a managed database without server maintenance

PocketBase is genuinely impressive for its scope. A solo developer can ship a complete product in days on it. But it's a tool for a specific scale range — once you need horizontal scaling, complex SQL, or RLS as a security primitive, PostgreSQL is the right foundation.


Full article at stacknotice.com/blog/pocketbase-vs-supabase-2026

Top comments (0)