Currently viewing the AI version
Switch to human version

PocketBase: AI-Optimized Technical Reference

Core Technology Overview

What It Is: Single Go binary (15MB) bundling SQLite + authentication + file storage + admin UI

  • Current Version: v0.29.3 (late 2024)
  • Status: Pre-1.0 software - expect breaking changes between versions
  • Architecture: SQLite with WAL mode for concurrent reads

Critical Scaling Limits

User Capacity Thresholds

  • 0-1,000 users: No performance issues
  • 1,000-10,000 users: Monitor write bottlenecks, expect some slowdown
  • 10,000+ users: SQLite becomes limiting factor, migrate to PostgreSQL

Technical Bottlenecks

  • Concurrent users: 50-100 before write bottlenecks
  • File uploads: Degrades with 100+ concurrent uploads
  • Query performance: Complex joins slow at 50k+ records
  • Backup operations: 30-second database locks during backup

Configuration That Actually Works

Production Settings

# Port configuration to avoid conflicts
./pocketbase serve --http=127.0.0.1:8091

File Upload Limits

  • Default: 5MB (will cause user complaints)
  • Action Required: Increase limit in settings
  • Production: Configure S3 storage early - local storage fills up fast
  • Critical Failure: Server ran out of space at 2AM, 6-hour outage for profile uploads

CORS Configuration

  • Common Issue: 30 minutes debugging localhost CORS failures
  • Solution: Add domain to allowed origins in settings before development

Installation Failure Modes

Permission Issues

  • Linux/Mac: Requires chmod +x pocketbase
  • Windows: Antivirus may quarantine as malware
  • First Run: Opens browser for admin setup (use --dev flag for headless servers)

Directory Structure

  • pb_data: SQLite database + uploaded files (CRITICAL TO BACKUP)
  • pb_migrations: Schema change scripts (commit to version control)

Migration and Schema Pain Points

Breaking Changes

  • March 2024: Collection validation system changed
  • August 2024: Auth system updated
  • Action Required: Read changelog before any upgrade

Schema Design Gotchas

  • Many-to-many relations: UI becomes confusing beyond 3 levels
  • File fields: Set MIME type validation or users upload random files
  • Access rules: JavaScript-like syntax difficult to debug

Resource Requirements

Time Investment

  • Initial setup: 10 minutes (vs 2 hours Firebase, 4 hours Supabase)
  • First-time OAuth setup: 2 hours reading Google's OAuth documentation
  • Schema migration debugging: Plan for substantial time investment

Expertise Requirements

  • Self-hosting reality: You become the DBA - 3AM outages are your problem
  • Monitoring: Essential from day one (servers go down for hours without monitoring)
  • Backup strategy: Must stop server before copying files to avoid corruption

Cost Structure

  • Development: Free (single binary)
  • Self-hosting: $10 DigitalOcean droplet + monitoring + backup costs
  • Hidden costs: Human time for maintenance, security updates, troubleshooting

Critical Warnings

Data Integrity Risks

  • Backup corruption: Never copy pb_data while server is running
  • Migration failures: Schema changes can break between versions
  • Single point of failure: No built-in high availability

Production Readiness Issues

  • Pre-1.0 software: Not recommended for mission-critical applications
  • Limited scaling: SQLite write bottleneck is fundamental limitation
  • No true HA: Multiple instances don't sync with each other

Decision Criteria

Use PocketBase When

  • Prototype or side project development
  • Client work under 10k users
  • Full data control required
  • Rapid MVP development (10 minutes to deployment)
  • Simple to moderate complexity requirements

Don't Use PocketBase When

  • Need to scale beyond SQLite limits
  • Mission-critical applications required
  • Complex analytics workloads
  • High availability requirements
  • Team lacks sysadmin expertise

SDK and Integration Reality

JavaScript SDK

  • Quality: Solid with good TypeScript support
  • Common Issue: CORS configuration required for localhost development

Alternative SDKs

  • Dart SDK: Functional but thin documentation
  • Python SDK: Community-maintained, decent quality
  • Risk: Community SDKs often abandoned

Competitive Comparison

Criteria PocketBase Firebase Supabase
Setup Time 10 minutes 2 hours 4 hours
Scale Limit ~10k users Millions Hundreds of thousands
Cost Reality Server costs only Expensive at scale Reasonable until scale
Complexity Single binary SDK complexity Docker/Kubernetes required
Vendor Lock-in Zero Complete Possible to escape
Operational Burden Full self-management Google managed Partial management

Operational Intelligence

Common Failure Scenarios

  • Port conflicts on first run - Use custom port configuration
  • CORS blocking localhost development - Configure allowed origins
  • File storage filling server disk - Migrate to S3 before production
  • Database corruption during backup - Stop server before file copying
  • Performance degradation at user thresholds - Monitor write patterns

Success Patterns

  • Monitoring from day one - Prevents hours-long outages
  • S3 configuration early - Avoids storage emergencies
  • Read changelog religiously - Prevents breaking change surprises
  • Test access rules in incognito - Catches permission issues

Real-World Performance

  • 3 production deployments: Booking app, small CRM, prototype-turned-production
  • Stress testing: 80-90 concurrent users before write bottlenecks
  • File upload degradation: Noticeable at 100+ concurrent uploads
  • Complex query slowdown: Begins around 50k records

This reference provides actionable implementation guidance while preserving critical operational context for AI decision-making systems.

Useful Links for Further Investigation

Actually Useful Links (Unlike Most PocketBase Content)

LinkDescription
Official DocsThe official documentation for PocketBase, surprisingly well-written for an open-source project. This is the essential starting point for new users.
API ReferenceThis comprehensive API reference will become a frequently bookmarked page, offering practical examples that are proven to work.
GitHub ReleasesDownload binaries here. Don't compile from source unless you enjoy pain.
ChangelogIt is crucial to read this changelog before attempting any upgrades to avoid potential breaking changes or issues.
JavaScript SDKThe official JavaScript SDK for PocketBase, known for its solid performance and excellent TypeScript support.
Dart SDKWorks but docs are thin. You'll be reading source code.
Python SDKA community-made Python SDK offering decent quality, providing a much better alternative than rolling your own implementation.
DiscordMost responsive place for help. Devs actually answer questions.
GitHub IssuesUse this platform for reporting bugs and submitting feature requests. Always search existing issues before creating a new one.
Reddit r/pocketbase communityGood for "how did you solve X" type questions. Search for "pocketbase" on Reddit.
Stack OverflowWhile answers can be hit or miss, Stack Overflow does contain some quality solutions for specific PocketBase questions.
PocketHostManaged hosting, works fine for prototypes. Costs $5 per month.
Fly.ioGood self-host option. Provides community discussions on best practices for hosting PocketBase.
RailwayOffers one-click deployment for PocketBase. Easy to use but comes with a cost for the convenience.
Go Framework GuideProvides guidance for when you need custom functionality. Be warned, you're essentially forking the project.
TypeScript TypesOffers auto-generated TypeScript types. Install this package if you are using TypeScript in your project.
Backup SolutionsEssential information on backup and restore solutions. Avoid learning about backups the hard way.
LogRocket ArticleA solid walkthrough on using PocketBase to build a full-stack application, providing practical insights.

Related Tools & Recommendations

integration
Recommended

Supabase + Next.js + Stripe: How to Actually Make This Work

