Install and run PocketBase
Download the standalone executable, start a local server, verify it, and stop it safely.
You will download a PocketBase release, start its local web server, verify the default address, and stop the process. This tutorial uses the standalone executable and a terminal on your development machine.
When you finish, the local dashboard and API will be reachable, and you will know how to stop the process without removing the generated pb_data directory.
Before you begin
You need a supported release from the GitHub Releases page, an extracted archive, and a terminal opened in that directory.
pb_data for application data and uploaded files. Do not add it to source control or delete it unless you intend to remove local data.Start a local server
Download and extract the archive for your operating system. From the extracted directory, run:
./pocketbase --helpThe command prints the available commands and options.
Run:
./pocketbase serveWith no domain argument, serve listens on 127.0.0.1:8090.
Open http://127.0.0.1:8090 in a browser. The dashboard is at http://127.0.0.1:8090/_/ and the API is at http://127.0.0.1:8090/api/.
The first start generates an installer link for creating the first superuser. You can also run ./pocketbase superuser create EMAIL PASS.
Return to the running terminal and press Ctrl+C. The process exits and pb_data remains for the next start.
Ctrl+C without an unhandled server error.To verify the complete lifecycle, start serve, open the dashboard at /_/, and confirm the terminal is still serving requests while the page loads. Press Ctrl+C, then check that the extracted directory still contains pb_data before starting again.
Choose a different listener
For a named domain, pass the domain to serve; the default HTTP and HTTPS listeners become 0.0.0.0:80 and 0.0.0.0:443. You can set them explicitly:
./pocketbase serve example.test --http=0.0.0.0:8080 --https=0.0.0.0:8443The --origins option controls allowed CORS origins and defaults to *. When HTTPS is enabled, incoming HTTP traffic redirects to HTTPS.
Continue with Build your first PocketBase app or manage superusers and the admin UI.