Skip to content
DocsPocketBaseManaging Your Instance

Managing Your Instance

Once an instance is running, day-to-day operations — checking status, reading logs, taking backups, exporting data, tearing it down — can be done from the portal or from your terminal.

Two different sets of credentials are involved, and it’s worth keeping them straight:

  • Your PocketBase Cloud account manages deployments: pb cloud … commands, authenticated with pb cloud login.
  • The instance’s superuser manages what’s inside the instance — collections, records, settings, backups: pb use + pb login, or the instance’s own admin panel.

Finding an instance

Using the portal

Open your project and go to the PocketBase tab for the list, then click an instance. The detail page shows its admin email, admin password, admin URL, API URL, PocketBase version, and creation date.

Using the CLI

pb cloud pb ls                    # ID, name, status, domain
pb cloud pb info --name my-app-db # URL, version, server, superuser login

Inside a linked directory, drop the --name:

cd db && pb cloud pb info

pb cloud pb info --json prints the same fields as JSON, which is the reliable way to script against a deployment.

Reading logs

Using the portal

Open the instance and go to its Logs page — output streams live in the portal.

Using the CLI

pb cloud logs pb --name my-app-db            # last 50 lines, then exit
pb cloud logs pb --name my-app-db --lines 500
pb cloud logs pb --name my-app-db -f         # follow until interrupted

--lines accepts 1–1000. For a backend, use pb cloud logs backend — frontends are static files and have no logs.

The instance’s own request log (every API call PocketBase served) is separate from container output:

pb use https://my-app-db.pocketbasecloud.com
pb login
pb logs --filter 'status >= 400' -f

Collections, records, and rules

Using the portal

Use the instance’s admin panel at https://<your-instance>.pocketbasecloud.com/_/. The project’s Collections page in the portal also has Export and Import dialogs for moving a schema between instances.

Using the CLI

Point pb at the instance once, then work against it:

pb use https://my-app-db.pocketbasecloud.com   # saves a profile
pb login                                        # superuser login

pb collections ls
pb records ls posts --filter 'published = true' --sort '-created'
pb rules get posts

pb use --name <profile> saves several instances side by side; --profile <name> picks one per command, and pb whoami shows the active one. See Collections & API Rules for the full command set.

Backups

PocketBase takes backups on the instance itself, so this is a superuser operation rather than an account one.

Using the portal

In the instance’s admin panel, go to Settings → Backups to create, download, restore, or delete a snapshot.

Using the CLI

pb settings backup create              # snapshot now
pb settings backup ls
pb settings backup download <key> --out backup.zip
pb settings backup rm <key>

Backups include uploaded files, so they count against your instance’s storage.

Exporting data

Using the portal

Open the project’s Collections page and use the Export dialog to download your data, or Import to load a file into a collection — the import dialog asks for the target collection and a field mapping.

Using the CLI

pb cloud data export --name my-app-db --out data.zip

The platform builds the archive and the CLI downloads it; with no --out it uses the file name the platform chose. pb cloud data import is deliberately not implemented — an import needs a target collection and a per-field mapping, so use the portal’s import dialog for that direction.

Instance settings

SMTP, S3 file storage, and scheduled jobs live on the instance.

Using the portal

Admin panel → Settings (Mail settings, Files storage, Crons).

Using the CLI

pb settings get                       # everything
pb settings mail                      # SMTP config
pb settings mail set '<json>'
pb settings mail test [email protected]
pb settings s3
pb settings s3 test
pb cron ls
pb cron run <jobId>

Deleting an instance

Deleting removes the deployment and frees its slot. It cannot be undone — take a backup or an export first.

Using the portal

Open the instance, go to its Delete page, and confirm.

Using the CLI

pb cloud pb rm --name my-app-db          # asks for confirmation
pb cloud pb rm --name my-app-db --yes    # scripted

If the directory was linked, rm also clears the binding from its pb.json. The same pattern works for the rest of your stack: pb cloud frontend rm, pb cloud backend rm, and pb cloud project rm.

Next steps