PocketBase is an open-source Go backend that bundles all essential features into a single executable file. It is an ideal choice for side projects, internal tools, or mid-sized applications.
Database Included You don't need to manage an external database; PocketBase uses SQLite out of the box. It features built-in real-time subscriptions, meaning connected clients receive instant updates whenever data changes on the server—no manual WebSocket configuration required.
Integrated Files and Users The system includes dedicated modules for file management and user authentication. There is no need to write boilerplate code for file uploads or password resets, as these features are available immediately.
Administrative Dashboard A built-in web interface allows you to manage records, modify schemas, and define access rules without writing any frontend code. This is a significant time-saver during early-stage development.
Predictable REST API The API follows standard REST patterns, making it easy to fetch, create, and update records. Frontend integration is intuitive and straightforward.
To interact with the PocketBase API from your client-side code, use one of the official SDKs:
JavaScript SDK: Available at pocketbase/js-sdk. It supports browsers, Node.js, and React Native.
Dart SDK: Available at pocketbase/dart-sdk. This supports Flutter applications for web, mobile, and desktop, as well as CLI tools.
The simplest way to use PocketBase is to download the pre-built binary for your operating system.
./pocketbase serve in your terminal.examples/base/main.go. The JavaScript VM plugin is enabled by default, allowing you to extend the backend with custom logic using JavaScript (refer to the "Extend with JavaScript" documentation).For custom workflows, you can import PocketBase as a library. Your application will still compile into a single portable executable.
Here is a minimal working example:
main.go file: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 {
// Register a custom route: GET /hello
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)
}
}
go mod init myapp && go mod tidy.go run main.go serve.CGO_ENABLED=0 go build, then run ./myapp serve.To compile the executable directly from the source code, follow these steps:
examples/base.GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build../base serve.The pure-Go SQLite driver supports the following targets:
Open Computer Use: AI Agents with Hands-On Desktop Control
Prompt Tools: Open-Source Desktop App to Stop Losing Your Best AI Prompts
Semlib: Build LLM Pipelines With Map, Filter, and Sort in Python
Fuck-U-Code: A Brutally Honest Code Quality Analyzer
Smart-Admin Setup Guide: Environment, Backend, Frontend, and Mobile Deployment
AIPy: Execute Python via Natural Language Directly in Your Terminal
ShareGPT-4o-Image & Janus-4o: Open-Source Models Reaching GPT-4o Output Quality
Turn Google Gemini CLI Into a Standard API Proxy for Any OpenAI Client
Beszel Lightweight Server Monitor: Docker Stats and Alerts Setup
QSV: Slice, Query, and Clean Massive CSV Files with High Performance
Microsoft’s NLWeb: Converting Any Website into a Conversational Interface
ChineseBQB: The Ultimate Archive of Chinese Memes—Search, Download, and Win Every Group Chat