Skip to main content
PocketBase offers two installation methods depending on your use case. You can use it as a standalone executable for quick deployment, or integrate it as a Go library for custom applications.

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.
1

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.
2

Extract the archive

Extract the downloaded archive to your desired location:
3

Run PocketBase

Start the server with a single command:
You should see output indicating the server is running:
4

Access the admin UI

Open your browser and navigate to http://127.0.0.1:8090/_/ to set up your admin account and start configuring your database.

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.
1

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.
2

Create a new project

Create a directory for your project and initialize a Go module:
3

Create your main.go file

Create a main.go file with the basic PocketBase setup:
main.go
This example creates a PocketBase instance and adds a custom /hello route.
4

Install dependencies

Download the PocketBase library and its dependencies:
5

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.
6

Build a production executable

Compile a statically linked binary for deployment:
Then run your application:
Set CGO_ENABLED=0 to create a fully static binary that doesn’t depend on system libraries.

Cross-compilation

Build executables for different platforms:

Configuration options

Both installation methods support the same command-line flags:

Example usage

Data directory structure

PocketBase stores all data in a single directory (pb_data by default):
Back up the entire pb_data directory regularly. It contains your database, uploaded files, and application settings.

Next steps

Quickstart guide

Create your first collection and API

Extend with Go

Learn how to add custom routes and hooks