Skip to main content

Appwrite vs PocketBase in 2026: Which Backend?

·OSSAlt Team
appwritepocketbasebaasbackendcomparison
Share:

Appwrite vs PocketBase in 2026: Which Self-Hosted Backend?

TL;DR

Appwrite is a full-featured BaaS platform running across multiple Docker containers — the right choice for production applications that need serverless functions, team workspaces, and horizontal scaling. PocketBase is a single 5 MB Go binary — the right choice for side projects, MVPs, and internal tools where operational simplicity matters more than feature breadth. Both give you auth, database, storage, and real-time subscriptions out of the box.

Key Takeaways

  • Appwrite (BSD-3, 45K+ stars) has 14 function runtimes, 12+ language SDKs, and team management — a Firebase replacement for production apps
  • PocketBase (MIT, 41K+ stars) is a single binary with SQLite — deploy in 30 seconds on any server with 128 MB RAM
  • Appwrite requires 2–4 GB RAM and 10+ Docker containers; PocketBase needs 128 MB and zero configuration
  • Both provide auth (email/password + OAuth), file storage, real-time subscriptions, and a REST API
  • Appwrite's functions run in Docker containers (Node.js, Python, PHP, Ruby, Go, Swift, Dart); PocketBase extends via Go hooks
  • PocketBase is better for rapid prototyping; Appwrite is better for multi-developer production teams

The Fundamental Architecture Difference

The most important distinction between Appwrite and PocketBase isn't a feature list — it's the deployment model and the operational complexity that comes with it.

Appwrite is built as a distributed system from the ground up. The default Docker Compose file starts 11+ containers: API server, scheduler, worker, realtime server, executor (for functions), database, Redis, InfluxDB, Telegraf, and several others. This architecture is designed for horizontal scaling — add more worker containers for function execution, separate the realtime server onto a dedicated instance. But it also means Appwrite requires meaningful infrastructure to run and dedicated time to maintain.

PocketBase is built around a different philosophy: the entire backend is one binary. The executable contains the API server, the admin UI, the database engine (SQLite), and the file storage handler. Run it on a $3/month VPS and you have a fully functional backend. Restart it to upgrade. Copy the data directory to back up.

This architectural difference determines which use cases each tool fits.


Appwrite — Production BaaS Platform

Appwrite's strength is breadth and flexibility. The platform was designed to cover every need a production mobile or web application might have, with first-party SDKs for every major platform.

SDK coverage is where Appwrite genuinely stands out. Official client SDKs for Web (JavaScript/TypeScript), Flutter, iOS (Swift), Android (Kotlin/Java), React Native, Vue.js, and Node.js means your entire cross-platform product shares the same backend with platform-optimized SDKs.

// Web SDK
import { Client, Account, Databases } from "appwrite";
const client = new Client()
  .setEndpoint('https://appwrite.yourdomain.com/v1')
  .setProject('your-project-id');

const account = new Account(client);
const databases = new Databases(client);

// Create user
const session = await account.create(
  ID.unique(), 'user@example.com', 'password123', 'John Doe'
);

// Query database with permissions
const posts = await databases.listDocuments(
  'main-db', 'posts',
  [Query.equal('published', true), Query.limit(10)]
);

Appwrite Functions run serverless code in Docker containers. Write in Node.js, Python, PHP, Ruby, Go, Swift, Dart, or Deno. Functions trigger on HTTP requests, cron schedules, or database/storage events. The executor container handles cold starts, resource limits, and execution isolation.

// Appwrite Function (Node.js runtime)
export default async ({ req, res, log, error }) => {
  const { userId } = JSON.parse(req.body);

  // Access other Appwrite services from inside a function
  const { Client, Databases } = require('node-appwrite');
  const client = new Client()
    .setEndpoint(process.env.APPWRITE_ENDPOINT)
    .setProject(process.env.APPWRITE_PROJECT_ID)
    .setKey(process.env.APPWRITE_API_KEY);

  const databases = new Databases(client);
  const user = await databases.getDocument('users-db', 'profiles', userId);

  return res.json({ user });
};

Teams and permissions handle multi-user access control. Users belong to teams; permissions on databases and storage collections are granted to teams or individual users. This model fits B2B SaaS applications where each customer organization needs isolated data.

Key features:

  • 14 function runtimes (Node.js, Python, PHP, Ruby, Dart, Swift, Go, Deno, Bun, and more)
  • 12+ client SDKs
  • Document database with filtering and sorting
  • 30+ OAuth providers
  • File storage with image transformation API
  • Realtime subscriptions (WebSocket)
  • Teams and permission management
  • Rate limiting and abuse protection
  • Email and SMS templates
  • Webhooks for all events

PocketBase — Fastest Path to a Working Backend

PocketBase's value proposition is radical simplicity. The entire backend ships as a single binary. No Docker, no PostgreSQL, no Redis, no nginx — just one file that you run.

# Complete PocketBase setup on a Linux VPS
wget https://github.com/pocketbase/pocketbase/releases/latest/download/pocketbase_linux_amd64.zip
unzip pocketbase_linux_amd64.zip
./pocketbase serve --http="0.0.0.0:8090"
# Admin UI at :8090/_/
# API at :8090/api/

