restic REST Server On Loopback, The Protocol Spoken By Hand

restic's REST backend server from the upstream release (sha256-verified) as a hardened system service on loopback, append-only and private repositories a variable away. No client is installed, so the live test speaks the protocol: creates a repository, writes its config object, reads it back, deletes it and sees it gone. Original role, live-tested on Rocky Linux 10.

ansibleStorage

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

rest-server

restic's REST backend server from the upstream release (sha256-verified), as a hardened system service on loopback, with append-only and private repositories a variable away. 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 rest-server; restic 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 rest_server_version.

A service account, a hardened unit, a loopback listener. rest-server 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:8000 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.

The protocol, spoken by hand. No restic client is installed by the role, so the live test speaks the REST protocol itself: it creates a repository (POST /<repo>/?create=true), writes the config object, reads it back, deletes it and sees it gone. That is what restic init and a backup do over the wire.

Append-only is the setting that matters. With rest_server_append_only: true every delete is refused with 403, so a client that is itself compromised cannot destroy the backups it made; rest_server_private_repos confines each user to the repository named after it. Authentication is off by default on loopback, for a proxy that authenticates; rest_server_no_auth: false with a bcrypt htpasswd file turns the server's own on. The release's binary ships without an executable bit; the role installs it 0755.

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