Favicon of PocketBase

PocketBase

Single-file Go backend with an embedded SQLite database, realtime subscriptions, auth, and a REST API.

Open Source Alternative to:
PocketBase website screenshot
PocketBase GitHub repository preview

PocketBase is an open-source backend written in Go that ships as a single executable. It bundles an embedded SQLite database with realtime subscriptions, file and user management, a REST-ish API, and a built-in admin dashboard. It can run standalone or be imported as a Go library to add custom routes and business logic on top of the same portable binary.

Key features

  • Embedded SQLite with realtime: data is stored in SQLite, and clients can subscribe to record changes over realtime subscriptions.
  • Built-in auth and users: user accounts, OAuth2 providers, and file uploads are managed out of the box.
  • Admin dashboard UI: a web UI for managing collections, records, and settings without writing code.
  • REST-ish API: every collection is automatically exposed through a REST-like HTTP API.
  • Extend with Go or JavaScript: use PocketBase as a Go framework for custom business logic, or extend prebuilt executables with a JS VM plugin.
  • Official SDKs: JavaScript (browser, Node.js, React Native) and Dart (web, mobile, desktop, CLI) client libraries.

Ideal use cases

PocketBase suits projects that want a full backend, including auth, file storage, and a database, without assembling separate services for each concern: mobile app backends, internal tools, prototypes, and small-to-medium production apps that don't need a distributed database. Because the entire backend ships as one executable with an embedded SQLite database, it's easy to run on a single VPS, bundle inside a desktop app, or deploy alongside a static frontend without provisioning a separate database server. Teams building with the official JavaScript or Dart SDKs get typed clients for browser, Node.js, React Native, web, mobile, and desktop targets without writing their own HTTP wrapper. The Go framework option matters most for teams that expect to outgrow the prebuilt executable: hooking into OnServe and other lifecycle events lets you add custom business logic, background jobs, or additional routes while keeping the same single-binary deployment model. Because SQLite is embedded rather than a separate networked service, PocketBase is best suited to workloads that fit on one machine rather than applications that need to scale writes horizontally across many database nodes.

Getting started

The fastest path is downloading a prebuilt executable from the Releases page and running ./pocketbase serve, which starts the API, admin UI, and realtime engine from a single binary and file. Developers who want custom server-side logic can instead use PocketBase as a Go library: install Go 1.25+, write a main.go that registers routes through app.OnServe(), run it with go run main.go serve, and build a statically linked executable with CGO_ENABLED=0 go build. The project supports cross-compilation to Linux, macOS, Windows, and FreeBSD across amd64, arm64, and several other architectures. Tests run with the standard go test ./... command, and PocketBase's own test suite mixes unit and integration tests.

Frequently asked questions

Share:

Stars
60.3K
Forks
3.6K
Last commit
5 days ago
Repository age
4 years
License
MIT
Self-hosted
Yes
Activity score
86/100
View Repository
Ad
Favicon

 

  
 

Similar to PocketBase

Favicon

 

  
 
Favicon

 

  
 
Favicon