Building backends for modern web and mobile apps often involves setting up multiple infrastructure layers: a database server (such as PostgreSQL or MySQL), an API runtime (like Node.js or Python), an authentication provider (such as Firebase or Auth0), file storage (such as AWS S3), and a real-time messaging server. Managing all of these dependencies can introduce significant configuration overhead.
For MVPs, internal tools, and small-to-medium business apps, this complexity can be overkill. That is why developers are turning to PocketBase—an open-source Go backend solution that compiles down to a single binary file. Inside this single file, PocketBase embeds a high-performance database, real-time listeners, OAuth user registration, and an admin console.
Many developers are skeptical when they learn PocketBase is powered by SQLite. Traditionally, SQLite was viewed as a toy database suited only for local development. However, modern SQLite is an exceptionally fast, production-ready storage engine when configured correctly.
PocketBase optimizes SQLite by running it in **Write-Ahead Logging (WAL)** mode. In WAL mode, writers append changes to a separate log file, allowing read operations to execute concurrently without blocking. Because SQLite is embedded directly inside the compiled Go process, queries run in-memory, avoiding the TCP network latency of connecting to external database servers like PostgreSQL.
PocketBase provides clean SDK libraries for JavaScript (Web, React, Svelte, React Native) and Dart (Flutter). Here is how you can fetch database records and listen to real-time additions:
import PocketBase from 'pocketbase';
const pb = new PocketBase('https://your-pocketbase-url.com');
// 1. Authenticate a user with email/password
const authData = await pb.collection('users').authWithPassword('user@example.com', 'password123');
// 2. Fetch a paginated list of posts
const records = await pb.collection('posts').getList(1, 20, {
filter: 'status = "published"',
sort: '-created'
});
// 3. Listen to real-time SSE streams for any collection changes
pb.collection('posts').subscribe('*', function (e) {
console.log('Action type:', e.action); // 'create', 'update', or 'delete'
console.log('Record content:', e.record);
});
No. PocketBase is designed specifically around SQLite. Its code structure, real-time handlers, schema relations, and backup utilities are tightly integrated with SQLite, and there are no plans to add multi-database support. If you require client-server SQL database engines, Supabase is a strong alternative.
A standard $5/month VPS running PocketBase can easily handle 10,000+ concurrent users and process millions of database requests daily. Because SQLite operates directly on disk/memory within the Go binary, it is extremely efficient. The bottleneck is typically RAM or disk I/O, not database queries.
PocketBase cannot be horizontally scaled (sharded) across multiple app servers. Because SQLite is embedded, it requires direct access to a single local file. To scale PocketBase, you vertically scale the server (adding CPU, RAM, and fast NVMe storage) or leverage S3 integrations to store media files externally, keeping SQLite file sizes small.
Yes! PocketBase can be extended in two ways:
pb_hooks directory to intercept requests, run cron jobs, or fetch external APIs.Instead of resource-heavy WebSockets, PocketBase uses **Server-Sent Events (SSE)**. SSE is a lightweight, unidirectional HTTP protocol that allows servers to stream real-time updates to connected clients over a single persistent TCP connection. Clients subscribe to record edits via the SDK, and Go processes push changes instantly.
PocketBase supports backups natively via the admin UI or the API, saving ZIP snapshots of your database and local files. Alternatively, since SQLite stores all state in a single directory, you can back up PocketBase simply by copying the pb_data/ folder when the application is stopped.
PocketBase supports standard email/password authentication (including verification and password reset workflows) and OAuth2 providers (Google, GitHub, GitLab, Discord, Facebook, Apple, etc.), making it easy to implement secure single-sign-on (SSO).
VitableTech helps software teams design, develop, containerize, and deploy high-performance PocketBase setups, Go frameworks, and real-time frontend apps.
Discuss Your Project