Configuration¶
Docbank uses ~/.docbank/ with default settings unless you choose another
vault. Use DOCBANK_HOME to select its location. Add config.toml when you need
to change how the daemon runs.
The file controls the listening address, authentication, idle timeout, backup
repository, watched inboxes, the optional daemon MCP HTTP listener and credential binding, and
secondary-store connections. A vault with only a primary store needs no
configuration file. Each registered secondary store needs a matching
connection profile after restart. Backup commands need either a configured
repository or a --repo flag.
For optional pinned local email rendering, see Email PDF configuration.
For optional bounded PDF and density-qualified PNG rendering, see
Verified page images.
The [page_runtime] section is independent of text and embedding providers.
Vault location¶
All data defaults to ~/.docbank/. Override with the DOCBANK_HOME
environment variable:
Run docbank vault info after selecting a vault to see its canonical path and vault
ID. This helps when one machine has several independent Docbank archives:
The directory layout is created on first use:
~/.docbank/
├── docbank.db # SQLite: virtual tree, metadata, FTS index
├── blobs/
│ ├── <aa>/<sha256> # raw content-addressed document bytes
│ ├── <aa>/<sha256>.zst # managed compressed loose representation
│ └── tmp/ # staging for in-flight writes
├── email-pdf-spool/ # isolated email PDF input/output staging
├── logs/ # JSON logs from background daemons
├── web-launch/ # owner-private browser authentication handoff
├── web-downloads/ # private, temporary verified browser downloads
├── telemetry-install.json # anonymous telemetry install ID (with its .lock); created unless telemetry is turned off, kept if it is later turned off
├── telemetry-screen-views.json # daily screen claims; created only while telemetry is on
├── telemetry-tui-state.json # daily TUI receipt and accepted screens; with its .lock
├── config.toml # optional; see below
├── lane-controls.json # local job pause and concurrency settings
├── vault.lock # advisory lock, held by a daemon or target restore
└── daemon.<pid>.json # runtime record of a live daemon
docbank.db holds the local catalog, and blobs/ holds the built-in primary
store. A .zst file contains compressed content. Hashes and document sizes
always describe the decoded bytes. Docbank may compress new writes when the
savings justify it, but it reads existing raw files without converting them.
Back up config.toml separately if you customize it. It can contain an
api_key, filesystem paths, S3 coordinates, and credential-profile names.
vault.lock, daemon.<pid>.json, web-launch/, and web-downloads/ coordinate
running processes. You can omit them and lane-controls.json from backups. Delete them only when no
daemon or restore is running. docbank daemon stop removes its own runtime
record on graceful shutdown.
Deleting telemetry-install.json while the daemon is stopped gives the vault a new
anonymous install ID.
Use docbank backup create to capture every retained blob from a verified
location, including content held only in a secondary store. The resulting
backup can restore without recreating the original store layout.
A stopped copy of docbank.db and blobs/ is complete only when the primary
is an authorized location for every retained blob. Copying config.toml saves
secondary-store coordinates, but does not copy their content. Stop the daemon
before taking a filesystem snapshot. See
Vault lifecycle.
Docbank also keeps persistent per-user coordination files under
~/.local/state/docbank/target-locks, using the home directory from the
operating-system account record. They contain no document data, but do not
delete them. Daemons and restores use the files' stable identities to exclude
overlapping vault trees, including simultaneous restores whose target trees
overlap. They also use them to serialize daemon launch before the launcher
owns or creates the vault root.
Warning
Don't edit or prune blobs/ or a secondary namespace by hand. The
database authorizes physical files, including files for prior document
versions. To reclaim space, use docbank trash empty --run,
docbank vault gc --run, and (for dead packed payload) docbank storage repack.
To check integrity, use docbank vault verify.
config.toml¶
docbank mcp --transport http and docbank web skip unrelated policy and
daemon-only environment overrides, whether or not a daemon is running.
MCP reads the whole [mcp] table and its named credential binding; web reads
the whole [web] table. Both launchers check the types of every setting in
those tables. For example, an invalid session_lifetime or a public_origin
with the wrong type stops the web launcher even with a healthy daemon running.
Both launchers reject TOML syntax errors anywhere in the file, but reject
unknown keys and bad values (for example enabled = 'yes') only in the sections
they read. The daemon checks the whole file when it starts.
If no compatible daemon runs, they start one. At startup, including explicit
docbank daemon run / daemon start, the daemon validates the whole
$DOCBANK_HOME/config.toml file and inherits the shell's environment.
Invalid policy reports daemon config invalid: followed by the section and
reason. Data commands never read the file; they use the daemon's startup
settings and start a daemon if needed.
The file is optional. Nonempty environment settings override the
supported startup fields after TOML is loaded. Empty values preserve TOML,
and overrides are never written back. DOCBANK_HOME selects the vault.
Named credential bindings read their configured environment variables. MCP
bindings also accept mounted files through corresponding _FILE variables.
Backup commands
can override their configured repository with --repo. The daemon treats an
unrecognized key as a typo and rejects it at startup instead of ignoring it.
# ~/.docbank/config.toml — optional, defaults shown
[server]
bind_addr = "127.0.0.1"
api_port = 0 # 0 = ephemeral; clients discover the real port
# from the runtime record
api_key = "" # empty = ephemeral per-run key (loopback only)
allowed_hosts = [] # additional Host names, optionally with a port
idle_timeout = "30m" # background daemons only; "0" = never
[web]
enabled = true
base_path = "" # empty = root; e.g. "/archive" (no trailing slash)
public_origin = "" # empty = loopback web origin; set = 32+ char api_key
allowed_hosts = [] # extra exact host[:port] authorities; needs public_origin
trust_private_network = false # explicit trust for non-loopback HTTP
session_lifetime = "24h" # key-login lifetime, 1m..2160h; 0 = 24h
[mcp.http]
# enabled = true # unset = hosted for a loopback API once the bearer resolves
port = 0 # 0 = serve /mcp on the API port; otherwise a loopback port
credential_binding = "" # empty = HTTP MCP cannot start without an env binding
allowed_hosts = [] # additional MCP HTTP Host names, optionally with ports
[backup]
repo = "" # no implicit repository; set a path or pass --repo
zstd_level = 0 # 0 = Kit default; otherwise 1-19
interval = "0" # disabled; for example, "24h"
keep_last = 0 # choose a positive retained count before enabling
[storage]
pack_interval = "0" # disabled; for example, "1h"
pack_max_bytes = 268435456 # 256 MiB soft raw-byte budget per run
[[watch]]
name = "agent-sessions"
source = "~/agent-sessions"
destination = "/archives/agents"
tags = ["receipts"] # optional; first run: docbank tag create receipts
settle_time = "30s"
minimum_age = "168h" # optional; 7 days since source modification
scan_interval = "5s"
capture_on_change = false # opt in to prompt reads for working files
exclude = [".DS_Store", "cache/"]
exclude_patterns = [".syncthing.*.tmp", "*.sync-conflict-*"]
bind_addr— the interface the API listens on. Defaults to loopback. An explicit non-loopback IP, including a wildcard, requires a configuredapi_key. This opts into plain HTTP on the selected network; use a trusted network, encrypted tunnel, or HTTPS proxy. See Bind validation.allowed_hosts— additional accepted HTTP Host values. Use an IP or ASCII DNS name, optionally with a port, such asdocbank:8485. An entry without a port permits that name on any port. Loopback hosts, the concrete bind IP, and the daemon's dedicated browser origin are also accepted. Wildcard bind addresses do not permit arbitrary Host names. URLs, wildcard names, zero ports, and IPv6 zone identifiers are rejected.api_port:0picks an ephemeral port. The CLI does not need to know it in advance, because it discovers a loopback endpoint from the daemon's runtime record. A concrete non-loopback bind adds a separate ephemeral loopback listener for local CLI and MCP clients. Both listeners enforce the same authentication and server-path import rules. The record'snetwork_addressmetadata carries the concrete network endpoint and its assigned port. Use a fixed port for remote clients that cannot read the record.api_key: the daemon checksX-Api-KeyorAuthorization: Beareron every authenticated request. An empty setting makes the daemon generate a key at startup and publish it to same-user clients in the runtime record. Set a fixed key when a client cannot read that record, such as a client using an SSH tunnel from another machine.idle_timeout: how long a background daemon waits without requests before exiting on its own."0"disables idle shutdown. Foregrounddocbank daemon runignores this and never idles out. A daemon hosting MCP HTTP also never idles out.[web] enabled: serves the embedded web application.docbank webstarts or reconnects to the compatible daemon and opens an authenticated browser session on a fresh per-daemon loopback origin, independent of a configuredapi_port. Disabling it 404s/,/searches,/productions,/imports,/trash,/photos,/photos/people,/photos/map,/photos/map/{set_id},/photos/albums, canonical/photos/albums/{id}, and/assets/. The API and/docsare unaffected. See Web application.[web] base_path: mounts browser pages, assets, and API requests beneath a path such as/archive. Empty means/. Use ASCII letters, digits,-,.,_, and~in nonempty segments; omit the trailing slash. Dot segments and reserved API prefixes such as/api,/health, and/docsare rejected. The CLI retains its root API endpoints. See proxy subpaths.[mcp.http] enabled: hosts read-only MCP HTTP in the daemon. When unset, the daemon hosts it if the API binds loopback,portis unset, and the MCP bearer resolves in the daemon's environment; otherwise it logs why and starts without MCP.truemakes every daemon start need the bearer, including automatic startup from a CLI command whose environment lacks it.falsenever reads the bearer.DOCBANK_MCP_HTTP_ENABLEDoverrides TOML.[mcp.http] port:0, or the API port, serves MCP at/mcpon the API listener, including a network API listener. Any other port binds a separate listener on loopback.DOCBANK_MCP_HTTP_PORToverrides TOML. Standalonedocbank mcp --transport httpuses only its own--listenflag.[mcp.http] credential_binding: names the separate inbound credential used by both daemon-hosted MCP HTTP anddocbank mcp --transport http. An empty value leaves stdio available but makes HTTP startup fail unless an environment binding is selected. See MCP HTTP credential.[mcp.http] allowed_hosts: additional accepted MCP HTTP authorities. See MCP network access.[backup] repo: default snapshot repository used when a backup command or API request omitsrepo.~/...expands against the daemon user's home. A relative path is resolved beneath$DOCBANK_HOME. Keep the repository outside the live vault in normal deployments.[backup] zstd_level: repository compression level.0uses Kit's default. Other values must be between1and19.[backup] interval: schedules captures at this interval."0"disables the schedule. An enabled schedule requires a configuredrepoand a positivekeep_last. Values must be nonnegative; enabled intervals must be at least one minute. Adocbank backup schedule set intervaloverride takes precedence over this value, anddocbank backup schedule reset intervalreturns control toconfig.toml.[backup] keep_last: number of scheduled snapshots to retain after each capture. Values must be nonnegative. Manual snapshots remain outside this policy.docbank backup schedule set keep_lastoverrides it at runtime.[storage] pack_interval: schedules non-destructive packing of authorized loose blobs."0"disables the schedule. A configured schedule runs once when the daemon starts and then at this interval.[storage] pack_max_bytes: soft raw-byte budget for each scheduled run. It must be positive whenpack_intervalis enabled. Remaining loose content waits for a later run.
Restart the daemon after changing backup scheduling configuration. See Schedule backups for initialization, retention, scheduled tag rules, retries, and stale warnings.
Scheduled packing is visible as the storage:pack job and keeps an auto-started
daemon alive so the schedule can run. It uses the same maintenance gate
as docbank storage pack: ordinary mutations may briefly receive
maintenance_busy and can retry. Each scheduled pass requests cancellation at
pack_interval and releases the gate when the pass returns. Remaining indexed
loose content is retried on the next pass. Work that ignores context can delay
gate release. Set pack_interval comfortably above the time needed to build
and seal one pack so each pass can make progress. Repeated
automatic packing canceled at interval; retrying warnings can indicate that
the interval is too short. Automatic packing does not delete logical content
and does not run GC or repack. An operator still has to request those
reclamation operations.
Kata connection¶
The optional [integrations.kata] section connects document citations to a
Kata project. It is disabled by default and validates only when a Kata
operation uses it. See Cite documents in Kata
for fields, credential sources and endpoint restrictions.
MCP HTTP credential¶
The MCP HTTP listener requires a named credential binding. Configuration keeps
only the environment-variable name. Supply the bearer to the process hosting MCP
through that variable or its _FILE counterpart:
[mcp.http]
credential_binding = "credential:mcp-http"
[credential_bindings.mcp-http]
environment_variable = "DOCBANK_MCP_HTTP_TOKEN"
Binding names start with a lowercase letter, contain only lowercase letters,
digits, _, or -, and are capped at 63 characters. The configured
environment-variable name must use ordinary shell-variable syntax. The bearer
is non-empty, contains no spaces or control bytes, and is capped at 4,096
bytes.
For startup without TOML, set DOCBANK_MCP_HTTP_TOKEN or
DOCBANK_MCP_HTTP_TOKEN_FILE. This selects a process-local named binding and
overrides [mcp.http] credential_binding. The daemon resolves its value only
when MCP hosting is enabled explicitly or by default. It does not replace existing entries in [credential_bindings]; when
the preferred internal name is already used, Docbank chooses an unused name.
See MCP network access.
Docbank resolves the bearer once when the MCP HTTP listener starts. Restart
the hosting daemon or standalone MCP process to rotate it. The bearer must
differ from [server] api_key and from an ephemeral daemon key published in the runtime
record. HTTP startup checks the effective daemon key and refuses a reused
value. Standalone MCP keeps that exclusion active when it reacquires a
restarted daemon. Daemon-hosted MCP always uses its own daemon API.
There is no raw bearer field in config.toml, command-line token flag, URL
credential, or runtime-record publication. Supply the environment variable to
the hosting process through an owner-controlled secret or process manager. This is a
fixed bearer, not OAuth. See Model Context Protocol for
the complete transport boundary.
Watched inboxes¶
Each [[watch]] entry makes the daemon scan one local directory recursively.
The default settled mode polls at scan_interval. Set
capture_on_change = true for prompt reads after filesystem notifications,
with periodic reconciliation at the same interval.
source must be absolute or begin with ~/. destination is an absolute path
in Docbank's virtual tree. Symlinks and other non-regular entries inside the
source are ignored. exclude stays a literal name-or-relative-path rule,
including names containing *, ?, or [. Add exclude_patterns for glob
rules with the same syntax as docbank document add:
a pattern without / matches basenames at any depth; one with / matches
paths relative to the source root. Use / separators on every platform.
Matching is case-sensitive; * and ? do not cross /, and ** is not
recursive. A match in either list skips the entry. Matching directories are
pruned during both startup checks and scanning.
For a Syncthing inbox, for example:
[[watch]]
name = "synced-notes"
source = "~/synced-notes"
destination = "/notes"
exclude = [".stversions", ".git"]
exclude_patterns = [".syncthing.*.tmp", "*.sync-conflict-*"]
First run docbank tag create receipts and docbank tag create 2026. Add tags = ["receipts", "2026"] to assign existing tags when a document first arrives. Docbank commits the document and its tags together. A missing tag holds new imports while edits to existing documents keep recording and preserve manual tag changes. Watch status shows the tag error separately from the runner's error. Create the tag to resume imports on the next scan. Renaming a configured tag requires updating the watch configuration.
Empty, absolute, parent-traversal, malformed, and backslash-containing glob rules fail watcher or folder-scanner construction with the watch name. Restart the daemon after changing watch rules.
Traversal stays on the source's filesystem mount. It does not enter symlinks,
Windows directory reparse points, or nested mounts. Configure another
[[watch]] entry when content on a separate mounted filesystem should also be
imported. This boundary prevents an aliased vault directory from becoming its
own input.
The daemon checks each file in this order:
- In settled mode, observe the same filesystem identity, size, modification
time, and native change timestamp when available for the complete
settle_time; fall back to size and modification time when it is absent. Prompt mode skips only this delay. - Require the source modification time to satisfy
minimum_age, if enabled. - Read the file, then check that the source path still names the same object. If it changed, do not accept the read as a Docbank node.
For example, minimum_age = "168h" requires a file to be at least seven days
old and, in settled mode, unchanged for the complete settle window. The default
"0s" disables this age check. The source timestamp still applies after a
daemon restart, but only settled mode starts a new in-memory settle window. This helps with sessions or
recordings that pause before they finish.
scan_interval controls periodic observation frequency. Zero settle and scan
values select the defaults shown above. capture_on_change defaults to
false; prompt mode still uses the configured positive settle_time value
for configuration compatibility, but it does not delay admission. Any other value must be positive.
minimum_age must not be negative.
Minimum age is a conservative time policy, not proof that the producing application closed a file. Choose a window appropriate to the producer, or watch a directory that receives only completed files when the producer offers a close/rename handoff.
A file that disappears during observation, or is still held exclusively by a Windows producer, is treated as unsettled and retried from a fresh window. If a retryable observation failure, such as a file another program holds open, prevents a complete source inventory, the daemon still imports readable settled files. It defers only work that needs the whole tree: rename continuity, new paths that share native identity with an accepted source the scan did not see, and forgetting sources it did not see. The watch job stays running with a visible error, and the daemon logs the incomplete-inventory block once. A complete scan resumes deferred work and clears that signal; an active notification failure remains visible. A symlink replacing a known source file is skipped without following its target. A directory replacing that file uses normal confined traversal and exact-destination rules. The archived file and durable cursor remain. An occupied old path never authorizes a rename join. A symlink hiding previously observed descendants, a known path becoming another nonregular file, or a known path crossing a filesystem boundary skips that path and restarts the settle window for files below it. Reconciliation is deferred the same way, and the path appears in the watch job error until it recovers. Other permission or native observation failures stop the watch with a job error.
Docbank identifies each watched source by (name, relative source path).
Keep the watch name when moving its local source root. Later content changes
then add versions to the same Docbank node, even if someone moved that node in
the virtual tree.
A live, unambiguous source rename can move that watch cursor to the current relative path while its original provenance and archived virtual location stay unchanged. The daemon needs unique native object and birth evidence from a complete scan; see watched inboxes for the limits. Each current cursor owns one Docbank node. Deleting a source file does not delete its Docbank node.
After each complete scan, Docbank records when a cursor's source was first observed gone. The deepest directory listed on its path must lack it, so a deleted or renamed folder marks every file below it, and a directory or symlink at the old filename counts as gone. A folder that still exists but was not listed, such as a symlink, skipped subtree, excluded path, or filesystem boundary, leaves the files below it unchanged, as do uncertain rename candidates and incomplete scans. A regular file's return or a successful live rename clears the mark. Trashed documents are observed too, without restoring them.
These observations stay local to storage and are not exported in metadata.
Startup clears marks for watches no longer configured. Search and the document
catalog can omit marked documents with source_present; defaults include
them, and documents owned by push are always included by this filter.
Docbank separately remembers the last bytes accepted from each source. If a person edits or reverts the Docbank node while the source stays unchanged, a daemon restart does not overwrite that working version. Only a later byte change at the watched source appends another version.
Set profile = "mistral-ocr" in a [[watch]] entry to queue its configured
processing profile's OCR or text-extraction stage after each added or updated
version. The profile must include a rendition that accepts original documents;
photo vision and embedding-only profiles aren't supported here. Omit profile
to use only baseline plain-text extraction.
The rendition stage needs current consent for that profile configuration.
Without it, files still import with baseline plain-text extraction, but the
configured rendition stays unprocessed. Grant consent with docbank processing build --consent
for the configured profile to process subsequent imports. docbank watch list and
the web app's All workers table show the profile and whether consent is required,
expired, or revoked. Scanner errors remain separate. Unsupported files are skipped.
An unexpected admission failure is logged once. The document stays imported
and available for manual processing with docbank processing build.
A newer save can supersede older queued work.
Consent skips and missing or stale document authority end admission quietly.
Imports stay accepted. A daemon stop between import and queue admission can leave
a version unprocessed; use explicit processing for that version.
Scheduling happens only at import. Granting consent later or adding a profile doesn't process older imports; use explicit processing for those documents. Unchanged rescans add no work. The existing durable workers execute the queued rendition; embedding stages require explicit profile execution.
Watchers run as jobs named watch:<name>. docbank watch list and
GET /api/v1/watches pair each runner's state with its effective source,
destination, tags, capture mode (settled or prompt), settle window,
minimum source age, scan interval, and exclusion policy. JSON reports
capture_on_change as a boolean. docbank watch list shows a waiting watcher
as idle and an ingesting watcher as running. EXCLUDES counts both literal
and glob rules. Use --json when an agent needs the separate exclude and
exclude_patterns lists. docbank jobs and GET /api/v1/jobs remain the
all-task view. A permanent source, destination, or read failure leaves the named
job in the failed state and records the reason.
Restart the daemon after correcting the problem.
Per-file successes are written to the daemon log. Prompt notifications are
best effort: coalesced events and slow ingestion can miss intervening writes,
and readable intermediate content may be captured. The scanner still enforces
the same root, exclusion, symlink, mount, stable-read, and mutation boundaries.
Notification hints use at most 1,024 pending paths; overflow requests full
reconciliation. Native subscriptions use at most 32,768 entry units, one plus
the current immediate entry count for each admitted directory. That count
covers handles a macOS backend may open for children, though the OS can fail
earlier. A backend or budget failure closes all subscriptions and visibly
degrades to periodic scans until restart; a directory vanished during
subscription is retried once at the next periodic scan. The watch job and log
report the failure and any restoration.
A configured watch keeps a
background daemon alive regardless of idle_timeout.
Inspect the source facts recorded for an imported file with
docbank document provenance <path-or-id> or GET /api/v1/nodes/{id}/provenance.
Provenance is distinct from job status. It survives daemon restarts and
records where successfully ingested content came from, while docbank jobs
describes only the current daemon run.
Watched inboxes never modify or delete their source files. Configuration is
machine-local and is not part of metadata-v1 backup/restore. Portable metadata
does preserve the watch name, relative path, node mapping, and last accepted
content identity. The watcher does not pack content itself. Configure
[storage] pack_interval when accumulated loose content should be packed
automatically. GC and repack still run only on request.
Photo descriptions¶
Photo descriptions send the cached stripped 512px grid JPEG to an OpenAI-compatible POST /v1/chat/completions endpoint. The endpoint must support image input and max_completion_tokens. The preview has normalized orientation and color and fits the 512px input profile. max_document_bytes limits the preview upload, and the provider rejects any preview over 4 MiB however high you set it; max_response_bytes is at most 1 MiB. The original can be larger. Vision profiles require every retain_* flag to be false.
The example below uses a named environment credential and the shared transport settings. Use a root origin, a positive request timeout of at most ten minutes, and HTTPS for hosted_provider. Profiles sharing a descriptor must share endpoint, credential, and runtime settings.
Compute both fingerprints with the release binary, using the exact model, trust boundary, endpoint, and deployment fingerprint for your configuration. This command runs locally without a daemon or provider credential:
docbank processing vision-fingerprints --model vision-model --trust-boundary operator_network --endpoint http://127.0.0.1:8080 --deployment-fingerprint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Copy the printed descriptor_fingerprint and disclosure_fingerprint assignments into the tables below, then add them to config.toml and set DOCBANK_VISION_KEY in the daemon's environment. Recompute these pinned fingerprints when the vision prompt changes, including an upgrade that adds orientation support, then review the changed processing plan and grant fresh consent. The other fingerprints identify synthetic policies; use stable identities for your policies and change them when those policies change.
[credential_bindings.vision]
environment_variable = "DOCBANK_VISION_KEY"
[rendition_profiles.vision]
adapter_contract = "docbank-compatible-vision/v1"
model = "vision-model"
descriptor_id = "compatible-vision.describe-v1"
descriptor_fingerprint = "<descriptor_fingerprint>"
disclosure_fingerprint = "<disclosure_fingerprint>"
deployment_fingerprint = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
authorization_fingerprint = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
upload_options_fingerprint = "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
credential_binding = "credential:vision"
trust_boundary = "operator_network"
disclose_filename = false
requested_artifacts = ["structured_evidence"]
max_document_bytes = 4194304
max_response_bytes = 1048576
max_units = 1
[rendition_profiles.vision.runtime]
endpoint = "http://127.0.0.1:8080"
request_timeout = "2m"
allowed_cidrs = ["127.0.0.0/8"]
proxy_mode = "disabled"
connect_timeout = "10s"
keep_alive = "30s"
tls_handshake_timeout = "10s"
[retrieval_profiles.photos]
lexical_limit = 40
vector_limit = 60
[processing_profiles.photos]
rendition = "vision"
retrieval = "photos"
trust_boundary = "operator_network"
attachment_policy_fingerprint = "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
completeness_fingerprint = "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
consent_fingerprint = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
lexical_segmenter_fingerprint = "1111111111111111111111111111111111111111111111111111111111111111"
normalizer_fingerprint = "2222222222222222222222222222222222222222222222222222222222222222"
sanitizer_fingerprint = "3333333333333333333333333333333333333333333333333333333333333333"
max_document_chars = 100000
max_segment_runes = 2000
max_unit_runes = 100000
retain_provider_markdown = false
retain_sanitized_markdown = false
retain_typed_artifacts = false
Automatic description picks the profile with the lexicographically smallest name among those with active consent whose provider passes its probe. If the probe for the smallest name fails, the next consented name receives the photos. Docbank checks readiness on demand when a description starts. Status output does not list it. Automatic work leaves settled descriptions alone.
A consented explicit build under another provider fingerprint can refresh rotation even when the photo already has a description. Pending and accepted caption and tag decisions stay settled. After a dismissal, an explicit build with a different provider fingerprint can offer replacement text along with the new rotation answer.
Automatic face detection¶
Detection is off until you add a separate vision rendition profile with descriptor_id = "compatible-vision.detect-faces-v1" and a processing profile that selects it. Reuse the photo-description example above, with separate profile names, and compute its fingerprints with the detection task:
docbank processing vision-fingerprints --task compatible-vision.detect-faces-v1 --model vision-model --trust-boundary operator_network --endpoint http://127.0.0.1:8080 --deployment-fingerprint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Pin the printed fingerprints in that rendition profile and grant consent for its processing profile by reviewing docbank processing plan <photo-path> --profile <detection-profile>, then running docbank processing build <photo-path> --profile <detection-profile> --plan-fingerprint <reviewed-sha256> --consent. Consent for descriptions alone does not enable detection. Both tasks send the same stripped grid preview through the vision adapter, with one request per task. Each task selects the first ready, consented processing profile by name.
Detection scans visible, included display photos with ready previews. A completed scan, including one with zero faces, prevents automatic and explicit requests from rescanning that version under the same request fingerprint. Changing the model, prompt, endpoint, deployment, or another fingerprinted request policy requires fresh consent and permits a new scan. Backups preserve faces and their measurements, while leaving scan completion behind; restored photos can reconcile after fresh consent, with one new provider call per photo.
Document conversion with Docling¶
The daemon can send an original PDF, PPTX, XLSX, plain text, Markdown, PNG,
or JPEG to the Docling Serve deployment you run, then retain searchable
Markdown. Add a rendition profile with
adapter_contract = "docbank-docling-document/v1",
descriptor_id = "docling.serve-v1", and
requested_artifacts = ["provider_markdown", "structured_evidence"]. Select it
from a processing profile with retain_sanitized_markdown = true. No conversion
runs on import: review processing plan, then grant consent with
processing build.
Use the same named credential_binding = "credential:<name>" and
runtime fields as Docling ASR. The named binding
must exist even for a deployment that normally accepts anonymous requests.
Its environment variable is read only when a request is sent. A missing secret
fails that attempt without sending the document. The endpoint must be an
absolute root origin; redirects and ambient proxies are refused.
HTTP requires trust_boundary = "operator_network". Every allowed_cidrs
prefix at that boundary must fit entirely inside a loopback, private, or
shared network: 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12,
192.168.0.0/16, 100.64.0.0/10, ::1/128, or fc00::/7. A public or
broader prefix is rejected. Hosted deployments use hosted_provider, require
HTTPS, and may allow explicit public networks. Optional spki_sha256 pins
require HTTPS and keep normal certificate verification.
max_document_bytes must be positive and at most 1 GiB;
max_response_bytes must be positive and at most 512 MiB. Set max_units to
cap the PDF pages, presentation slides, or workbook sheets found during local
inspection. A source above that limit is rejected before upload. The
provider_markdown artifact role is required for bounded provider text.
structured_evidence is optional for retained PDF page JSON. Document
conversion has no transcript limit; omit max_transcript_chars. Request,
total, poll, and transport timeouts use the ASR bounds below.
The descriptor is fixed by the document adapter and trust boundary. Go callers
can obtain it with docling.DocumentDescriptor(boundary). The document policy
fingerprint is SHA-256 of the UTF-8 contract string
docbank-docling-document/v1. The descriptor declares Markdown and structured
results, the structured evidence artifact role, and original-file capabilities
for PDF, DOCX, PPTX, XLSX, plain text, Markdown, PNG, and JPEG. Its fingerprint
includes those capabilities and the trust boundary. DOCX remains ineligible
because the current local inspector cannot bound it. HTML, TIFF, legacy Office
formats, audio, and video are outside this daemon document profile. Docling's
format support cannot override local inspection.
Set descriptor_fingerprint to the value for your trust boundary:
| Trust boundary | Descriptor fingerprint |
|---|---|
operator_network |
21bcb9a189ebd0c285637a3d0b7bb1f29310080b997a0c043ae5dce05c908b4f |
hosted_provider |
f5603a0b0cf6ea91a65a141323a025eb205bfb3278f2baffa46e893ebdff0357 |
disclosure_fingerprint uses the same NUL-separated formula and Python command
as ASR below, with the document adapter contract and descriptor. Go callers use
docling.DocumentDisclosureFingerprint(descriptor, endpoint, deployment).
The plan identifies the document adapter, Docling provider, endpoint, deployment,
filename disclosure, and retained artifact roles before consent. An endpoint,
deployment, or descriptor mismatch prevents startup. Profiles sharing a
descriptor must agree on all effective runtime and credential settings.
A runtime without a selecting processing profile stays staged.
PDF results can preserve exact page evidence, including blank pages. Other
formats use bounded Markdown with explicitly degraded provenance. The existing
upload authorization, sanitization, publication, and lexical indexing checks
still apply. Original bytes remain unchanged. After changing the descriptor,
queued work fails with stale_authority; plan and consent to the changed profile
before retrying.
Document OCR with Mistral¶
The daemon sends PDFs to Mistral OCR and retains searchable Markdown through
its processing plan and consent flow. Use the portable rendition and selecting
processing-profile fields from Docling document conversion,
with adapter_contract = "docbank-mistral-ocr/v1", descriptor_id = "mistral.ocr-v1",
trust_boundary = "hosted_provider", and requested_artifacts = ["provider_markdown"].
Images and other formats are outside this daemon profile.
| Runtime field | Meaning |
|---|---|
endpoint |
Exactly https://api.eu.mistral.ai. |
capability_manifest |
Complete authenticated manifest with PDF upload authority. Relative paths resolve against the config root. |
request_timeout |
Positive per-attempt limit, at most ten minutes. |
allowed_cidrs, proxy_mode |
Non-empty provider IP allowlist and proxy_mode = "disabled". |
spki_sha256 |
Optional lowercase SHA-256 SPKI pins for the provider certificate. |
connect_timeout, keep_alive, tls_handshake_timeout |
Positive transport limits, each at most five minutes. |
Leave total_timeout, poll_interval, max_poll_attempts, and max_transcript_chars
at zero. Bind the credential through credential_bindings; a missing secret causes
an authentication provider error and a terminal job failure. The client makes
at most four attempts, with up to thirty seconds between attempts, all bounded by
the daemon's ten-minute authorization window after inspection and spooling.
Create a directory containing five synthetic native seed files named doc, ppt, xls, numbers, and msg. Use valid files in those formats with no private content. Each seed's extractable text must contain its exact sentinel phrase from mistral.ProbeFixtureSentinel, or the probe records sentinel_missing:
| Seed | Sentinel phrase |
|---|---|
doc |
docbank probe doc cedar 7319 |
ppt |
docbank probe ppt cedar 7319 |
xls |
docbank probe xls cedar 7319 |
numbers |
docbank probe numbers cedar 7319 |
msg |
docbank probe msg cedar 7319 |
Run the probe with the selecting processing profile. It can take several minutes:
The command runs locally, without starting the daemon. It uses the profile's policy, credential binding, and egress settings, sends the generated fixture matrix to Mistral, and saves the manifest at the configured capability_manifest path only if it grants the PDF authority the daemon requires. It prints each format's result even when that check fails. Pass --overwrite to replace an existing manifest after a successful probe. After saving, it prints the descriptor_fingerprint and disclosure_fingerprint for the configured deployment and says whether the rendition profile already uses them. Set any that differ, then restart the daemon. Interrupting the probe removes its temporary files and leaves the existing manifest unchanged.
Header and footer extraction stay off, so their text stays in Markdown. The daemon pins standard
retention, default-opt-out training, EU region, mistral.DefaultModel, and a
normalization identity of 25,000,000 characters. max_units accepts 3 to 5,000,
subject to manifest authority; document and response limits are 500 MiB and 512 MiB.
The probe prints both fingerprints, and startup reports the expected
descriptor_fingerprint on drift. You can also compute disclosure_fingerprint
with the Python disclosure command or Go's
mistral.DisclosureFingerprint. Re-probe and recompute both fingerprints
after a model re-pin. The plan shows the adapter, endpoint, model, and deployment
before consent. Profiles sharing a descriptor must agree on runtime and credential
settings. A runtime without a selecting processing profile stays staged.
Start with this complete configuration. The repeated-digit fingerprints are
placeholders for your policy identities. Set the deployment identity, run the
probe, and replace descriptor_fingerprint and disclosure_fingerprint with the
values it prints.
For allowed_cidrs, use the provider's published address ranges if available,
or resolve api.eu.mistral.ai from the daemon host and allow each approved IPv4
address as /32 and IPv6 address as /128. Every resolved address must fit the
allowlist. Review and update it when the provider changes addresses. The example
uses a documentation-only network; replace it before running the daemon.
[credential_bindings.mistral]
environment_variable = "MISTRAL_API_KEY"
[rendition_profiles.ocr]
adapter_contract = "docbank-mistral-ocr/v1"
descriptor_id = "mistral.ocr-v1"
descriptor_fingerprint = "0000000000000000000000000000000000000000000000000000000000000000"
authorization_fingerprint = "1111111111111111111111111111111111111111111111111111111111111111"
credential_binding = "credential:mistral"
deployment_fingerprint = "2222222222222222222222222222222222222222222222222222222222222222"
disclosure_fingerprint = "3333333333333333333333333333333333333333333333333333333333333333"
upload_options_fingerprint = "4444444444444444444444444444444444444444444444444444444444444444"
trust_boundary = "hosted_provider"
requested_artifacts = ["provider_markdown"]
max_document_bytes = 1048576
max_response_bytes = 1048576
max_units = 100
[rendition_profiles.ocr.runtime]
endpoint = "https://api.eu.mistral.ai"
capability_manifest = "mistral-capabilities.json"
request_timeout = "2m"
allowed_cidrs = ["192.0.2.0/24"]
proxy_mode = "disabled"
connect_timeout = "10s"
keep_alive = "30s"
tls_handshake_timeout = "10s"
[retrieval_profiles.ocr]
lexical_limit = 20
vector_limit = 20
[processing_profiles.ocr]
rendition = "ocr"
retrieval = "ocr"
attachment_policy_fingerprint = "5555555555555555555555555555555555555555555555555555555555555555"
completeness_fingerprint = "6666666666666666666666666666666666666666666666666666666666666666"
consent_fingerprint = "7777777777777777777777777777777777777777777777777777777777777777"
lexical_segmenter_fingerprint = "8888888888888888888888888888888888888888888888888888888888888888"
normalizer_fingerprint = "9999999999999999999999999999999999999999999999999999999999999999"
sanitizer_fingerprint = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
max_document_chars = 100000
max_segment_runes = 2000
max_unit_runes = 100000
retain_provider_markdown = true
retain_sanitized_markdown = true
trust_boundary = "vault-primary"
Set MISTRAL_API_KEY in the daemon's environment, then use
docbank processing plan /documents/report.pdf --profile ocr to review the
upload before granting consent with docbank processing build.
Supplied audio transcription¶
The daemon can transcribe supplied WAV and MP3 files through a configured Docling Serve deployment. The profile's descriptor, artifact policy, filename disclosure, and trust boundary are portable. The endpoint, transport policy, and secret binding stay local to the daemon.
Use adapter_contract = "docbank-docling-asr/v1" and set
credential_binding = "credential:<name>" on the rendition profile. Its
runtime section requires endpoint, request_timeout, total_timeout,
poll_interval, max_poll_attempts, allowed_cidrs, proxy_mode, and the
transport timeout fields. spki_sha256 can pin the deployment certificate.
The endpoint must be a root origin. allowed_cidrs must contain at least one
network, and proxy_mode must be "disabled". HTTP endpoints require the
operator_network trust boundary, and certificate pins require HTTPS. At the
operator_network boundary, every allowed_cidrs prefix must be loopback,
private, or shared, as for
document conversion. An
explicit port must be between 1 and 65535. Redirects are not followed.
Set a positive max_transcript_chars on the rendition profile. This limit
caps the generated transcript and is part of the descriptor's policy
fingerprint. Each processing profile keeps its own max_document_chars limit
for subsequent processing. A runtime with no selecting profile remains staged
and isn't executable.
After a restart, queued work whose descriptor is no longer configured fails
with stale_authority. Plan the work and grant consent for the changed profile
before retrying it.
For this adapter, disclosure_fingerprint binds the descriptor, endpoint, and
deployment fingerprint. Recompute it when the endpoint or deployment changes.
The daemon rejects a mismatched binding before it starts provider work.
For audio, Go applications can use docling.ASRDisclosureFingerprint from
go.kenn.io/docbank/document/docling. Operators can compute the same value
from their config with Python 3.11 or later. Replace the path and profile name
in this command, then copy the output into that profile's
disclosure_fingerprint:
python3 - /path/to/config.toml asr <<'PY'
import hashlib
import sys
import tomllib
with open(sys.argv[1], "rb") as source:
profile = tomllib.load(source)["rendition_profiles"][sys.argv[2]]
values = [profile["adapter_contract"], profile["descriptor_id"],
profile["descriptor_fingerprint"], profile["runtime"]["endpoint"],
profile["deployment_fingerprint"]]
print(hashlib.sha256("\0".join(values).encode()).hexdigest())
PY
The daemon registers one provider per descriptor fingerprint. Profiles with the same descriptor must use identical endpoint, credentials, and runtime settings. Two Docling deployments with the same descriptor cannot run together in one daemon. Conflicting settings prevent startup.
Set the source ceiling for retained audio under [media]:
[media]
max_source_bytes = 4294967296 # 4 GiB; the default and maximum
pdf_passwords_file = "pdf-passwords.txt" # optional; relative to the config root
pdf_passwords_file supplies passwords for locked PDFs sent to Docling or Mistral. The file must be a current-user-owned regular file with Unix mode 0400 or 0600, or a private protected Windows ACL. It may contain up to 16 KiB and 128 passwords. Put one password per line; blank lines are ignored, and spaces are preserved. Restart the daemon when first setting or changing this path. Edits to the file take effect on the next build. See Password-protected PDFs.
max_source_bytes accepts 1 through 4,294,967,296 bytes; zero selects the
default. The daemon uses this ceiling for media HTTP uploads, shared staging
reservations, original publication, and audio processing admission and worker
preparation. A smaller
processing-profile source limit still applies. Restart the daemon after changing
it. Lowering it fails queued processing for larger sources; raise it again and
retry that work. Embedded Go applications use ProcessingOptions.MediaMaxBytes; zero uses
the 4 GiB default.
This setting does not raise document inspection, image/video, transcript,
caption, or hosted-provider bounds. Audio retains its 24-hour duration and codec
qualification bounds. Remote MP4 video originals keep their 20 MiB limit.
Transcript and caption uploads and the built-in profiles' responses
keep their 16 MiB limits. A staging disk or quota failure releases the reservation,
removes the failed file, and returns HTTP 503 with media_staging_unavailable;
free disk space and retry. Running out of space while publishing the durable copy
returns the same error. Embedded callers can match
docbank.ErrMediaStagingUnavailable with errors.Is. The staging reservation
limits aggregate bytes, so one maximum-size source occupies the whole reservation
until its stage closes.
Processing plans for retained WAV, MP3, or M4A audio above 1 GiB may run beyond the
ordinary 60-second request deadline while the full source is verified. Client
cancellation and caller deadlines still apply.
The built-in supplied-transcript and supplied-captions profiles accept
4 GiB sources, which changes their profile fingerprints. After upgrading a vault
that used either profile:
- Consent granted to the earlier profile no longer applies. Plan and grant consent again before submitting or retrying supplied inputs.
- Work queued before the upgrade finishes, but its media operation is marked
failed. Retry it after granting consent. - Coverage reports and profile-name rendition lookups treat earlier supplied transcripts as uncovered until they are processed again. Transcript reads and lexical search still return the earlier evidence.
The daemon also registers two local media profiles. supplied-transcript
processes supplied WAV, MP3, and M4A transcript text as untimed evidence.
M4A requires audio-only AAC or ALAC; see the media input contract.
supplied-captions processes supplied SubRip captions for WAV, MP3, M4A, and MP4
originals as timed evidence. Both names are reserved for these built-in
profiles. A configured profile with either name prevents startup.
The daemon reads the credential from the named environment binding when the adapter sends a provider request. A missing secret fails that processing attempt but leaves supplied-media retention, plaintext processing, and the built-in supplied-transcript path available. Restart the daemon after changing the endpoint, transport policy, or environment binding.
| Runtime field | Meaning |
|---|---|
endpoint |
Absolute root Docling Serve origin. |
request_timeout, total_timeout |
Per-request and complete operation limits, each positive and at most 24 hours. |
poll_interval, max_poll_attempts |
Delay and count bounds for polling. The interval cannot exceed total_timeout, and attempts range from 1 to 10,000. |
allowed_cidrs, proxy_mode |
Non-empty IP network allowlist and proxy_mode = "disabled". At operator_network, only loopback, private, or shared prefixes are allowed. |
spki_sha256 |
Optional lowercase SHA-256 SPKI pins for the provider certificate; requires HTTPS. |
connect_timeout, keep_alive, tls_handshake_timeout |
Positive transport limits, each at most five minutes. |
Embedding workers and credentials¶
Moving an embedding endpoint or changing its timeout still requires the updated descriptor fingerprint and consent for the current profile. Docbank reuses compatible saved vectors after consent. An unchanged configuration keeps its existing vector space across upgrades. Legacy BGE-M3 and Qwen3 profiles may require recomputation on their first policy change because their old records omit deployment revisions.
The daemon runs retained embedding jobs for its configured OpenAI-compatible and Voyage runtimes. Other provider packages are available to Go applications. The daemon cannot run them.
An embedding is a numeric representation used to compare document meaning. Each provider binding publishes its own results. One provider's failure does not remove another binding's completed vectors.
Configuring a provider does not prepare inputs or apply a processing profile to new imports. A job requires all of the following:
- An existing input generation: the retained set of prepared provider inputs.
- A matching processing profile.
- A matching provider descriptor.
- Current consent to disclose the inputs to that provider.
After restore, the daemon recreates jobs from retained inputs once these requirements are met again.
[processing_profiles.<name>] selects embedding bindings by name in its
embeddings array. [embedding_profiles.<name>] defines each binding's model,
input kind, dimensions, formatters, compatibility identity, descriptor and
disclosure fingerprints, byte limits, and optional or required activation.
Chunk bindings also pin their tokenizer and chunk policy in .chunk. Use the
fingerprints from the provisioned profile and deployment. Arbitrary
fingerprints or an endpoint's model alias do not establish compatibility.
Text-service configuration¶
For OpenAI-compatible text services, prefer Kit's
[embedding_profiles.<name>.embedder] schema. Keep Docbank's pinned descriptor,
consent, input kind, byte limits, normalization, model-input contract and chunk
policy in the existing profile tables.
[embedding_profiles.semantic]
credential_binding = "credential:embedding-primary"
# The remaining pinned profile fields are also required.
[embedding_profiles.semantic.embedder]
base_url = "https://embedding.example.invalid/v1"
model = "provisioned-model"
dims = 768
fingerprint_salt = "deployment-v1"
batch_size = 8
timeout_seconds = 30
api_key = { env = "DOCBANK_EMBEDDING_PRIMARY_KEY" }
[embedding_profiles.semantic.runtime]
# Retain the provisioned egress policy and max_request_bytes.
# adapter_contract defaults to docbank-openai-compatible-embeddings/v1
# when embedder is present.
base_url ends in /v1 or /v1/embeddings. Public-IP HTTP endpoints are
rejected. Plaintext private-network endpoints require
trust_private_network = true. The existing CIDR and proxy controls still
apply. The fingerprint_salt records the configured model revision. Unless a
provider_revision_header is configured, it also supplies the deployment epoch.
The API key may be a literal string, { env = "NAME" }, or
{ file = "/absolute/path/to/private.key" }. Prefer environment or private-file
references. Kit requires credential files to be private, regular files owned by
the current user. File paths follow Kit's rules: ~/ expands to the daemon
user's home, and relative paths use its working directory. Sources are resolved
for each request. Startup does not read them. A missing secret becomes an
authorization failure when that provider is used. File changes take effect on
the next request. Environment changes require restarting the daemon.
Keep credential_binding as the portable name. The immutable profile records
that name, not the secret or its source. If api_key is unset, an existing
credential_bindings entry still supplies the secret. Without either source,
startup reports that the credential source is not configured. Never put secret
values in processing profiles, fingerprints, receipts, backups, or
source-controlled configuration.
Kit's default batch size is 32 and its default timeout is 30 seconds. When converting a legacy configuration, set both values to the existing limits instead of relying on those defaults. The same effective settings produce the same canonical identities and reuse existing generations. Changing the model, revision or input recipe still requires a matching pinned descriptor and profile.
This adapter keeps Docbank's document/query formatting and chunk preparation.
input_type_mode must be "none". Configure roles in model_input.
model_context_tokens and max_batch_tokens must remain zero. Nonzero values
are rejected because this adapter does not use Kit token packing. The
profile's normalization setting still decides validation: adopting Kit's
schema does not normalize returned vectors. unit_length requires the server
to return unit vectors; Docbank rejects squared norms that differ from one by
more than 1e-4.
Optional EmbeddingGemma 2 text recipe¶
Use the existing OpenAI-compatible adapter with a custom/v1 model-input
contract for optional EmbeddingGemma 2 text retrieval. The
Google model card
specifies native 768-dimensional output and separate search-query and document
prefixes. The recipe below targets Google's
pinned checkpoint,
google/embeddinggemma-2@914f7f89142e33e77833254d9c9b90c3cef7303b.
This is a fragment for a separately provisioned embedding profile. Retain its
credential binding, egress policy, input and response bounds, chunk policy,
descriptor ID, and formatter IDs. Set activation to optional if processing
may continue without these embeddings. Recompute the immutable descriptor,
authorization and disclosure fingerprints for the complete new profile;
copied fingerprints from another model will fail daemon startup. Select the
profile in a processing profile and review its processing plan before granting
consent. See document processing configuration and
the embedding runtime settings.
[embedding_profiles.semantic]
normalization = "unit_length"
compatibility_id = "embeddinggemma2/search/native768/v1"
[embedding_profiles.semantic.embedder]
base_url = "http://127.0.0.1:11434/v1"
model = "embeddinggemma2-text-f32-768-v1"
dims = 768
fingerprint_salt = "914f7f89142e33e77833254d9c9b90c3cef7303b-text-f32-mean-native768-v1"
input_type_mode = "none"
batch_size = 8
timeout_seconds = 30
[embedding_profiles.semantic.model_input]
profile = "custom/v1"
compatibility_id = "embeddinggemma2/search/native768/v1"
[embedding_profiles.semantic.model_input.document]
mode = "text"
template = "title: none | text: {{content}}"
[embedding_profiles.semantic.model_input.query]
mode = "text"
template = "task: search result | query: {{content}}"
The loopback endpoint and serving alias are examples. Provision the service
separately. Its operator must bind the alias and deployment epoch to the exact
weights, tokenizer, pooling, precision or quantization, and output-width
recipe. fingerprint_salt records that assertion in the immutable revision and
policy; it does not verify which weights the server loaded. Replace both the
alias and epoch when that recipe changes, then create a matching descriptor
and embedding generation. Keep the epoch equal to the resolved model revision,
or use the existing revision-header contract instead.
Docbank applies each template once and preserves its space before
{{content}}. The server must accept these already formatted strings without
adding prompts again. Require mean pooling including the prompts, L2-normalized
output, and bfloat16 or float32 activations, never float16. The server must
enforce the shared 8,192-token input window, including formatting, and the
agreed truncation policy. Reserve prompt overhead in the chunk budget. A
character limit, batch size, or byte limit does not enforce tokenizer admission.
dims declares the expected response width. This adapter sends neither
dimensions nor input_type, and it never slices or normalizes the result.
Wrong-width, nonfinite, zero-norm cosine, and non-unit vectors are rejected.
Reduced 512-, 256-, or 128-dimensional output requires an explicit custom
serving contract that truncates and then L2-renormalizes both documents and
queries, plus a new matching descriptor, compatibility identity and generation.
The current adapter has no request_dimensions option. Put literal formatting
in model_input; unsupported embedder affix keys are rejected at load time.
The native model recipe is verified against primary sources, and synthetic HTTP tests exercise configuration, literal formatting, identity and vector validation. Actual model inference, checkpoint loading, tokenizer admission, pooling, precision, server prompt behavior and retrieval quality remain untested. This recipe transports rendition text and text queries only; it does not advertise original-file image, audio or video support. No default model or existing generation changes when this fragment is staged.
Legacy text-service configuration¶
Existing model, dimensions, max_batch_items, runtime endpoint,
model_revision, request_timeout, and named environment credentials remain
supported. Prefer the embedder table for new text-service configurations.
Native and multimodal providers retain their existing configuration.
If both forms specify a setting, their effective values must agree. For
example, embedder.dims = 768 conflicts with dimensions = 1024. If api_key
is set and a named credential entry also exists, both must reference the same
environment variable. Otherwise remove the legacy entry when switching
sources. Profiles that share a credential name must agree on its source.
[credential_bindings.embedding-primary]
environment_variable = "DOCBANK_EMBEDDING_PRIMARY_KEY"
[embedding_profiles.semantic]
credential_binding = "credential:embedding-primary"
# The remaining pinned profile fields are also required.
A missing or empty secret leaves ordinary document operations available. Affected embedding jobs record an authorization failure and can recover later. Startup still fails for an undefined legacy credential binding, invalid runtime configuration, or mismatched descriptor.
Local text indexing¶
Use docbank processing local --server local to approve Nomic indexing for the vault and future imports. Setup previews the profile and all provider disclosures, downloads any missing server and model files, and needs no confirmation. It starts the shared server, grants consent, saves the approved profile and server in version 1 of local-text.json beside the vault's config.toml, and restarts the daemon. Your TOML stays intact.
Setup moves an indexed compatible Nomic profile to Kit's shared per-user server with its extractor, chunks, and vectors; otherwise it builds a separate local-text index with Nomic v1.5 and the plaintext extractor. Both auto and local select Kit's shared per-user server. Other processing profiles keep their configured providers.
The managed provider uses anonymous loopback requests. Consent identifies the shared service and selection mode, so a new port after restart keeps the grant. Revocation stops indexing and query provider calls. Server startup failure leaves the saved selection unchanged. See document processing.
Runtime settings¶
An optional [embedding_profiles.<name>.runtime] section makes a binding
executable on this machine. Without it, the daemon does not claim that binding's
work. Runtime configuration and credential sources are machine-local
and must be supplied separately after restoring a vault.
| Fields | Meaning |
|---|---|
adapter_contract |
docbank-openai-compatible-embeddings/v1 for rendition chunks, docbank-voyage-embeddings/v1 for rendition chunks and original files, or docbank-standard-embedding-bridge/v2 for image inputs and text queries. |
endpoint, model_revision |
Exact provider endpoint and pinned revision. OpenAI-compatible endpoints are origins without a path; Voyage uses https://api.voyageai.com/v1. |
deployment_epoch, provider_revision_header |
OpenAI-compatible runtimes require exactly one. Voyage text runtimes require an epoch and forbid a revision header. The epoch must equal model_revision; an OpenAI-compatible revision header must echo the pinned revision in every response. |
capability_manifest |
Voyage original-file runtimes require an absolute path to a capability manifest matching their model, media policy, and descriptor. Voyage text runtimes forbid this field. |
request_timeout, max_request_bytes |
Bound each provider request. The profile's max_batch_items, max_input_bytes, and max_response_bytes supply the other request/response limits. |
allowed_cidrs, spki_sha256, proxy_mode |
Explicit destination CIDRs, optional TLS public-key pins, and proxy_mode = "disabled". The provider connection enforces this policy. |
connect_timeout, keep_alive, tls_handshake_timeout |
Required positive transport durations, each at most five minutes. |
Request timeouts must also be positive and at most five minutes. Retry policy belongs to the worker, so runtime configuration has no retry-count or retry-delay fields. The worker handles transient failures and capacity-driven batch splits. It records malformed responses separately from rejected document input.
Image/text retrieval¶
Use docbank-standard-embedding-bridge/v2 with input_kind = "image" for Photos Meaning and Hybrid search. The bridge receives verified, stripped JPEG grid previews and text queries in the same vector space. Originals and filenames stay local. Use the bridge endpoint origin, pinned model_revision, provider disclosure, and explicit transport policy described above. Grant image and query-text consent before searching; missing consent, provider access, or an active index returns metadata matches with a visible reason.
Set min_query_similarity in the image binding's runtime config to a threshold calibrated for the pinned model revision. There is no default. It accepts a finite score for cosine or dot product; cosine values must be in [-1, 1]. Other input kinds and L2 bindings reject this setting. An image binding without a threshold uses the similarity_floor_unset metadata fallback for Meaning and Hybrid search.
Docbank applies the threshold to raw similarity before ranking or combining the semantic and metadata results. Meaning returns an empty result without fallback when every photo falls below it. Hybrid retains metadata matches. Changing the threshold leaves all fingerprints unchanged and requires no reindexing.
[processing_profiles.photos]
embeddings = ["images"]
[embedding_profiles.images]
input_kind = "image"
# Supply the remaining pinned profile fields from the provisioned bridge.
[embedding_profiles.images.runtime]
adapter_contract = "docbank-standard-embedding-bridge/v2"
endpoint = "https://embedding.example.invalid"
model_revision = "provisioned-image-model-v1"
# Example only: calibrate this value for the pinned model revision.
min_query_similarity = 0.2
# Supply the disclosure, credentials, limits, and transport policy above.
Voyage text retrieval¶
Use docbank-voyage-embeddings/v1 with input_kind = "rendition_chunk"
to embed retained rendition text, including Docling Markdown. It supports
voyage-3.5, voyage-4-large, voyage-4, and voyage-4-lite at exactly
256, 512, 1024, or 2048 dimensions. Set the binding's descriptor_id to
voyage.embeddings-v1, trust_boundary to hosted_provider, metric to
cosine, normalization to unit_length, and scalar_encoding to float32.
Use voyage/document/v1 and voyage/query/v1 as the formatters.
The custom model-input contract must use native document and query modes. For example, these sections belong to an otherwise complete embedding profile:
[embedding_profiles.voyage_text.model_input]
profile = "custom/v1"
compatibility_id = "voyage/retained-text/v1"
[embedding_profiles.voyage_text.model_input.document]
mode = "document"
template = "{{content}}"
[embedding_profiles.voyage_text.model_input.query]
mode = "query"
template = "{{content}}"
[embedding_profiles.voyage_text.runtime]
adapter_contract = "docbank-voyage-embeddings/v1"
endpoint = "https://api.voyageai.com/v1"
model_revision = "text-deployment-v1"
deployment_epoch = "text-deployment-v1"
# Supply the request bounds and sealed egress settings listed above.
Set the outer profile's compatibility_id to the same value. Supply its
credential binding, chunk policy, disclosure policy, and exact descriptor
fingerprint as for other retained text bindings. The fingerprint includes the
model, dimensions, document/query formatting, deployment epoch, credential
binding name, transport bounds, and egress policy. Credential values are excluded.
A mismatched descriptor prevents the daemon from starting that runtime.
The operator owns the epoch. It attests that stored document vectors and new
query vectors use the same model deployment; Voyage does not return an immutable
revision. Change the epoch and rebuild vectors when the hosted model changes.
Never use mutable-alias-export-only as an epoch. Voyage text profiles
without an epoch remain export-only. Contextual and original-file profiles do
not accept a text deployment epoch.
The adapter sends input_type = "document" for chunks and "query" for text
queries. It pins output_dimension, requests float vectors, disables provider
truncation, and omits encoding_format. It checks unit length without
renormalizing the response. Voyage may echo each input as a text member,
so set max_response_bytes to cover the vectors plus the echoed text.
Semantic and hybrid searches can select this binding; lexical search does not
send a query to Voyage. Consent and retained input requirements still apply.
Model input¶
[embedding_profiles.<name>.model_input] pins how document and query inputs are
formatted. Its profile selects a named contract such as nomic/v1, bge-m3/v1,
e5/v1, or gte/v1. It is not an arbitrary provider model name. The resulting
contract must match the binding's compatibility_id and provider descriptor.
For custom/v1, supply compatibility_id plus .document and .query
encoders, each with mode and template. Templates use {{content}}. Contract
validation checks the supported roles and formatting rules. query_instruction
is available only to contracts that support it.
Discovery reads in pages and checks once a minute whether another complete pass is needed. Quiet vaults skip the pass; see idle embedding discovery for the wake triggers. Existing queued work is still checked on the normal one-second idle cadence. Discovery skips missing or invalid generation bytes so later candidates can proceed. Later passes retry temporary input failures; permanent rejections allow discovery to settle. Database failures keep their separate bounded storage-retry behavior. Terminal jobs do not retain superseded generations after their last embedding set is collected, while queued/running jobs and explicit retention roots keep their inputs.
Search reranking¶
A processing profile can opt into one hosted reranking adapter. The section is deployment configuration, so it stays outside the portable document profile and does not change rendition or embedding identities.
[credential_bindings.search-rerank]
environment_variable = "DOCBANK_SEARCH_RERANK_KEY"
[processing_profiles.private.reranking]
provider = "zeroentropy"
model = "zerank-2"
credential_binding = "credential:search-rerank"
candidate_count = 20
excerpt_bytes = 4096
deadline = "5s"
failure_policy = "degrade"
endpoint = "https://api.zeroentropy.dev"
allowed_cidrs = ["192.0.2.0/24"]
proxy_mode = "disabled"
connect_timeout = "5s"
keep_alive = "30s"
tls_handshake_timeout = "5s"
provider can be zeroentropy with model zerank-2, or cohere with
rerank-v4.0-pro or rerank-v4.0-fast. candidate_count must be between 1
and 1,000. excerpt_bytes must be between 1 and 4,096 and limits each UTF-8
excerpt sent to the provider. deadline must be positive and at most five
minutes. failure_policy is degrade or fail_closed.
The daemon rejects a partial section, an unknown model, an invalid endpoint or egress policy, and an undefined credential binding. It reads the named secret only when a reranking request reaches the provider. The provider call needs an active query-and-excerpt consent grant. The adapter policy fingerprint binds the provider, model, candidate limit, excerpt limit, deadline, endpoint, and transport policy to the reviewed plan.
Adding this section changes the plan fingerprint and makes the plan report
consent required until reranking is approved. Existing grants remain valid for
the operations they already cover, including searches without --rerank.
Granting the revised plan approves all configured profile operations together.
Reranking has its own grant record, but no separate approval step. Follow the
search consent walkthrough
to review and grant the revised plan.
Self-hosted Cap origins¶
Register a self-hosted Cap deployment under [media_origins.<name>]. The
endpoint is a single HTTP(S) origin. Cap share and embed paths are recognized
only on that origin. The deployment revision, credential binding, network
allowlist, TLS pins, and probe timeout are part of the daemon configuration.
[credential_bindings.team-cap]
environment_variable = "CAP_API_KEY"
[media_origins.team-cap]
provider = "cap.self-hosted"
endpoint = "https://cap.example.test"
allowed_cidrs = ["127.0.0.0/8"]
proxy_mode = "disabled"
connect_timeout = "30s"
keep_alive = "30s"
tls_handshake_timeout = "10s"
spki_sha256 = []
credential_binding = "credential:team-cap"
deployment_revision = "v-synthetic"
probe_timeout = "30s"
HTTPS uses the system trust store. A private deployment may use HTTP when its
configuration lists allowed CIDRs. The daemon resolves the named credential
only for the registered origin and runs a bounded probe at startup. Recognized
recordings remain access_required. Docbank has no byte download path for
them.
Registration affects new submissions. A generic source retained earlier stays separate from a later registered-origin submission.
Store bindings¶
[store_bindings.<name>] profiles describe machine-local filesystem or
S3-compatible secondary storage. Filesystem profiles use kind = "filesystem"
and an absolute path. S3 profiles use kind = "s3", endpoint, region,
bucket, optional prefix, credential_profile, and force_path_style.
priority controls read preference after current health. Lower values are
preferred. The complete workflow and examples are in
Multi-store storage.
Bindings are loaded once when the daemon starts. Logical metadata, audit evidence, and backups do not include them. Restart after editing a profile. Docbank reports a typed stale-configuration error instead of hot-reloading credentials or paths underneath active jobs.
S3 endpoints must use authenticated HTTPS, including loopback services. Docbank rejects plain HTTP: a loopback port does not identify which process receives an ownership marker or document bytes.
Active stores must use separate locations:
- A filesystem root must not overlap the vault, a watched inbox, or another filesystem store.
- S3 prefixes must not be equal or nested within the same canonical endpoint and bucket.
Watches check checkout separation when they start. Filesystem stores check at daemon start and at registration. An overlapping store stays unattached at startup until a background check confirms separation. Registration rejects overlapping roots. Released checkout folders stay protected while they contain files or Docbank can't inspect them. See Create writable copies.
Docbank also checks each store's ownership marker and epoch, a value that identifies the current ownership claim. These checks catch aliases that path comparisons cannot recognize.
Secondary objects are verified but not encrypted by Docbank. Raw readers of a filesystem root or S3 prefix can decode document content without the daemon API key. Store profiles therefore belong only on owner-controlled storage, or on storage protected by independently controlled filesystem, bucket, or KMS encryption and access policy.
Bind validation¶
The daemon validates its listening address at startup. An invalid setting makes
docbank daemon run fail immediately:
- A loopback
bind_addr(127.0.0.1,::1,localhost) accepts an emptyapi_key: the daemon generates one at startup. - A non-loopback IP, including
0.0.0.0or::, requires an explicitapi_keyfrom TOML,DOCBANK_API_KEY, orDOCBANK_API_KEY_FILE. Authentication remains mandatory. Choosing this address opts into sending the key and vault contents over the selected network in cleartext. Use a trusted network, encrypted tunnel, or HTTPS proxy; Docbank provides no TLS or remote server identity verification. See Run in a container. api_portmust be between0and65535. Keys contain 1–4096 bytes without whitespace or control bytes. Invalid Host allowlist entries fail startup.
Server-path ingest and preflight, backup restore, and explicit backup repo
paths remain restricted to a loopback RemoteAddr. Host allowlists and
forwarding headers do not change that peer check.
Environment variables¶
| Variable | Effect |
|---|---|
DOCBANK_BIND_ADDR |
Override [server] bind_addr. |
DOCBANK_API_PORT |
Override [server] api_port; 0 selects an ephemeral port. |
DOCBANK_ALLOWED_HOSTS |
Comma-separated replacement for [server] allowed_hosts; spaces around entries are stripped. |
DOCBANK_API_KEY |
Override [server] api_key with an explicit key. |
DOCBANK_API_KEY_FILE |
Read the key from a mounted regular file instead of DOCBANK_API_KEY. |
DOCBANK_MCP_HTTP_ENABLED |
Override [mcp.http] enabled with true or false; empty preserves TOML. |
DOCBANK_MCP_HTTP_PORT |
Override [mcp.http] port; 0 serves /mcp on the API port. |
DOCBANK_MCP_HTTP_TOKEN |
Select an environment-backed MCP HTTP binding. Overrides the TOML binding; resolved only when MCP HTTP is enabled. |
DOCBANK_MCP_HTTP_TOKEN_FILE |
Supply that MCP bearer through a mounted regular file. |
DOCBANK_MCP_HTTP_ALLOWED_HOSTS |
Comma-separated replacement for [mcp.http] allowed_hosts. |
DOCBANK_HOME |
Vault location; see Vault location above. |
DOCBANK_LOCK_DIR |
Absolute lock-registry directory for an isolated environment whose account home is unwritable. Defaults to the operating-system account home's .local/state/docbank/target-locks, independent of HOME and XDG settings. All processes sharing or restoring overlapping vault trees must use the same directory; stop them before changing this setting. Keep it outside vaults and restore targets. Never delete it while any participating process runs. |
DOCBANK_LOG_LEVEL |
Log level (debug, info, warn, error) for docbank daemon run and docbank mcp, foreground or background. Invalid values are ignored and fall back to info. |
DOCBANK_TELEMETRY_ENABLED |
0, false, no or off turns off anonymous usage telemetry. Read when the daemon starts; restart the daemon after changing it. |
TELEMETRY_ENABLED |
The same values have the same effect; shared with other Kenn tools. |
DO_NOT_TRACK |
1 turns off anonymous usage telemetry. |
Nonempty startup overrides take precedence over TOML; empty variables keep
its values. DOCBANK_API_KEY and DOCBANK_API_KEY_FILE cannot both be
nonempty. A selected file must be a readable, non-symlink regular file owned
by the process user and contain a valid nonempty key. On Unix, its mode must be
0400 or 0600. On Windows, its protected ACL must grant access only to the
current user or token owner and trusted system administrators. Owner-only
read access is sufficient.
Missing, unreadable, empty, or oversized files fail startup instead of falling
back. One trailing LF or CRLF is stripped. File keys are bounded before parsing.
Secrets are resolved once per process; restart to rotate them.
Anonymous usage telemetry¶
The daemon reports anonymous usage events so the Docbank team can count active vaults, web app opens, screens used, and document actions. Counts are per vault, not per person: one person with three vaults counts three times. The daemon sends events in HTTPS batches to PostHog's US ingest endpoint (PostHog project 434713). The browser never contacts PostHog: the web app posts its event to its own daemon, which sends it.
Docbank sends these events:
daemon_activeat startup and on the first hourly check of each later UTC day. Days when the machine sleeps are not backfilled.app_openedwhen the web app loads, and again on the first window focus of a later UTC day. Claims usedocbank.web.telemetry.v1in browser storage, retain the latest 35 claimed dates, and apply per browser origin. The default loopback origin changes at each daemon start, so a new daemon run checks again. A fixed[web] public_originkeeps claims across restarts.session_endedonce when a browser tab closes or stays hidden for 30 minutes, or the terminal browser exits, including when its terminal closes. Browser visible time adds up across tab switches. Hidden time is excluded. The terminal browser counts the time from opening to exit, including idle time. A terminal browser left idle past the daemon's idle timeout reports nothing on exit because it sends the report only to a running daemon. TUI exit waits at most 50 ms for daemon discovery and reporting. A report that hasn't finished within that wait may be lost. Web Lock and sign-out send the final duration bucket in one revoke request, which removes the token first. The request that removes a live token then attempts to queue the event without waiting for delivery. The daemon can't accept the final duration after the browser session has expired or been revoked.screen_viewedwith a fixedscreenname andsurfaceofwebortui. Each screen counts once per vault per UTC day for each interface, including across daemon restarts.surfacerecords which interface was used. The daemon rejects other screen or surface names with HTTP 400.
Core actions send one event when a person's action completes:
document_addedafter a CLIadd, web upload, or photo import adds at least one document. Uploads that end with an error still count if they added documents.search_runafter a submitted search returns accepted results, including empty results. Complete queries, exact-version searches, and similar-document searches also report. Automatic refreshes, filter changes, and mode changes stay silent. Empty scopes run a normal search on the web and in the terminal browser. It carriessearch_typeoftext,semantic, orhybrid, using the executed mode after fallback. Photos reports only search form submissions.document_openedafter an explicit web open with Enter, double-click, or a row click, a related or duplicate document link, a successful download, or a Photos open from the grid or Map. Grid and Map opens report once the viewer shows the photo. A failed detail load counts as a failedopen; closing or stepping to another photo first stays silent. Moving through listed documents with j/k, snapshot Previous/Next, Photos arrows or filmstrip, Compare, Cull, and inspector back or return sends nothing. Terminal UI Enter-open and CLIcatorgetalso report.search_emptyafter a submitted search has no results, with the samesurfaceandsearch_type. It accompaniessearch_run, including when the search scope is empty.error_shownwhen a search, add, or open the person ran fails. It requiressurfaceandkind.kindissearch,add, oropen. The daemon sends any otherkindstring asother.- A failed submitted search counts once on the web, in the terminal browser, and in the CLI, including Processing searches, similar-document searches, and Photos search. A failed upload or photo import run counts once however many items failed. Rejected input counts as a failed search or add like any other failure. A failed download, related-document open, Photos detail load,
get, orcatcounts asopen. - Sign-in prompts, cancels, passive loads and refreshes, paging, sorting, other drawers and dialogs, notices, warnings, and CLI usage errors before connecting stay silent. The terminal browser sends
document_openedon Enter and sends noerror_shownwithkindofopenfor a failed detail load. Other previews or detail loads after opening a document are secondary loads and stay silent. Failed Add re-plans, closed CLI output pipes foradd,cat, andsearch, and an existing destination forgetalso stay silent. A missing download destination directory, or one that is not a directory, also stays silent.
Each core action requires surface of web, tui, or cli; a missing or unsupported value returns HTTP 400. Searches also require an allowed search_type. The daemon forwards every core action without counting state. PostHog queries count installs per day. CLI reports require a terminal on stdin, stdout, or stderr and omit --agent runs. CLI and TUI actions stay silent when CLAUDECODE or CODEX_THREAD_ID is set. Asynchronous imports from the CLI or the web mailbox and load-file drawers, and push, send no core actions.
The daemon remembers which screen events it has queued today in memory and in
telemetry-screen-views.json beside the install ID. If it cannot queue an
event, that screen remains eligible for another attempt. Remote delivery is
best effort.
Browser reports share a daily gate. Disabled receipts stop reports and duration listeners until a later day's load or focus, or a load from a new origin. Failures back off and stop after six attempts. Hidden tabs report their latest screen when visible. Screen visibility listeners stop while disabled or unavailable; focus can check on a later day. Session reports use the shared gate's in-memory queue while it checks permission.
TUI reports use a running daemon and lock telemetry-tui-state.json while checking.
The private v1 JSON file stores the UTC day, disabled receipt, and accepted
screen names. Restarts reuse today's state, including opaque screen names.
Missing or unsupported versions are refused without rewriting. Unknown fields
in v1 are ignored and dropped only on a later rewrite. Malformed v1 state and
other dates, including future dates after clock correction, are empty until a
new receipt replaces them.
Failures retry on input after 30 seconds, including after screen changes. Six
failed attempts pause this process's reports until UTC rollover, covering file,
lock, discovery, POST, and receipt errors. Data operations can start daemons.
Allowed screen values are browse, search, tags, snapshot, history, versions, provenance, jobs, audit_evidence, storage, backups, bates, export, saved_queries, collections, trash, tag_catalog, telemetry, term_reports, processing, rendition, upload, mailbox, load_file, snapshot_actions, help, document, packages, operations.
Each event carries these fields:
- the event name, a random event UUID, and a timestamp
distinct_id: a random install ID generated on this machineapplication=docbank,source=daemon, the Docbankversionandcommit,goos,goarch, andinstall_age_hours(whole hours since the install ID was created)distribution: who shipped the build, such askennfor official downloads orhomebrew; empty for other builds$process_person_profile=falseand$geoip_disable=true- fields the PostHog Go library adds:
$liband$lib_version session_endedalso carriessurfaceaswebortuiandduration_bucketasunder_1m,1_to_5m,5_to_30m, orover_30m
Usage telemetry never carries document content, filenames, paths, hashes, tags, queries, the vault ID, account names, the hostname, or configuration values. PostHog does see the request's source IP address. Docbank asks it not to geolocate. Separately configured document providers are unrelated to usage telemetry and unchanged by it.
The install ID lives in telemetry-install.json at the vault root (see the
layout above). The daemon creates it the first time it runs
unless telemetry is turned off. Each vault has its own ID.
Only release builds send telemetry. A build needs the PostHog project key,
which make build, make install, and release builds set at link time, and a
plain release version such as v1.2.3. Plain go build and go test binaries
have no key and send nothing. Telemetry also stays off in CI. To opt out, set
DOCBANK_TELEMETRY_ENABLED=0, TELEMETRY_ENABLED=0, or DO_NOT_TRACK=1 in the
environment that starts the daemon, then run docbank daemon restart. A CLI
command that starts the daemon automatically passes its own environment, so
set the variable in your shell profile. Go applications that embed a vault
in-process send nothing.
Photo map tiles¶
Maps stay disabled until you set a raster tile provider and restart the daemon:
[web.map_tiles]
tile_url = "https://tiles.example.org/{z}/{x}/{y}.png"
attribution = "Example map provider"
max_zoom = 19
The URL must have a fixed HTTPS origin and all three placeholders in its path. The host must be a hostname, an IPv4 address or a bracketed IPv6 address. Attribution is plain text. Docbank connects directly to the configured host and ignores proxy settings. The daemon fetches tiles for signed-in browsers, so the URL and any key in it stay on the server and the web page carries only the provider's host name. The provider sees the daemon host's IP address and the viewed map areas, with no Referer. Docbank refuses redirects, accepts only responses up to 2 MiB whose bytes identify them as PNG, JPEG, GIF or WebP, and gives up after 10 seconds. The daemon does not cache tiles. Tiles carry a one-hour private cache lifetime that varies by browser session, except under key login, where responses are never cached. Provider failures log only a status code or error class, never the URL. Choose a provider that permits this; the public OpenStreetMap tile service requires a Referer and is incompatible with this policy.