Host PocketBase with a volume.
Run the ready-made PocketBase image and add a volume at /pb_data. Your data survives restarts and deploys, and a backup runs every day.
Needs the Developer plan, the free plan only covers websites. Pricing · Check the limits first
- Ready-made image, no build
- Data on a volume
- Daily backups
> Deploy the pocketbase folder to run.zero.
runzero_create_appdoneexample-pocketbase
runzero_push_filesdoneone commit
runzero_deploydoneservice and volume created
runzero_wait_for_builddonelive
live at https://pocketbase-example-pocketbase-d9db184f.run-zero.de
- Live demoRunning on run.zero(opens in a new tab)
- Example codeMIT, on GitHub(opens in a new tab)
- Ready-made imageFrom a public registry
- Hosted in GermanyHetzner, Nuremberg
Live in three steps.
Tested with the example that runs live.
- 01
Add run-zero.yaml at the repo root
PocketBase needs no build. The service runs a ready-made image that listens on port 8090.
- Don’t name the service
pb: Kubernetes sets<NAME>_PORT=tcp://…for every service, andPB_PORTcrashes PocketBase.
run-zero.yaml (excerpt) version: "1"services: pocketbase: image: ghcr.io/muchobien/pocketbase:latest port: 8090 - Don’t name the service
- 02
Add a volume for /pb_data
That’s where the database and uploads live. A new PocketBase service gets 10 GiB at
/pb_dataeven without the entry, if your plan has room. Add it anyway so the path is in the file, and usesize:for more.run-zero.yaml (excerpt) volumes: - path: /pb_data - 03
Create an account and deploy
Create an account, connect your agent with this command, then sign in from Claude Code with
/mcpand Authenticate.- Then tell your agent: deploy this repo to run.zero.
- On first start the service log, also through
runzero_get_logs, shows a link for your first superuser. It starts withhttp://0.0.0.0:8090; replace that withhttps://pocketbase-<app>.run-zero.app.
Without an agent
Create the app in the dashboard and connect your GitHub repo. Every push rebuilds.
Connect Claude Code claude mcp add --transport http \ -s user run-zero \ https://api.run-zero.de/mcp \ --client-id runzero-cli \ --callback-port 53761
After 1 to 3 minutes the service is live at https://pocketbase-<app>.run-zero.app. /api/health answers and the admin dashboard is at /_/. PocketBase returns a 404 at /; that’s expected. If the service doesn’t start, runzero_get_logs tells you why.
One file is enough.
The example that runs live needs nothing else.
A pocketbase service from a ready-made image on port 8090, with a volume at /pb_data.
version: "1"services: pocketbase: image: ghcr.io/muchobien/pocketbase:latest port: 8090 volumes: - path: /pb_dataWhat happens to your data.
Checked with a record in the live example.
| Action | Result |
|---|---|
| Redeploy | Data stays, the service answers 503 for a few seconds |
| Scale to 0 and back to 1 | Data stays |
| Scale to 2 | Refused, a service with a volume runs exactly one instance |
What does not work today.
For a service with a volume.
Needs the Developer plan
Free has no server apps and no Postgres, a deploy stops with an error.
See pricingExactly one instance
It cannot scale higher, and scaling to 0 keeps the data. Each deploy has a short gap.
No preview
Preview addresses and manual publishing do not work for this service.
Fixed size
10 GiB by default, more with
size:. An existing volume cannot be resized yet.
See all limits
What you stop doing yourself.
Builds, HTTPS, the database and backups run on the platform.
Data stays in Germany
Servers and backups at Hetzner in Nuremberg. With a data processing agreement.
HTTPS by default
Every service gets an address on
run-zero.de, custom domains a Let’s Encrypt certificate.Volume with backup
One entry in
run-zero.yaml, backed up daily, the last 14 kept.No lock-in
Your code stays in your repo. To download your data, create a backup in the PocketBase dashboard.
Questions.
About PocketBase.
What does the live demo show?
One public record at /api/collections/notes/records that survived a redeploy and scaling to 0. The admin dashboard is at /_/, access is not public.
Are there backups?
Yes, daily, and the last 14 are kept. PocketBase stores its data in SQLite, which is copied consistently. Restore one with runzero_restore_volume, which backs up the current state first.
Does PocketBase get its volume automatically?
A new service gets 10 GiB at /pb_data, volumes: [] turns that off. With no room on the plan it runs without a volume, the data is lost on restart and your agent’s deploy result warns you. An existing service stays unchanged, it only warns there too.
Which PocketBase version runs?
The example uses the image tag latest. Pin a fixed version if you want predictable updates.
Does this work for my own SQLite app?
Yes, with volumes: on the service, and your app must keep its file there. If SQLite is detected, your agent’s deploy result names the entry you need.