Skip to content

Quick start

ferritor running on your machine in about ten minutes: the two databases, a server, the first init and unseal, a namespace and a few secrets through the CLI and the JSON API, and an agent keeping them current as files.

  • Linux, x86_64 or arm64: the server and the agent are released as static Linux binaries (the CLI also runs on macOS and Windows Server: see CLI);
  • Docker or Podman with compose, for the two Postgres databases;
  • curl.

To build ferritor from source instead, see development.

The release’s archive for your machine, checked against its checksums, and the databases’ compose.yaml from the same release:

Terminal window
mkdir ferritor-quickstart && cd ferritor-quickstart
version=1.3.0
dir=ferritor-$version-$(uname -m)-unknown-linux-musl
curl -fsSLO "https://github.com/ferritor/ferritor/releases/download/v$version/$dir.tar.gz"
curl -fsSLO "https://github.com/ferritor/ferritor/releases/download/v$version/SHA256SUMS"
sha256sum -c SHA256SUMS --ignore-missing && # …-unknown-linux-musl.tar.gz: OK
tar -xzf "$dir.tar.gz" && # ferritor-server, ferritor, ferritor-agent, ferritor-csi-provider
export PATH="$PWD/$dir:$PATH"
curl -fsSLO "https://raw.githubusercontent.com/ferritor/ferritor/v$version/compose.yaml"

Nothing is unpacked unless the checksum matches: it shows the archive arrived whole; that it’s the release workflow’s own build, its cosign signature shows (production).

ferritor keeps its keys and its secrets in two separate databases, so that neither one alone opens anything (see architecture). compose.yaml starts both:

Terminal window
docker compose up -d # keys database on 5433, data database on 5434
until docker compose exec -T keys-db pg_isready -h 127.0.0.1 -U ferritor -q &&
docker compose exec -T data-db pg_isready -h 127.0.0.1 -U ferritor -q; do sleep 1; done

The loop waits until both accept connections over TCP, as the server will connect (on its first start Postgres runs a while on its socket alone, setting up): the server applies their migrations when it starts, and doesn’t wait for them.

Terminal window
export FERRITOR_KEYS_DATABASE_URL=postgres://ferritor:ferritor@localhost:5433/ferritor_keys
export FERRITOR_DATA_DATABASE_URL=postgres://ferritor:ferritor@localhost:5434/ferritor_data
ferritor-server > audit.log

It applies the databases’ migrations and serves gRPC and the JSON API on 127.0.0.1:7070. Every setting can come from the environment like these two, FERRITOR_ and the key in capitals (configuration). Its log goes to stderr; stdout carries the audit log and nothing else, hence the redirect (a real deployment gives the audit log a file or a collector of its own, audit_file or [audit_otlp]). Without a ferritor.toml it’s in dev mode, and says so:

WARN dev mode without audit_signing_key: the audit log is chained but unsigned, so edits to it can't be proven
INFO dev mode without audit_file or [audit_otlp]: the audit log goes to stdout
INFO serving gRPC and the JSON API; sealed addr=127.0.0.1:7070 mode="dev mode: plaintext, everyone allowed, loopback only"

It starts sealed: nothing that needs a key works until it’s unsealed.

In another shell, in the same directory, put the binaries on the PATH again:

Terminal window
cd ferritor-quickstart
export PATH="$PWD/$(echo ferritor-*-unknown-linux-musl):$PATH"
ferritor status # not initialized

It talks to http://127.0.0.1:7070 unless told otherwise (--addr, or FERRITOR_ADDR; see CLI).

init creates the root key, the one key every other key is wrapped under, and splits it into shares. Any three of the five rebuild it:

Terminal window
ferritor init --shares 5 --threshold 3
share 1 (generation 1): 010000000101e96d…
share 2 (generation 1): 010000000102a789…
…
Initialized: 5 shares, any 3 unseal. The server is still sealed.

The shares are printed once and stored nowhere. In a real deployment each goes to a different operator. Unseal with three of them, one call each, giving only the hex after the colon. On a terminal the share is read at a hidden prompt; it’s never a command-line argument:

Terminal window
ferritor unseal # paste a share; three times, a different one each time
unsealed
shares: 5, threshold: 3
generation: 1

The server now holds the root key in memory, and only there. A restart starts it sealed again, and so does ferritor seal, the emergency stop (see key management).

Every secret’s path starts with its namespace (app/db is in app), and each namespace has its own keys. There’s no default one, so create it first:

Terminal window
ferritor namespace create app
echo -n 's3cret' | ferritor put app/db
ferritor get app/db
created namespace app
active KEK version: 1
app/db version 1
s3cret

Values are read from stdin, byte for byte (or at a hidden prompt on a terminal), and printed raw: never a command-line argument.

Every put is a new version, and the older ones stay readable:

Terminal window
echo -n 'n3w' | ferritor put app/db
ferritor versions app/db
ferritor get app/db --version 1
app/db version 2
version 2 created 2026-10-28T07:31:47Z live
version 1 created 2026-10-28T07:31:47Z live
s3cret

Labels are plain metadata for finding secrets (never put a secret in one), and a listing covers everything below a prefix:

Terminal window
ferritor metadata set app/db team=billing
echo -n 'x' | ferritor put app/api-key
ferritor list app
app/api-key version 1
app/db version 2

Only the secrets with a label:

Terminal window
ferritor list app --label team=billing
app/db version 2

A delete is soft: every version is kept, restorable until the server’s retention (30 days by default) lets ferritor purge remove it:

Terminal window
ferritor delete app/db
ferritor get app/db # error: secret `app/db` not found
ferritor restore app/db # app/db version 2 restored

More in secrets: check-and-set, the version limit, purging.

The same server answers JSON on the same port, with values in base64:

Terminal window
curl -s localhost:7070/v1/secrets/app/db
curl -s -X PUT localhost:7070/v1/secrets/app/db \
-H 'content-type: application/json' \
-d "{\"value\": \"$(echo -n from-http | base64)\"}"
curl -s 'localhost:7070/v1/secrets?prefix=app'
{"path":"app/db","version":2,"created_at":"2026-10-28T07:31:47Z","value":"bjN3"}
{"path":"app/db","version":3,"created_at":"2026-10-28T07:31:56Z"}
{"secrets":[{"path":"app/api-key","version":1,…},{"path":"app/db","version":3,…}],"next_page_token":""}

Every endpoint and error code is in the HTTP API reference.

Most applications read their configuration from files. ferritor-agent keeps secrets current as files next to them:

Terminal window
cat > agent.toml <<'EOF'
server = "http://127.0.0.1:7070"
[[output]]
dir = "/dev/shm/ferritor-quickstart" # in memory: the agent refuses a disk unless allow_disk = true
[[output.secret]]
path = "app/db"
[[output.secret]]
path = "app/api-key"
EOF
ferritor-agent run --config agent.toml
INFO files written dir=/dev/shm/ferritor-quickstart files=2
INFO watching for changes paths=2

/dev/shm is in memory on Linux; elsewhere, use any directory and add allow_disk = true under [[output]]. Each secret is a file named after its path’s last segment, swapped in atomically as a set:

Terminal window
cat /dev/shm/ferritor-quickstart/db # from-http
echo -n 'rotated' | ferritor put app/db
cat /dev/shm/ferritor-quickstart/db # rotated, within a moment

The agent heard of the change through a watch stream and rewrote the file at once; it also reads everything again on an interval, as a fallback. See the agent for notifying the application, refusals, and running it as a Kubernetes sidecar or a systemd service. Stop it with Ctrl-C; the files stay.

Every decision and every change the server made is a line in audit.log:

Terminal window
tail -n 2 audit.log
{"time":"…","event":"outcome","caller":null,"action":"write","target":{"kind":"path","path":"app/db"},"operation":"put","result":"succeeded","details":{"trimmed":0,"version":4},"seq":36,"prev":"21b2…"}
{"time":"…","event":"authorization","caller":null,"action":"list","target":{"kind":"below","path":"app"},"decision":"allowed","seq":37,"prev":"55cc…"}

caller is null because dev mode has no identities. The lines are hash-chained; with a signing key (secured mode) the chain is signed too, and ferritor audit verify proves nothing was changed (see audit). Never a value, a share or a nonce.

Everything that makes ferritor safe to use:

  • Identity and policy. In secured mode every caller presents a client certificate naming it (ferritor://apps/billing), and the policy decides what each may do, on which paths. Dev mode allows everything.
  • TLS. Dev mode is plaintext and answers only requests addressed to loopback.
  • A signed audit log. Without a signing key the chain can’t be proven.
  • Operators holding the shares, each a different person, or a key management service unsealing the servers by themselves (auto-unseal).

The production deployment guide sets all of it up: two databases, a small PKI, a ferritor.toml, the first init and unseal, and an application reading its secret over mTLS.

Terminal window
docker compose down -v # both databases, and everything in them
cd .. && rm -rf ferritor-quickstart