That's the complete installation. The binary starts an HTTP server, creates a SQLite database, and serves the admin UI. You can define your data schema through the UI in minutes.

PocketBase's type system is more opinionated than Appwrite's document model. Collections have typed fields (text, number, boolean, date, email, URL, select, file, relation, JSON). The type system generates optimized SQLite queries and provides input validation automatically.

// PocketBase can be extended via Go hooks
package main

import (
    "log"
    "os"
    "github.com/pocketbase/pocketbase"
    "github.com/pocketbase/pocketbase/core"
)

func main() {
    app := pocketbase.New()

    // Intercept record creation
    app.OnRecordCreate("orders").Add(func(e *core.RecordEvent) error {
        // Custom logic: validate inventory, send notification, etc.
        log.Printf("New order from user: %s", e.Record.Get("user_id"))
        return e.Next()
    })

    // Schedule a recurring task
    app.Cron().MustAdd("daily-cleanup", "0 2 * * *", func() {
        // Clean up expired sessions or old data
    })

    if err := app.Start(); err != nil {
        log.Fatal(err)
        os.Exit(1)
    }
}

Realtime subscriptions work via SSE (Server-Sent Events). Client SDKs wrap the subscriptions with automatic reconnection. The SDK is available for JavaScript/TypeScript and Dart (Flutter), making PocketBase particularly well-suited for Flutter apps.

// PocketBase JavaScript SDK
import PocketBase from 'pocketbase';

const pb = new PocketBase('https://backend.yourdomain.com');

// Authenticate
const authData = await pb.collection('users').authWithPassword(
  'user@example.com', 'password'
);

// Real-time subscription
pb.collection('messages').subscribe('*', function(e) {
  console.log(e.action); // 'create', 'update', 'delete'
  console.log(e.record);
});

Key features:

  • Single binary (5 MB), zero dependencies
  • SQLite database (typed collections, migrations)
  • Auth with email/password and OAuth2
  • File storage (local or S3)
  • Realtime via SSE
  • Admin UI
  • JavaScript and Dart SDKs
  • Go hooks for custom logic
  • Auto-generated migrations
  • 128 MB RAM

Detailed Comparison

FeatureAppwritePocketBase
LicenseBSD-3MIT
Stars45K+41K+
DeploymentDocker (10+ containers)Single binary
DatabaseMariaDB (document model)SQLite (typed collections)
Auth methods30+ OAuth + emailEmail + limited OAuth
Serverless functions✅ 14 runtimes✅ Go hooks
SDK platforms12+ (all major platforms)JS, Dart
Real-timeWebSocketSSE
Teams/orgs
Horizontal scaling
Min RAM2–4 GB128 MB
Setup time10–20 minutes30 seconds
Backup strategyDatabase + storage exportsCopy single directory

Decision Framework

Choose Appwrite if:

  • You're building a production app with multiple platforms (web + iOS + Android)
  • Your backend logic requires serverless functions in various languages
  • You need team workspaces for B2B multi-tenancy
  • You expect to scale horizontally
  • You need 30+ OAuth providers or complex auth flows

Choose PocketBase if:

  • You're building a side project, MVP, or internal tool
  • You want the fastest possible time from idea to working backend
  • Server resources are limited
  • Your team doesn't want to manage Docker infrastructure
  • Your app is single-server scale (up to ~100K MAU on a decent VPS)

Performance Considerations

PocketBase's SQLite backend is faster than many expect. SQLite read performance on a modern SSD exceeds what most web applications actually need — benchmarks consistently show SQLite handling thousands of reads/second without breaking a sweat. The bottleneck for most applications is network latency, not database I/O.

Where SQLite struggles is concurrent writes. SQLite uses write-ahead logging (WAL) mode by default, which allows multiple concurrent readers with a single writer. For applications with high write concurrency (multiple users writing simultaneously), SQLite's write locking can become a bottleneck. PocketBase is not the right choice for applications with sustained high-write workloads.

Appwrite's MariaDB backend handles concurrent writes natively and scales better under write-heavy workloads. The trade-off is the operational complexity of running and maintaining a separate database server.


Cost Comparison

ScaleFirebaseAppwrite (self-hosted)PocketBase (self-hosted)
1K MAU~$0 (free tier)$15–20/month (VPS)$5/month (VPS)
10K MAU~$100/month$20–30/month$5–10/month
100K MAU$500+/month$30–60/month$10–20/month

Both self-hosted options have flat, predictable costs that don't scale with MAU.


Related: Best Open Source BaaS Platforms 2026 · PocketBase vs Supabase: Which Backend? · Supabase vs Appwrite: Full Comparison

See open source alternatives to Appwrite on OSSAlt.

The SaaS-to-Self-Hosted Migration Guide (Free PDF)

Step-by-step: infrastructure setup, data migration, backups, and security for 15+ common SaaS replacements. Used by 300+ developers.

Join 300+ self-hosters. Unsubscribe in one click.