The least broken way to handle auth and payments (until it isn't)

Supabase
/integration/supabase-nextjs-stripe-authentication/customer-auth-payment-flow
100%
integration
Recommended

GitOps Integration Hell: Docker + Kubernetes + ArgoCD + Prometheus

How to Wire Together the Modern DevOps Stack Without Losing Your Sanity

docker
/integration/docker-kubernetes-argocd-prometheus/gitops-workflow-integration
80%
alternatives
Recommended

Firebase Alternatives That Don't Suck - Real Options for 2025

Your Firebase bills are killing your budget. Here are the alternatives that actually work.

Firebase
/alternatives/firebase/best-firebase-alternatives
60%
alternatives
Recommended

Firebase Alternatives That Don't Suck (September 2025)

Stop burning money and getting locked into Google's ecosystem - here's what actually works after I've migrated a bunch of production apps over the past couple y

Firebase
/alternatives/firebase/decision-framework
60%
tool
Recommended

Firebase - Google's Backend Service for When You Don't Want to Deal with Servers

Skip the infrastructure headaches - Firebase handles your database, auth, and hosting so you can actually build features instead of babysitting servers

Firebase
/tool/firebase/overview
60%
tool
Recommended

Supabase - PostgreSQL with Bells and Whistles

competes with Supabase

Supabase
/tool/supabase/overview
60%
tool
Recommended

Supabase Auth: PostgreSQL-Based Authentication

competes with Supabase Auth

Supabase Auth
/tool/supabase-auth/authentication-guide
60%
pricing
Recommended

Should You Use TypeScript? Here's What It Actually Costs

TypeScript devs cost 30% more, builds take forever, and your junior devs will hate you for 3 months. But here's exactly when the math works in your favor.

TypeScript
/pricing/typescript-vs-javascript-development-costs/development-cost-analysis
59%
compare
Recommended

Python vs JavaScript vs Go vs Rust - Production Reality Check

What Actually Happens When You Ship Code With These Languages

javascript
/compare/python-javascript-go-rust/production-reality-check
59%
news
Recommended

JavaScript Gets Built-In Iterator Operators in ECMAScript 2025

Finally: Built-in functional programming that should have existed in 2015

OpenAI/ChatGPT
/news/2025-09-06/javascript-iterator-operators-ecmascript
59%
tool
Recommended

Appwrite - Open-Source Backend for Developers Who Hate Reinventing Auth

competes with Appwrite

Appwrite
/tool/appwrite/overview
54%
compare
Recommended

Supabase vs Firebase vs Appwrite vs PocketBase - Which Backend Won't Fuck You Over

I've Debugged All Four at 3am - Here's What You Need to Know

Supabase
/compare/supabase/firebase/appwrite/pocketbase/backend-service-comparison
54%
alternatives
Recommended

Fast React Alternatives That Don't Suck

compatible with React

React
/alternatives/react/performance-critical-alternatives
54%
integration
Recommended

Stripe Terminal React Native Production Integration Guide

Don't Let Beta Software Ruin Your Weekend: A Reality Check for Card Reader Integration

Stripe Terminal
/integration/stripe-terminal-react-native/production-deployment-guide
54%
howto
Recommended

Converting Angular to React: What Actually Happens When You Migrate

Based on 3 failed attempts and 1 that worked

Angular
/howto/convert-angular-app-react/complete-migration-guide
54%
tool
Recommended

SvelteKit Authentication Troubleshooting - Fix Session Persistence, Race Conditions, and Production Failures

Debug auth that works locally but breaks in production, plus the shit nobody tells you about cookies and SSR

SvelteKit
/tool/sveltekit/authentication-troubleshooting
54%
tool
Recommended

Svelte - The Framework That Compiles Away

JavaScript framework that builds your UI at compile time instead of shipping a runtime to users

Svelte
/tool/svelte/overview
54%
integration
Recommended

SvelteKit + TypeScript + Tailwind: What I Learned Building 3 Production Apps

The stack that actually doesn't make you want to throw your laptop out the window

Svelte
/integration/svelte-sveltekit-tailwind-typescript/full-stack-architecture-guide
54%
integration
Recommended

Stop Stripe from Destroying Your Serverless Performance

Cold starts are killing your payments, webhooks are timing out randomly, and your users think your checkout is broken. Here's how to fix the mess.

Stripe
/integration/stripe-nextjs-app-router/serverless-performance-optimization
54%
integration
Recommended

Claude API + Next.js App Router: What Actually Works in Production

I've been fighting with Claude API and Next.js App Router for 8 months. Here's what actually works, what breaks spectacularly, and how to avoid the gotchas that

Claude API
/integration/claude-api-nextjs-app-router/app-router-integration
54%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization