PocketBase On Loopback, A Collection Round-Tripped

PocketBase, the backend in one binary, from the upstream release (sha256-verified), a hardened system service on loopback, its data under one directory. The live test creates a superuser with PocketBase's own command, sees a wrong password refused, makes a collection and a record, reads it back, sees an anonymous read refused, deletes the collection. Original role, live-tested on Rocky Linux 10.

ansibleDatabases

Verification

Live-tested

Really deployed to a container sandbox, proven idempotent (a second run changes nothing), verified against the role’s assertions, then torn down.

Conformance

  • Static validation (yamllint · ansible-lint)

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-09-20 · podman 4.9.3 · ansible 2.21.4 · how we verify

Documentation

pocketbase

PocketBase, the backend in one binary (sqlite, auth, files, realtime), from the upstream release (sha256-verified), as a hardened system service on loopback for a proxy that terminates TLS. Original role for EL 10, live-tested with podman on Rocky Linux 10.

No package, so the checksum is the whole story. EL 10 carries no pocketbase; PocketBase ships a release with a checksum file beside it. The role downloads both and has Ansible's get_url refuse the asset unless its SHA-256 is the one in the vendor's file, then installs the binaries as root's in /usr/local/bin, pinned by pocketbase_version.

A service account, a hardened unit, a loopback listener. pocketbase is a system user with no shell that owns the data directory and nothing else; the unit runs with NoNewPrivileges, PrivateTmp, ProtectHome and ProtectSystem=strict. The listener is 127.0.0.1:8090 by default, for a proxy that authenticates or a client on the same host; the live test reads the listening sockets and expects loopback only.

Proven by a collection. The live test creates a throwaway superuser with PocketBase's own command (idempotent, so a second run is harmless), sees a wrong password refused, authenticates, creates a collection with one required field, writes a record, reads it back, sees an anonymous request refused for that collection, and deletes it. That is the schema, the storage, the rules and the auth all doing their work.

Everything under one directory. pb_data (the sqlite databases and uploaded files) and pb_public (static files) live under pocketbase_data_dir, the one path the hardened unit can write. The dashboard at /_/ is on loopback with the API; the first superuser is pocketbase superuser upsert, which is what the live test runs.

License

Commercial - IaC Bazaar EULA. (c) IaC Bazaar.

Usage code & full reference need an account

The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.

  • Variables
  • Test

Related modules