pocketbase /pocketbase
Open Source realtime backend in 1 file
★ 61,598⑂ 3,775👁 323⑃ 345● 2,060▤ 296◈ 4,637
61,598
stars
+-3+-13+254
3,775
forks
323
watchers
345
prs
2,060
issues
296
releases
4,637
discussions
README
⚠️ The repo has moved to https://ganigeorgiev.com/pocketbase/pocketbase.
---
PocketBase is an open source Go backend that includes:
- embedded database (_SQLite_) with realtime subscriptions
- built-in files and users management
- convenient Admin dashboard UI
- and simple REST-ish API
For documentation and examples, please visit https://pocketbase.io/docs.
[!WARNING]
Please keep in mind that PocketBase is still under active development
and therefore full backward compatibility is not guaranteed before reaching v1.0.0.
API SDK clients
The easiest way to interact with the PocketBase Web APIs is to use one of the official SDK clients:
- JavaScript - pocketbase/js-sdk (_Browser, Node.js, React Native_)
- Dart - pocketbase/dart-sdk (_Web, Mobile, Desktop, CLI_)
You could also check the recommendations in https://pocketbase.io/docs/how-to-use/.
Overview
Use as standalone app
You could download the prebuilt executable for your platform from the Releases page.
Once downloaded, extract the archive and run ./pocketbase serve in the extracted directory.
The prebuilt executables are based on the examples/base/main.go file and comes with the JS VM plugin enabled by default which allows to extend PocketBase with JavaScript (_for more details please refer to Extend with JavaScript_).
Use as a Go framework/toolkit
PocketBase is distributed as a regular Go library package which allows you to build
your own custom app specific business logic and still have a single portable executable at the end.
Here is a minimal example:
0. Install Go 1.27+ (_if you haven't already_)
1. Create a new project directory with the following main.go file inside it:
go
package main
import (
"log"
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/core"
)
func main() {
app := pocketbase.New()
app.OnServe().BindFunc(func(se core.ServeEvent) error {
// registers new "GET /hello" route
se.Router.GET("/hello", func(re core.RequestEvent) error {
return re.String(200, "Hello world!")
})
return se.Next()
})
if err := app.Start(); err != nil {
log.Fatal(err)
}
}
2. To init the dependencies, run go mod init myapp && go mod tidy.
3. To start the application, run go run main.go serve.
4. To build a statically linked executable, you can run CGO_ENABLED=0 go build and then start the created executable with ./myapp serve.
_For more details please refer to Extend with Go._
Building and running the repo main.go example
To build the minimal standalone executable, like the prebuilt ones in the releases page, you can simply run go build inside the examples/base directory:
0. Install Go 1.27+ (_if you haven't already_)
1. Clone/download the repo
2. Navigate to examples/base
3. Run CGO_ENABLED=0 go build to build a binary for your current envirTop issues
Discussions
#7873New home - https://ganigeorgiev.com/pocketbase0 comments · 2026-10-26#7865golang.org/x/net CVE-2026-786691 comments · 2026-10-17#7859Bug: Bool toggle in Admin UI won't allow Save1 comments · 2026-10-14#7857Support for additional JWT signing algorithms1 comments · 2026-10-08#7855Serving an Angular SPA straight from pb_public in production (no nginx/Caddy for the front): sane, or will I regret it?1 comments · 2026-10-07#7854PocketBase Database Size Increasing Rapidly3 comments · 2026-10-07#7851(AWS Fargate + EFS volume) Context deadline exceeded for simple queries2 comments · 2026-10-02#7845I use pocketbase as a go library, can I turn off the JavaScript stuff after migrations?1 comments · 2026-09-17
Latest release
v0.40.6 Release v0.40.6 2026-10-23_To update the prebuilt executable you can run ./pocketbase update._
- Replaced the GitHub update command with update from the new host in relation to 7841.
⚠️ Note that this will be most likely the last release here on GitHub. The next time when you run update, new releases will be fetched from https://ganigeorgiev.com _(there is nothing there yet)_.
- Additional fileblob bucket escape checks for just in case if the filesystem abstraction is used as standalone without the PocketBase validations.
- Added a global restriction for the max WxH pixels size when generating a thumb to