# 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: 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](assets/ram-comparison.svg)

Only [PocketBase](https://pocketbase.io) with pbauth was measured directly, whereas [Better Auth](https://better-auth.com) and [Supabase](https://supabase.com) 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`):

| Workload                                          | Process count | Measured resident RAM                                   |
| ------------------------------------------------- | ------------- | ------------------------------------------------------- |
| One idle app after `/api/auth/methods`            | 1 binary      | `37.16 MiB` (`37.79 MiB` after all 6 OAuth probes)      |
| Five isolated apps with separate data directories | 5 binaries    | `185.55 MiB` total (`36.45` to `37.79 MiB` per process) |

Read [set up sign-in providers](providers.md) to configure the binary in your deployment environment.
