Standalone executable
The fastest way to get started is downloading a prebuilt executable. This is perfect if you want to use PocketBase without writing any code.Download PocketBase
Visit the GitHub releases page and download the archive for your platform:
- macOS (Intel/Apple Silicon)
- Linux (x86_64, ARM, ARM64, and more)
- Windows (x86_64, ARM64)
- FreeBSD (x86_64, ARM64)
The prebuilt executables include the JavaScript VM plugin by default, allowing you to extend PocketBase with JavaScript hooks.
Run PocketBase
Start the server with a single command:You should see output indicating the server is running:
Supported platforms
The pure Go SQLite driver supports these build targets:Go library installation
Use PocketBase as a Go library to build custom applications with your own business logic. You’ll end up with a single executable that includes both PocketBase and your code.Install Go
Make sure you have Go 1.23 or later installed. Check your version:If you need to install Go, visit the official Go installation guide.
Create your main.go file
Create a This example creates a PocketBase instance and adds a custom
main.go file with the basic PocketBase setup:main.go
/hello route.Run your application
Start your application in development mode:
The
serve command starts the HTTP server. Other available commands include superuser for creating admin accounts.Cross-compilation
Build executables for different platforms:Configuration options
Both installation methods support the same command-line flags:| Flag | Default | Description |
|---|---|---|
--dir | ./pb_data | The data directory for database and files |
--dev | Auto-detected | Enable development mode with verbose logging |
--encryptionEnv | None | Environment variable for encryption key (32 chars) |
--queryTimeout | 30 | Default SELECT query timeout in seconds |
Example usage
Data directory structure
PocketBase stores all data in a single directory (pb_data by default):
Next steps
Quickstart guide
Create your first collection and API
Extend with Go
Learn how to add custom routes and hooks