Configuration reference
Squirrel reads a single TOML file (~/.squirrel/config.toml by default; override
with --config or $SQUIRREL_CONFIG). Unknown fields, missing required fields,
and unset environment variables are rejected at load time.
Any secret field accepts either a literal string or an inline { env = "VAR" }
table resolved at load time.
Top level
Section titled “Top level”| Key | Required | Meaning |
|---|---|---|
db | no | Path to the SQLite index database. Default ~/.squirrel/index.db. |
node_name | no | This host’s identity for peer sync, and the origin recorded on content it indexes. Defaults to the machine’s hostname. |
[volumes.<name>]
Section titled “[volumes.<name>]”| Key | Required | Meaning |
|---|---|---|
path | yes | Absolute (or ~-relative) root directory of the volume. |
sync_to | no | List of destination names to push to. |
sync_every | no | Duration; the agent syncs this volume to every target in sync_to on this cadence. Absent = no scheduled sync. |
index_every | no | Duration; cadence for standalone index passes between syncs (a sync indexes first anyway). Absent = no extra indexing. |
offload_requires | no | List of targets whose durability must cover a file before its local bytes may be offloaded. A volume without this key refuses to offload. Naming a mirror destination is a config error, except a native mirror on a local disk: every other mirror can never produce evidence the gate accepts. |
offload_max_evidence_age | no | Duration; a target whose durability evidence was last re-verified longer ago than this refuses the offload. Default disabled. |
[volumes.<name>.hook]
Section titled “[volumes.<name>.hook]”| Key | Required | Meaning |
|---|---|---|
command | yes | Argv list, exec’d without a shell (e.g. ["kopia", "snapshot", "create", "."]). |
timeout | no | Per-invocation timeout. Default 1h. |
interval | no | Also fire on this cadence, regardless of change. Omit for on-change only. |
See Hooks.
[destinations.<name>]
Section titled “[destinations.<name>]”Common keys
Section titled “Common keys”| Key | Applies to | Meaning |
|---|---|---|
type | all | local, sftp, s3, b2, gcs, or kopia. |
root | all | Base path (or bucket sub-path) at the destination. |
layout | every type but kopia | mirror (default), content-addressed, or packed. |
concurrency | every type but kopia | How many files a push writes at once (optional; a positive integer). On a destination squirrel writes itself the default is 4 on local and 8 on sftp, where every file in flight shares one SSH connection; lower it for a slow disk or USB bridge, or a server that answers one request at a time. On a destination rclone writes (crypt, s3, b2, gcs) it caps rclone’s concurrent transfers (--transfers), whose default applies otherwise. |
| Key | Meaning |
|---|---|
root | Local directory. Requires a .squirrel-volume marker (see first use). |
| Key | Meaning |
|---|---|
host | Server hostname. |
port | SSH port (optional; 22 when omitted). |
user | SSH user. |
password | Secret (literal or { env }). |
key_file | Path to a private key file, as an alternative to password (optional; a leading ~/ is expanded). A passphrase-protected key goes through ssh-agent instead. |
root | Base path on the server. |
known_hosts_file | Path to a known_hosts file holding the server’s host key (a leading ~/ is expanded). |
host_key_algorithms | Space-separated list pinning accepted host-key algorithms (optional). |
With neither password nor key_file set, squirrel logs in with the keys of the
running ssh-agent (SSH_AUTH_SOCK).
An sftp destination without crypt, in any
layout, is written by squirrel itself: it connects to the server, and always
checks its host key, against known_hosts_file or ~/.ssh/known_hosts when
that is unset. A server whose key the file does not hold is refused; the message
gives the key’s fingerprint and the known_hosts line that trusts it, to add once
you have confirmed it. A key that differs from the pinned one is refused too.
Unless host_key_algorithms is set, squirrel asks the server for the key types
the file holds for it. checkers tunes rclone, so these destinations reject it,
and a mirror rejects hash_algo, since it runs no command on the server.
An encrypted sftp destination is written by rclone, which checks the host key
against known_hosts_file and accepts whatever key the server presents when it
is unset.
| Key | Meaning |
|---|---|
provider | rclone s3 provider (e.g. AWS). |
region | Bucket region. |
bucket | Bucket name. |
root | Sub-path within the bucket. |
endpoint | Custom S3 endpoint URL for a non-AWS or self-hosted provider (optional). |
access_key_id | Secret. |
secret_access_key | Secret. |
storage_class | Optional; maps to rclone’s s3 storage_class. Use the exact value your provider documents. |
| Key | Meaning |
|---|---|
bucket | Bucket name. |
root | Sub-path within the bucket. |
account_id | Secret; the B2 key ID (rendered as rclone’s account). |
application_key | Secret; the B2 application key (rendered as rclone’s key). |
| Key | Meaning |
|---|---|
bucket | Bucket name. |
root | Sub-path within the bucket. |
service_account_file | Path to a service-account JSON file (optional). |
service_account_credentials | Secret; the service-account JSON itself, as an alternative to the file. |
| Key | Meaning |
|---|---|
root | Kopia repository path. |
password | Repository password (passed to kopia via environment). |
verify_files_percent | Percentage in (0, 100] of snapshot file bytes kopia snapshot verify reads back on every sync. Default 10. Zero is rejected: a kopia leg gates offload as content-verified, so it must read real content. |
A kopia destination rejects a crypt block, --dry-run, and --shallow. See
Kopia.
[destinations.<name>.crypt]
Section titled “[destinations.<name>.crypt]”Client-side content encryption via rclone’s crypt overlay (any non-local
destination). See Encrypted (crypt).
| Key | Meaning |
|---|---|
password | Plaintext encryption password; squirrel obscures it at render time. Secret. |
password2 | Plaintext salt; optional but recommended. Secret. |
obscured | true if password/password2 are already rclone-obscured (renders them verbatim; default false). |
rclone’s own filename encryption stays off (filename_encryption = off, fixed by
design). On the content-addressed and packed layouts squirrel instead names every
artifact by a key derived from these passwords, so the destination discloses
neither a path nor a content hash; on a mirror the replicated tree keeps your own
names in clear. See Encrypted (crypt).
Content-addressed & packed knobs
Section titled “Content-addressed & packed knobs”For layout = "content-addressed" or layout = "packed" destinations. See
Content-addressed and
Packed.
| Key | Applies to | Default | Meaning |
|---|---|---|---|
hash_algo | sftp, except a mirror without crypt | sha256 | Which server-side hash the fingerprint uses. On a content-addressed or packed destination without crypt it names the command squirrel runs on the server — md5 (md5sum), sha1 (sha1sum), sha256 (sha256sum) or blake3 (b3sum) — and squirrel checks its answer against the bytes it sent. Behind crypt rclone runs it, and crc32, xxh3 and xxh128 are valid too; there the default applies to content-addressed only. A plain sftp mirror runs no command on the server, so the key is rejected there. |
checkers | rclone remotes | rclone default | Cap rclone’s concurrent checkers (--checkers). Rejected on every local destination and every sftp one without crypt: squirrel writes those itself, without rclone. |
force_path_style | s3 | false | Path-style bucket addressing for squirrel’s own ETag reader (not the rclone transport). |
pack_threshold | packed | — | Files smaller than this are packed; at/above land as objects (e.g. 1MiB). |
pack_size | packed | — | Target size of one pack before it is closed (e.g. 512MiB). |
zstd_level | packed | — | zstd compression level, 1 fastest … 4 best. |
verify_every | content-addressed / packed, native mirror | off | Cadence for the agent to re-check what squirrel recorded storing on this destination — objects and packs against their upload fingerprints, a native mirror’s copies by size, mtime and (on a local disk) BLAKE3 — the same pass as squirrel verify, recorded as an audit run. Falls back to [agent] verify_every. Read-only; the agent never writes to the destination. Rejected on a mirror rclone writes. |
[backups]
Section titled “[backups]”Automatic index snapshots. Absent table = enabled with these defaults.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Local snapshot-on-sync. false disables both halves. |
dir | <dir of db>/backups | Local snapshot directory. |
keep | 7 | Local snapshots kept (rotation; 0 = keep all). |
cloud | true | Ride a copy along to destination buckets. |
cloud_keep | 7 | Snapshots kept per <dest>/<volume>/.squirrel-index/ (0 = keep all). |
[agent]
Section titled “[agent]”Required to run squirrel agent. Configures the
unattended cadence (index_every, sync_every), scheduled audits, and an
optional agent-specific db path (which takes precedence over the top-level db
when the agent runs).
listen is optional. When set (e.g. 0.0.0.0:8443), the agent binds an HTTP
server for peer syncs and the health endpoint, and a bearer token is required.
When omitted, the agent runs its schedulers only — the listener-less mode for
cadence-only machines that never receive peer syncs; [agent.auth] is then
optional. See The agent.
| Key | Required | Meaning |
|---|---|---|
listen | no | Bind address, e.g. 0.0.0.0:8443. Omit for listener-less, scheduler-only mode (above). |
db | no | Agent-specific index path; wins over the top-level db. |
tls.cert | no | Path to the agent’s TLS certificate. Set together with tls.key; generate both with squirrel agent cert. Absent = plain HTTP. |
tls.key | no | Path to the matching private key. |
auth.token | with listen | Shared bearer token. Required only when the agent binds an HTTP surface. |
auth.peers.<name>.bearer | no | Per-peer bearer token this agent accepts from node <name>. Must equal that node’s [nodes.<this node>].auth.bearer; squirrel node pair emits both halves so they match by construction. |
scan_interval | no | Drift-scan cadence over every hosted volume. Off when absent. |
scan_strategy | no | shallow (default) or deep (re-hash everything — bit-rot detection). |
verify_every | no | Fleet-wide default verify cadence applied to every content-addressed, packed or native mirror destination that declares no verify_every of its own. Off when absent. |
[nodes.<name>]
Section titled “[nodes.<name>]”A peer that runs its own agent. See Peer sync.
| Key | Required | Meaning |
|---|---|---|
endpoint | yes | Peer’s sync-API URL, e.g. https://nas.home:8443. |
auth.bearer | yes | Bearer token this node presents to the peer. |
tls.cert_fingerprint | no | sha256:<hex> pin for the peer’s self-signed cert. |
dedup_strategy | no | copy (default) or off. |
pull_durability_every | no | Cadence for the agent to pull this peer’s durability vectors (the same merge as squirrel peer-sync pull-durability), giving evidence freshness its own clock. Lets a receive-only node (one this machine never syncs to) keep its offload-gate evidence fresh unattended. The agent never rewinds a watermark. Off when absent. |
One address, one trust anchor
Section titled “One address, one trust anchor”endpoint is the whole of a peer’s reachability. The plan is negotiated
over it and the bytes are streamed over it, on the same TLS connection
with the same bearer token and the same optional certificate pin — so
whatever you can verify about the peer’s identity covers the transfer too.
Earlier versions also needed a path: an SMB/NFS mount point or rclone
remote prefix naming where this machine wrote bytes for the peer. It was
a separate contract squirrel could only half-check — it could stat the
local end, but a directory that existed and was not actually the peer’s
storage looked identical to a correct one, and bytes landed somewhere the
peer never saw. That key is gone. A config that still carries it is
rejected at load time so the line gets deleted rather than silently
ignored:
nodes.nas: path is obsolete: peer syncs now stream bytes over the node's endpoint, so there is no separate byte-path to configure — delete the lineBoth sides must be running a squirrel that speaks peer-sync protocol v4 or later. An older peer is refused with an upgrade instruction rather than negotiated down: there is no byte-path left to fall back to, so continuing would plan a sync, move nothing, and fail every path at verification.