PocketBase Export is a small companion web app for exporting PocketBase collection data through the official HTTP API.
It runs next to your PocketBase instance. It does not read SQLite directly and it is not installed inside PocketBase.
- π Superuser login with automatic collection discovery.
- π€ API user login with a custom auth collection and a manually selected export collection.
- π¦ CSV, JSON and XLSX exports.
- ποΈ Optional ZIP compression.
- π Filters, sorting, selected fields and relation expansion.
- π Light/dark mode.
- π French and English UI.
- π No password or auth token storage.
Use this mode when you want an admin-style export interface.
- Authenticates against
_superusers. - Can list collections through the PocketBase collections API.
- Shows collection metadata such as field count.
Use this mode when you want exports constrained by PocketBase API rules.
- Authenticates against a custom auth collection, for example
User_API. - Requires the export collection name.
- Does not list all collections because PocketBase collection discovery requires admin/superuser access.
- Start the exporter and open the web interface.
- Enter the PocketBase URL you want to connect to.
- Choose the authentication mode:
- Use Superuser when you want automatic collection discovery.
- Use API User when the export must follow PocketBase API rules.
- Sign in with the matching PocketBase credentials.
- Select or enter the collection you want to export.
- Configure the export options:
- Choose the output format: CSV, JSON or XLSX.
- Select fields, sorting, filters and relation expansion when needed.
- Enable ZIP compression for packaged downloads.
- Run the export and download the generated file.
Superuser exports are meant for trusted operators with broad access. API user exports are limited by the rules configured in PocketBase for the selected auth user and collection.
Local development uses two servers:
- Vite serves the React frontend on
http://127.0.0.1:5173. - Fastify serves the API on
http://127.0.0.1:3000.
The 5173 port is only used when running the project with npm run dev.
Requirements:
- Node.js 20+
- A reachable PocketBase instance
npm install
npm run devDefault URLs:
- Development web UI:
http://127.0.0.1:5173 - Development API:
http://127.0.0.1:3000 - PocketBase default target:
http://127.0.0.1:8090
Copy .env.example to .env when you want local overrides.
PB_URL=http://127.0.0.1:8090
PB_CONNECT_TIMEOUT_MS=30000
PB_REQUEST_TIMEOUT_MS=45000
APP_PORT=3000
API_PORT=3000
WEB_PORT=5173
CORS_ORIGIN=http://127.0.0.1:5173In development, the React app calls the Fastify API through the Vite proxy. This is why browser requests go to localhost:3000 for /api/*.
Docker runs the production build. There is no Vite server in the container.
In Docker, Fastify serves both:
- the compiled React frontend
- the API routes
The container listens internally on port 3000, so the web interface is available on the host port you map to 3000.
Recommended default:
http://127.0.0.1:3000Build locally:
docker build -t pocketbase-export:0.1.0 .
docker run --rm -p 3000:3000 -e PB_URL=http://host.docker.internal:8090 pocketbase-export:0.1.0On Linux, add --add-host=host.docker.internal:host-gateway if PocketBase runs directly on the host.
With Docker Compose:
cp .env.example .env
# Edit PB_URL in .env so it points to your existing PocketBase instance.
docker compose up --buildThe exporter is available at:
http://127.0.0.1:3000If you prefer another host port, map it to the container port 3000:
docker run --rm -p 5173:3000 ghcr.io/doosys/pocketbase-export:latestThen open:
http://127.0.0.1:5173This is only a port mapping choice. Inside the container, the app still runs on 3000.
PocketBase Export is meant to be added next to an existing PocketBase production instance. It does not package PocketBase and it should not replace your current PocketBase service, volumes, hooks, migrations or reverse proxy configuration.
If your existing Compose file already has a PocketBase service, add only this service to the same services: block:
services:
pocketbase-export:
image: ghcr.io/doosys/pocketbase-export:latest
restart: unless-stopped
ports:
- "3000:3000"
environment:
# Use the service name from your existing Compose stack.
PB_URL: http://pocketbase:8090
API_PORT: 3000
NODE_ENV: productionIf PocketBase is already reachable through a production URL, point PB_URL to that URL instead:
services:
pocketbase-export:
image: ghcr.io/doosys/pocketbase-export:latest
restart: unless-stopped
ports:
- "3000:3000"
environment:
PB_URL: https://pb.example.com
API_PORT: 3000
NODE_ENV: productionIf PocketBase runs directly on the VPS host and not in Docker, use Docker's host gateway:
services:
pocketbase-export:
image: ghcr.io/doosys/pocketbase-export:latest
restart: unless-stopped
ports:
- "3000:3000"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
PB_URL: http://host.docker.internal:8090
API_PORT: 3000
NODE_ENV: productionExpected image names:
ghcr.io/doosys/pocketbase-export:latest
ghcr.io/doosys/pocketbase-export:0.1.0- Passwords and PocketBase auth tokens are never stored.
- Auth tokens are kept in memory only and are cleared when the page is refreshed.
- Recent URLs and collection names are stored in browser
localStoragefor convenience. - API user exports are constrained by PocketBase API rules.
- Superuser mode should only be used by trusted operators.
