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)
Link | Description |
---|---|
Official Docs | The official documentation for PocketBase, surprisingly well-written for an open-source project. This is the essential starting point for new users. |
API Reference | This comprehensive API reference will become a frequently bookmarked page, offering practical examples that are proven to work. |
GitHub Releases | Download binaries here. Don't compile from source unless you enjoy pain. |
Changelog | It is crucial to read this changelog before attempting any upgrades to avoid potential breaking changes or issues. |
JavaScript SDK | The official JavaScript SDK for PocketBase, known for its solid performance and excellent TypeScript support. |
Dart SDK | Works but docs are thin. You'll be reading source code. |
Python SDK | A community-made Python SDK offering decent quality, providing a much better alternative than rolling your own implementation. |
Discord | Most responsive place for help. Devs actually answer questions. |
GitHub Issues | Use this platform for reporting bugs and submitting feature requests. Always search existing issues before creating a new one. |
Reddit r/pocketbase community | Good for "how did you solve X" type questions. Search for "pocketbase" on Reddit. |
Stack Overflow | While answers can be hit or miss, Stack Overflow does contain some quality solutions for specific PocketBase questions. |
PocketHost | Managed hosting, works fine for prototypes. Costs $5 per month. |
Fly.io | Good self-host option. Provides community discussions on best practices for hosting PocketBase. |
Railway | Offers one-click deployment for PocketBase. Easy to use but comes with a cost for the convenience. |
Go Framework Guide | Provides guidance for when you need custom functionality. Be warned, you're essentially forking the project. |
TypeScript Types | Offers auto-generated TypeScript types. Install this package if you are using TypeScript in your project. |
Backup Solutions | Essential information on backup and restore solutions. Avoid learning about backups the hard way. |
LogRocket Article | A solid walkthrough on using PocketBase to build a full-stack application, providing practical insights. |
Related Tools & Recommendations
Supabase + Next.js + Stripe: How to Actually Make This Work
The least broken way to handle auth and payments (until it isn't)
GitOps Integration Hell: Docker + Kubernetes + ArgoCD + Prometheus
How to Wire Together the Modern DevOps Stack Without Losing Your Sanity
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 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 - 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
Supabase - PostgreSQL with Bells and Whistles
competes with Supabase
Supabase Auth: PostgreSQL-Based Authentication
competes with Supabase Auth
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.
Python vs JavaScript vs Go vs Rust - Production Reality Check
What Actually Happens When You Ship Code With These Languages
JavaScript Gets Built-In Iterator Operators in ECMAScript 2025
Finally: Built-in functional programming that should have existed in 2015
Appwrite - Open-Source Backend for Developers Who Hate Reinventing Auth
competes with Appwrite
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
Fast React Alternatives That Don't Suck
compatible with React
Stripe Terminal React Native Production Integration Guide
Don't Let Beta Software Ruin Your Weekend: A Reality Check for Card Reader Integration
Converting Angular to React: What Actually Happens When You Migrate
Based on 3 failed attempts and 1 that worked
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
Svelte - The Framework That Compiles Away
JavaScript framework that builds your UI at compile time instead of shipping a runtime to users
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
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.
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
Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization