PocketBase packs a database (SQLite), authentication with OAuth providers, realtime subscriptions, file storage and an admin dashboard into a single Go binary that uses tens of megabytes of RAM. It is the fastest way to give a frontend a backend, and Dokploy ships it as a one-click template. This guide covers the template as published in the Dokploy templates repository on 31 October 2026, the two things to change before you rely on it, backups, and when a project has outgrown a single-process backend.
What the Dokploy PocketBase template deploys
- One service,
pocketbase, from the community image adrianmusante/pocketbase on thelatesttag, restarting always, with a health check against the admin UI every 30 seconds. - A named volume
pocketbase-datamounted at/pocketbasefor the database, files and migrations. - Port 8090 inside the Docker network only, routed by Traefik to the domain you enter; no host port is published.
- The first admin account created from
ADMIN_EMAILandADMIN_PASSWORD, which the template fills from your email and a generated 32-character password; an optionalPOCKETBASE_ENCRYPTION_KEYline is present but commented out.
The template's own notes say the admin UI can take up to a minute to appear on first start.
Step 1: deploy and log in
- On a Dokploy server (the Starter preset on the Dokploy hosting page is far more than PocketBase needs; it will share the server with your frontends), Create Service, Template, PocketBase.
- Enter the domain with its A record already pointing at the server and your admin email; copy the generated password from the environment before deploying.
- Deploy, wait for the health check, and open
https://api.example.com/_/to log in to the admin UI.
Step 2: two changes before you depend on it
- Pin the image tag.
latestmeans a redeploy can jump PocketBase versions, and PocketBase's 0.x releases have shipped breaking changes. Open the Compose editor and replacelatestwith the tag you tested; upgrade deliberately after reading the release notes. - Set the encryption key. Uncomment
POCKETBASE_ENCRYPTION_KEYand set a 32-character value so stored OAuth secrets and settings are encrypted at rest; set it once and never change it, or the encrypted settings become unreadable.
Both edits are Compose changes, so redeploy the service afterwards; Compose domains and settings only apply on redeploy.
Step 3: backups, built in and from Dokploy
PocketBase has its own backups: Settings, Backups in the admin UI creates a zip of pb_data on demand or on a cron schedule, stored locally or in an S3-compatible bucket you configure there, with one-click restore. Use it, with the bucket on a MinIO template in another project or an external S3 provider. Add Dokploy's Volume Backup on the pocketbase-data volume as a second, independent copy. Because SQLite is a file, never copy it by hand while PocketBase is running; let PocketBase's backup take the consistent snapshot.
Step 4: use it from a frontend
The JavaScript SDK talks to https://api.example.com; collections, rules and auth providers are configured in the admin UI; OAuth redirect URLs must use the public domain; file uploads are stored under the data volume by default or in S3 if you switch the storage setting. A SvelteKit, Astro or Next.js app in the same Dokploy project can call PocketBase over the internal network at build time and over the public domain from the browser.
Migrations, settings as code and realtime through Traefik
- Collections as code. PocketBase writes JavaScript migration files to
pb_migrationsinside the data volume when you change collections in the admin UI (automigrate is on by default in the official binary); commit that directory to Git if you want staging and production to share a schema, and runpocketbase migrateon start or let it apply automatically. - Settings. Mail (SMTP), S3 file storage, OAuth providers and backup destinations are configured in Settings and stored in the database, encrypted with the key you set; export and import them between instances from the same screen.
- Realtime. PocketBase's realtime API uses server-sent events, which Traefik passes through without special configuration; if subscriptions drop, check that no middleware buffers responses and that the client reconnects (the SDK does).
- Rate limits and logs. The admin UI's Settings include request rate limits per endpoint and a logs view with request details; set limits before exposing auth endpoints to the internet, and keep the admin UI behind a strong password and, ideally, the Dokploy server's Traefik rate-limit middleware.
- Upgrades. Change the pinned image tag in the Compose editor after reading the PocketBase release notes, take a backup, redeploy. PocketBase migrates its own schema on start.
When PocketBase is the wrong size
PocketBase is a single process with SQLite: it scales vertically only, cannot run as replicas, and writes are serialised. That is fine for thousands of users and most side projects and internal tools; it is wrong when you need horizontal scaling, several writers or PostgreSQL features. The next steps up on Dokploy are Supabase (PostgreSQL with the same auth-and-API idea) or Strapi for a content-first backend.
PocketBase with two or three frontends fits the MassiveGRID Starter preset (2 vCPU, 4 GB RAM, 64 GB NVMe) at $9.58 a month on shared cores, or $19.80 on dedicated cores when build times and response latency must stay steady; the Growth preset (4 vCPU, 8 GB) at $19.16 or $39.60 adds room for previews, a worker and a second project. Dokploy is free, MassiveGRID installs it on request after you order from the Dokploy hosting page, and the server runs on a Proxmox HA cluster with Ceph storage and a 15-day money-back guarantee.
Frequently Asked Questions
Is there a Dokploy template for PocketBase?
Yes. It deploys the adrianmusante/pocketbase image with a named data volume at /pocketbase, port 8090 behind Traefik, and the first admin created from ADMIN_EMAIL and ADMIN_PASSWORD. Pin the image tag and set the encryption key before relying on it.
How do I back up PocketBase on Dokploy?
Use PocketBase’s own Settings, Backups to schedule zip snapshots of pb_data to an S3-compatible bucket, which gives you a consistent copy and one-click restore, and add a Dokploy Volume Backup on the pocketbase-data volume as a second copy. Do not copy the SQLite file by hand while the service runs.
How much server does PocketBase need?
Very little: tens of megabytes of RAM at idle and a few hundred under load, with disk growing with your files. It fits in the MassiveGRID Starter preset (2 vCPU, 4 GB, 64 GB NVMe, $9.58 a month) alongside the frontends that use it.
Dokploy hosting from $9.58 a month
A MassiveGRID VPS preset for Dokploy: 2 vCPU, 4 GB RAM and 64 GB NVMe for $9.58 a month on shared cores or $19.80 on dedicated cores, in New York, London, Frankfurt or Singapore, on a Proxmox HA cluster with Ceph storage, a 100% uptime SLA and a 15-day money-back guarantee. Run the one-line installer yourself or open a ticket and we install Dokploy for you.
Configure a Dokploy server