pbauth / Docs

Idle memory for self-hosted auth

pbauth runs inside a single PocketBase Go binary with embedded SQLite, using 37.2 MiB of Linux resident memory for one idle app and 185.6 MiB across five isolated processes.

Self-hosting cost: PocketBase with pbauth, Better Auth and Supabase Idle RAM for one app: PocketBase with pbauth measured at 37 MiB, Better Auth with Postgres estimated at 130 to 300 MiB, self-hosted Supabase estimated at 1.5 to 3 GB. Idle RAM for five apps: 186 MiB measured, 450 to 900 MiB estimated, 7.5 to 15 GB estimated. Services to run: 1 process, a Node.js server plus Postgres, and 7 or more containers. What it costs to self-host auth Lower is better. Each metric has its own scale. PocketBase + pbauthBetter Auth + PostgresSupabase, self-hosted Idle RAM, 1 app 40–80× less than Supabase 37 MiB 130–300 MiB 1.5–3 GB Idle RAM, 5 apps 2.4–4.8× less than Better Auth 186 MiB 450–900 MiB 7.5–15 GB Services to run No database server 1 process Node.js + Postgres 7+ containers pbauth measured on Linux x86_64 with Go 1.27 and PocketBase v0.40.6. Better Auth and Supabase are typical self-hosted footprints, the faded bar shows the range.
Self-hosting cost: idle RAM for 1 app is 37 MiB with pbauth, 130 to 300 MiB with Better Auth and 1.5 to 3 GB with Supabase. For 5 apps it is 186 MiB, 450 to 900 MiB and 7.5 to 15 GB. pbauth runs 1 process, Better Auth needs Node.js and Postgres, Supabase runs 7 or more containers

Only PocketBase with pbauth was measured directly, whereas Better Auth and Supabase numbers reflect standard self-hosted stack footprints (shared Postgres for Better Auth and five isolated stacks for Supabase).

Benchmark setup and measurements

All Linux x86_64 numbers used a stripped 24.23 MiB binary compiled with Go 1.27, PocketBase v0.40.6, and embedded SQLite (VmRSS read from /proc/process_id/status):

WorkloadProcess countMeasured resident RAM
One idle app after /api/auth/methods1 binary37.16 MiB (37.79 MiB after all 6 OAuth probes)
Five isolated apps with separate data directories5 binaries185.55 MiB total (36.45 to 37.79 MiB per process)

Read set up sign-in providers to configure the binary in your deployment environment.