Running PocketBase?

PocketBase crashing after restore or migrations clashing? We bring it back.

PocketBase is a single Go binary with SQLite, auth, file storage and an admin UI, and that simplicity is most of the appeal. It stays simple until a backup restore crashes the process, a migration disagrees with the existing schema, or the logs database grows itself into a disk-full incident. We put the backup back, reconcile the migrations and keep the binary running.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

pocketbase-run.log

still failing

What it is

PocketBase at a glance

PocketBase is an open-source backend distributed as a single executable, with SQLite under the hood, a built-in admin dashboard, authentication, file storage, realtime subscriptions and a JavaScript hook VM for custom logic. It is a one-binary alternative to spinning up a database, an auth server and a storage bucket separately.

The project is maintained by Gani Georgiev and released under the MIT license. Typical uses include indie SaaS products, internal tools, prototype backends that need realtime updates, and small production deployments where running a Postgres cluster and a separate identity provider would be overkill.

Type
Single-binary backend with embedded SQLite, auth and admin UI
First released
2022
License
MIT
Maintained by
Gani Georgiev and the PocketBase community
Typically used for
Indie SaaS, internal tools, prototype backends, small production apps

The honest version

PocketBase pros and cons

No technology is all upside. This is where PocketBase earns its place and where it tends to cause trouble.

Where PocketBase is strong

  • One file, one processCopy the binary, start it, and the backend is up with a working database, auth, admin UI and file storage. Nothing to install, nothing to compose.
  • Honest realtime out of the boxCollection subscriptions over WebSockets stream inserts, updates and deletes to the client without a separate pub/sub layer, which a lot of small apps can finish on.
  • Record-level permission rulesList, view, create, update and delete rules sit on the collection itself as a tiny expression language, which keeps the authorization story readable.
  • Go SDK and hooksExtending PocketBase with Go gives you a real backend when the admin UI is not enough, and the JavaScript hook VM covers the smaller cases without leaving the binary.
  • File storage and image thumbnailsUploaded files land either on disk or S3 with signed URLs and automatic resizing, so a lot of product features ship without extra infrastructure.
  • Very low running costA 2 GB VM comfortably hosts a working SaaS for a lot of teams, which keeps the infrastructure bill down and the mental model small.

Where PocketBase bites

  • SQLite scaling has a ceilingPocketBase is a single-writer system by design. Workloads that outgrow one machine have no cluster story, and the answer eventually is to move to Postgres with a different backend.
  • Backups look fine until a restore failsImporting a backup on a fresh deployment occasionally crashes with out-of-memory errors or a schema mismatch, and when the restore crashes the process will not start again without wiping pb_data.
  • Migration conflicts are easy to createCreating a collection manually and then trying to apply a generated migration produces unique-constraint errors on the collections table, and the deleted-field path does not always do what you expect.
  • Upgrades across majors can break dataHistorical upgrades, including the 0.7 to 0.16 window and the encrypted-settings changes in later releases, have required careful intermediate steps rather than a clean skip.
  • Realtime scale is modestWebSocket subscriptions work well for small numbers of clients. A spike in concurrent subscriptions can push CPU and memory noticeably on a small instance.
  • Single point of failure by designOne binary and one SQLite file is the architecture. Multi-region, high availability and zero-downtime deploys are not what PocketBase is for, and pretending otherwise costs weekends.

Sound familiar?

Common PocketBase problems we fix

The PocketBase problems that bring people to us, and what you have once each one is fixed.

unable to open database file: out of memory

The process crashes on backup restore

Importing a backup into a fresh install that was built on a different version or a tighter memory limit, with SQLite returning out-of-memory and the binary refusing to start.

Backup imported, binary running again

UNIQUE constraint failed: _collections.name

A generated migration clashes with existing data

A collection created manually in the admin UI and a migration file trying to create the same name, so running the migrations fails and the application cannot start.

Migrations reconciled with real schema

database disk image is malformed

The logs database corrupts itself

The pb_data/logs.db file reporting corruption after a hard shutdown or disk-full event, which usually blocks startup but is safe to recreate from scratch.

Logs DB rebuilt, startup clean

failed to decode encrypted settings

Encrypted settings cannot be read after a redeploy

A PB_ENCRYPTION key that changed between environments, so the saved OAuth credentials and SMTP settings cannot be decrypted and every integration goes quiet.

Settings re-entered, secrets stable

S3 backup upload failed: AccessDenied

Scheduled backups silently stop uploading

An S3 policy that was tightened or a rotated key that was not updated in the admin UI, with PocketBase continuing to run while backups fall further behind.

Backups verified end to end

subscription dropped after 30s idle

Realtime subscriptions keep dropping

A reverse proxy or load balancer in front of PocketBase timing out idle WebSocket connections, so the client reconnects repeatedly and users see a flickering interface.

WebSocket timeouts aligned end to end

0.7 upgrade path broke data

A major upgrade left data behind

An upgrade that skipped an intermediate release, with field types or auth collections that no longer match what the new version expects, which breaks admin login or record APIs.

Upgrade re-run through intermediate versions

What we do

PocketBase help, from rescue to tidy production

Reach out for one crash on startup, or hand us the binary and the data it is sitting on.

Rescue
A binary that will not start, a backup that will not restore, or a migration that keeps failing. We find the piece that is wrong and get it serving traffic again.
Backup and restore drills
Scheduled backups to S3 or similar, with restore rehearsed into a fresh binary so an outage is a replay rather than an experiment.
Migration reconciliation
Hand-built collections and generated migrations lined up, with a clean migration history you can replay in CI.
Hosting hardening
Reverse proxy, TLS, WebSocket timeouts, file-upload limits and process supervision set up so the single binary is not also the single point of failure for silly reasons.
Move to Postgres
When the SQLite ceiling becomes real, we plan the migration onto a Postgres-backed stack without losing auth records or stored files.
Managed Tech
Backups watched, version upgrades tested on a copy of pb_data, and an engineer who picks up when the admin UI will not load.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running PocketBase alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

PocketBase questions

Something else? Call+1 737 727 7327

Can PocketBase run real production workloads?

For small and medium apps, yes. A single binary with SQLite handles a surprising amount of traffic if the disk is fast and the schema is reasonable. For anything that needs multiple writers, horizontal scale or multi-region availability it is the wrong tool, and we will say so plainly.

How do we back up PocketBase safely?

Use the built-in scheduled backups to push a snapshot of pb_data to S3 or similar, and rehearse the restore into a fresh binary at least once a quarter. The restore is where most teams discover a problem, not the backup, which is why the drill matters more than the schedule.

What happens when a migration fails?

PocketBase rolls the failed migration back and stops applying the rest, so the app will not start until the mismatch is resolved. Common causes are collections that already exist, type changes that collide with real data, and encrypted-settings keys that changed between environments.

Can we extend PocketBase without forking it?

Yes, in two ways. The Go SDK lets you embed PocketBase in your own program and add routes, hooks and jobs. The JavaScript hook VM runs event handlers written in JS inside the binary. Most product features sit comfortably in one of those.

How much does PocketBase help cost?

Our estimate is free. Share what the binary is doing and where it is stuck, and we send a price before we start the work.

Free estimate

PocketBase giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.