Where Does PocketBase Store Its Database and Uploads?
Where the PocketBase single binary keeps data.db, uploads, and migrations beside itself on any OS.
Last updated
PocketBase keeps everything next to its single binary: pb_data for the SQLite database and uploaded files, pb_public for the web root, pb_migrations for schema history. No system directories, no registry, no hidden folders.
That locality is the deployment story. Moving an instance means moving one directory with the binary, and the --dir flag relocates pb_data when the default does not suit. The admin backup button writes the same database file you would copy by hand. The dashboard confirms custom --dir setups visually.
Where PocketBase stores this, by platform
./pb_data (beside the binary)
data.db plus -wal/-shm sidecars and storage/uploads inside. Stop the process before copying for a consistent snapshot. The --dir flag points pb_data anywhere else without changing anything inside it.
.\pb_data (beside the binary)
Same layout on every desktop OS since the binary is self contained. Serve flags and data dir behave identically, so guides written for Linux apply directly. Keep the binary version matched to the data.
Frequently asked questions
how do i back up pocketbase
Copy the pb_data folder (data.db with WAL sidecars, storage/uploads) to the new host and launch the same version binary against it. Backups inside the admin UI export the same database on demand. Keep binary and data versions in step.
where is the pocketbase database
In pb_data/data.db (SQLite with WAL sidecars) plus storage/ for uploaded files. The whole directory tree moves as one unit. A lone data.db without its sidecars or storage folder restores incompletely.
where do pocketbase migrations live
In pb_migrations/ beside the binary (JavaScript or Go history files). They apply in order on boot. Version control this folder with your project; the data folder stays out of git.
Notice an outdated path? Let us know.