Skip to content

Lore Server configuration reference

Synopsis

loreserver [--config <DIR>] [--env <ENV>]

The Lore Server binary (loreserver) reads its settings from three layered sources: the built-in defaults baked into the binary at compile time, optional TOML files layered over them, and LORE__-prefixed environment variables. All configuration is optional — run loreserver with no arguments and it starts a throwaway single-node server from the built-in defaults. This page catalogs every CLI flag, config-file layer, and settings field, including the AWS, DynamoDB, Consul, and hook plugin backends, and the default each falls back to.

This page documents the configuration surface only. To stand up a server step by step, see Deploy a local Lore Server. For the guided first-run flow, see the Quickstart.

CLI flags

Flag Argument Environment fallback Default Description
--config <DIR> LORE_CONFIG_PATH lore-server/config (relative to the working directory) Directory of TOML config files layered over the built-in defaults.
--env <ENV> LORE_ENV local Environment name selecting the <environment>.toml override to load.
--help, -h none none none Print help and exit.
--version, -V none none none Print the version and exit.

--config

Sets the directory the server loads optional override files from (see Config-file layering). When neither --config nor LORE_CONFIG_PATH is set, the directory defaults to the relative path lore-server/config — so launched from the repository root the server picks up lore-server/config/local.toml, while launched from a directory without a lore-server/config folder it runs on the built-in defaults alone. Each file in the directory is optional. The flag falls back to its environment variable, so LORE_CONFIG_PATH=/etc/lore/config is equivalent to --config /etc/lore/config.

--env

Selects which <environment>.toml file the server layers over the defaults. Defaults to local when neither --env nor LORE_ENV is set, so a config directory with a local.toml overlay is picked up without any extra flag.

Config-file layering

The server layers the following files from the config directory over the built-in defaults. The config directory is whatever --config / LORE_CONFIG_PATH names, or the relative lore-server/config path when neither is set. Each file is optional; a missing file — or a missing config directory — is silently skipped. Sources merge field by field rather than replacing one another wholesale: each later source overrides only the individual fields it sets and leaves every other field intact. When two files set different fields, both apply; when they set the same field, the later source wins.

Order Source When it loads
1 Built-in default.toml Always. Baked into the binary at compile time.
2 <environment>.toml When present in the config directory. The environment comes from --env / LORE_ENV (default local).
3 local.toml When present in the config directory. If it exists, local.toml is applied as the last file layer, and will override every file above it.
4 LORE__-prefixed environment variables Always. Overrides every file layer (see Environment-variable overrides).

For example, with --env dev, the server reads default.toml (baked in), then dev.toml, then local.toml, then applies environment variables. For the complete loading sequence — including advanced region-scoped overlays and other power-user layers — see the inline documentation in the loreserver configuration source.

Note

Field-level merging applies to TOML tables. Array-valued fields — for example topology.fixed.peers — are replaced wholesale by the last source that sets them; values are not concatenated across layers. The same holds for LORE__ environment-variable overrides.

Important

When --config and LORE_CONFIG_PATH are both unset, the config directory defaults to the relative path lore-server/config, resolved against the current working directory. The server still layers any optional files it finds there — so running from the repository root loads lore-server/config/local.toml, while running from a directory that has no lore-server/config folder applies only the built-in defaults (see Zero-config defaults). To load a specific overlay regardless of working directory, point --config at the directory that holds it.

Environment-variable overrides

Any scalar field can be overridden with an environment variable prefixed LORE__. Nested keys use a double-underscore (__) separator that maps to the TOML table path; single underscores inside a field name are preserved (so presigned_url_hmac_key stays intact). The entire variable name is matched case-insensitively — both the LORE__ prefix and the segments after it may be in any case.

Field Environment variable
topology.provider LORE__TOPOLOGY__PROVIDER
server.http.presigned_url_hmac_key LORE__SERVER__HTTP__PRESIGNED_URL_HMAC_KEY
immutable_store.local.path LORE__IMMUTABLE_STORE__LOCAL__PATH

Environment-variable overrides apply last, after every file layer, so they win over anything in the config directory.

Note

Only scalar fields can be set this way. Array-valued fields — such as the peers list under [topology.fixed] — cannot be overridden through a single environment variable; configure those in a file layer instead.

Runtime environment variables

This variable is not a settings field, so it has no LORE__ form and no config-file key. The server reads it once, when it builds its async runtime at startup.

Variable Values Default Effect
LORE_CORE_TIMER per-worker, shared per-worker The timer the server's core runtime keeps its sleeps and timeouts in. per-worker gives each worker thread its own timer, which suits a server whose requests set many timers at once. per-worker is Tokio's unstable alternative timer; shared selects Tokio's default timer, one for the whole runtime, without a rebuild.

Unset or blank, LORE_CORE_TIMER is per-worker. Surrounding whitespace is ignored. Any other value keeps per-worker, and the server logs a warning once its logging is set up. Only the server reads it: the CLI and programs that embed Lore always use the shared timer.

Zero-config defaults

With no config files loaded, the server runs as a self-contained, single-node instance, substituting ephemeral local artifacts for what a production deployment would configure. It logs each substitution so the choice is visible.

  • TLS certificate. When a QUIC endpoint that does not require mutual TLS has no certificate, the server writes a self-signed certificate for localhost, 127.0.0.1, and ::1 to <temp>/lore-server/<endpoint>-<pid>-cert.pem (and -key.pem), where <pid> is the server's process id. It's untrusted, regenerated on every restart, and for local development only.
  • Local store path. When a local store has no path, it uses <temp>/lore-server. Because that path is fixed, a later run reopens the same directory and reuses whatever the previous run left.
  • Presigned URL feature. When presigned_url_hmac_key is absent, the feature starts disabled.

Note

<temp> is the OS temporary directory ($TMPDIR or /tmp on Linux; a per-user /var/folders/… path on macOS). The server always uses the same fixed subdirectory, <temp>/lore-server, so the store path above is stable across runs. Certificate file names carry the process id so that servers sharing a machine cannot overwrite each other's certificate; they are not stable across runs, and old pairs are left behind rather than cleaned up.

Warning

The zero-config store lives under <temp>/lore-server, which the OS can clear on reboot — taking every fragment and branch pointer with it. Set an explicit path on the local stores for any data that must survive a reboot.

Server and endpoint settings

The [server] table and its sub-tables configure the network endpoints, graceful-shutdown behavior, and the disk space check on the local stores.

Field Default Description
server.connection_close_timeout_seconds 5 Seconds to wait for open connections to close after a shutdown signal.
server.runtime_shutdown_timeout_seconds 25 Seconds to wait for the async runtime to shut down after connections close. Accepts the alias shutdown_delay_seconds.
server.trust_unsigned_identity false Without [server.auth], take the caller's identity from an unsigned bearer token on gRPC, HTTP and QUIC. See Unsigned identity. The server refuses to start if it is set beside [server.auth].
server.upstream_connections 4 Storage connections the server opens to the upstream of a remote immutable or mutable store for each identity it authenticates there as (see Remote store mode), from 1 to 10; 0 reads as 1. The connections belong to the upstream and the identity, not to a repository: every repository the server reaches there as that identity shares them, as do its QUIC, gRPC and socket handlers.

Advertised endpoints

[environment.endpoint] defines the external service endpoints advertised for the client.

Field Default Description
auth_url none The authentication service clients log in at and exchange tokens with. Setting it requires [server.auth]. If auth_url and [server.auth] are not set, starts the server unauthenticated.
user_url none A user directory served over lore.user.v1.UserService, which clients use to resolve user IDs to display names, and back. If not set, clients speak the UrcAuthApi GetUserInfo and GetUserId RPCs to auth_url instead. If neither is set, clients fall back to an offline resolver that returns user IDs as names. When set, the server also calls lore.user.v1.RepositoryRegistryService there: its repository catalog lists repositories with RepositoryList by default (see repository_catalog), and it registers the repositories it creates and deletes with RepositoryRegister and RepositoryUnregister instead of the RebacApi CreateResource and DeleteResource calls to auth_url. A refused RepositoryRegister fails the create, and a refused RepositoryUnregister the delete.
storage_url none The endpoint advertised for the storage service. If not set, clients use the server they connected to.
repository_url none The endpoint advertised for the repository service. If not set, clients use the server they connected to.
revision_url none The endpoint advertised for the revision service. If not set, clients use the server they connected to.
lock_url none The endpoint advertised for the lock service. If not set, clients use the server they connected to.
notification_url none The endpoint advertised for the notification service. If not set, clients use the server they connected to.
[environment.endpoint]
auth_url = "ucs-auth://auth.example.com"
user_url = "ucs-auth://directory.example.com"

A client connected over lores:// refuses to connect if the server advertises a storage_url, repository_url, revision_url, lock_url, or notification_url whose scheme doesn't authenticate the server, such as lore://. Give these endpoints a scheme that does, such as lores://.

Advertised client settings

[environment.config] defines settings the environment service hands to clients with the endpoints. Every field is optional. Where a store limits a batch, the server narrows the advertised value to that limit.

Field Default Description
max_query_batch none The most addresses a client puts in one storage query. When the immutable store has a limit, 0 or unset advertises that limit, and any other value advertises the smaller of the two. Otherwise the value is advertised as set, and a client told 0 uses its own default.
max_lock_batch none The most resources a client puts in one lock, unlock or lock status request. A client splits a larger request into batches of this size. 0 or unset advertises the lock store's limit, and any other value advertises the smaller of the two. The limit is 100 for both the local and the aws lock stores. The lock service refuses a request with more resources than the limit.
compression_mode none The codec the server asks clients to compress new payloads with: NoCompression, Lz4 or Zstd. Oodle is advertised as Zstd. A client that already has a mode selected keeps it. Unset leaves the choice to the client.
[environment.config]
max_lock_batch = 50

Local store disk space

[server.local_store_monitor] configures the periodic check of the disk space left to the local stores (see Store settings). Only stores the server writes at are watched, so a [local] block left in a remote deployment's configuration is ignored, as is a composite immutable tier that names a path other than the first local tier's — every local tier is handed the store the first one creates.

Field Default Description
check_interval_seconds 30 Seconds between checks. 0 turns the check off.
low_space_threshold_bytes 10737418240 Warn while free space on a volume holding a local store is below this (10 GiB).

The reading is taken per volume, not per store: stores sharing a filesystem are checked once and named together in a single warning. The first check runs at startup, so a server starting on a full volume says so immediately. A store path that matches no mounted filesystem is warned about once and goes unmonitored until a mount covers it again.

At startup the server also reports where each local store lands, warning when the configuration names no path, when the path is inside a system temporary directory (see Zero-config defaults), and when a composite tier names a path nothing is written at.

QUIC endpoints

[server.quic] is the public-facing QUIC endpoint that clients push to and clone from. [server.quic_internal] is the internal replication endpoint, opt-in per environment and requiring mutual TLS. Both use the same field set.

Field Default (server.quic) Description
enabled true (quic), false (quic_internal) Whether to start this QUIC endpoint.
host 0.0.0.0 Bind address.
port 41337 (quic), 41340 (quic_internal) Listen port.
verify_client_certs false (quic), true (quic_internal) Require client certificates (mutual TLS); false accepts unverified clients. The compile-time fallback is true, but the shipped default.toml sets the public endpoint to false so token (JWT) auth carries verification. quic_internal omits the key and so keeps the true default.
idle_timeout 30000 Connection idle timeout in milliseconds.
keep_alive 500 Keep-alive interval in milliseconds.
max_bidi_streams 8 Maximum concurrent bidirectional streams per connection.
num_listeners 1 Accept tasks per socket. One keeps up, as an accept task only hands each connection to a task of its own.
num_sockets 16, or one per processor on a machine with fewer (quic); 4 (quic_internal) UDP sockets bound to port with SO_REUSEPORT, each with its own QUIC endpoint and receive buffer of about 2.9 MiB. Linux hands each datagram to one socket by a hash of its source and destination, which spreads the clients across the sockets; other platforms bind one. Each socket asks the kernel for a 512 KiB receive buffer, which Linux caps at net.core.rmem_max. The sockets share the limits on connections not yet accepted, 65,536 attempts and 100 MiB of buffered datagrams. A client whose address changes mid-connection can reach another socket, whose endpoint resets the connection; the client reconnects.
transport_bits_per_second 1073741824 (quic), 10737418240 (quic_internal) Transport bandwidth estimate in bits per second.
transport_rtt 100 (quic), 220 (quic_internal) Expected round-trip time in milliseconds. Together with transport_bits_per_second it sizes the receive and send windows of every connection the endpoint accepts: how much a client may have in flight, and how much of a response the server holds until it is acknowledged. One value serves every client, so set it for the most distant one; a window sized too short limits a distant client's throughput, and a nearer client never fills a larger one. Each connection may buffer up to one window in each direction, so a larger value raises the server's worst-case memory per connection. The internal endpoint's default covers peers in other regions.
initial_cwnd_bytes none (quic), 1048576 (quic_internal) Congestion window, in bytes, that each accepted connection starts with: how much the server sends before the peer's first acknowledgements arrive. The congestion controller may cap it at the send window derived from transport_bits_per_second and transport_rtt. When unset, quic uses the congestion controller's own default and quic_internal always uses 1048576. At least 2400.
congestion_algorithm bbr (quic), cubic (quic_internal) Congestion controller of each connection the endpoint accepts: bbr or cubic. It paces only what the server sends, such as the data of a get. What a client sends, such as the data of a put, follows the client's controller: a CLI or storage API client's is the one LORE_QUIC_CONGESTION_ALGORITHM names, another server's remote store's is its congestion_algorithm (see Remote store mode), and on quic_internal, a peer's replicated store's is the congestion_algorithm of its [immutable_store.replicated] table, Cubic unless configured (see Replicated store mode). Environment variables in the Lore CLI configuration reference says when to choose which. Any other value fails startup.
handler_timeout_seconds 50 Per-request handler timeout. Guards against handlers that hang indefinitely.
connection_message_limit none Maximum in-flight messages per connection. When unset, the server falls back to 500 for the public endpoint and 50000 for the internal endpoint.

Certificate block

Each QUIC endpoint takes an optional [server.quic.certificate] (or [server.quic_internal.certificate]) block. A configured block is always used as given. When it is omitted, the server generates an ephemeral certificate (see Zero-config defaults) on the public endpoint, and on the internal endpoint when verify_client_certs = false — there the certificate only has to satisfy the handshake, since no client is being verified. The internal endpoint with verify_client_certs = true has no such fallback: mutual TLS is the authentication, so a missing certificate fails startup. The block as a whole is optional, but when it is present cert_file and pkey_file are both required — only cert_chain is individually optional.

Field Default Description
cert_file none Path to the PEM-encoded server certificate.
pkey_file none Path to the PEM-encoded private key.
cert_chain none Path to PEM-encoded CA certificate(s) used to verify client certificates (and also appended to the chain the server presents). Required on any endpoint with verify_client_certs = true; the internal endpoint enforces this at startup.

HTTP endpoint

[server.http] configures the HTTP endpoint that serves the health check and, when enabled, presigned URLs.

Field Default Description
enabled true Whether to start the HTTP endpoint.
health_only false Serve only /health_check, without repository or presigned URL routes. Requires enabled = true.
host 0.0.0.0 Bind address.
port 41339 Listen port.
max_file_size 10485760 Maximum upload size in bytes (10 MiB).
request_timeout_seconds 300 Overall request timeout.
request_body_timeout_seconds 3600 Request-body read timeout.
available_interval_seconds 30 Interval between store-availability probes.
available_timeout_seconds 5 Timeout for each store-availability probe.
store_health_check false Whether the health check also probes the store.
presigned_url_hmac_key none Optional hex-encoded HMAC key that enables the presigned URL feature. See below.
presigned_url_min_ttl_seconds 1 Minimum lifetime a presigned URL may request.
presigned_url_default_ttl_seconds 3600 Default presigned URL lifetime.
presigned_url_max_ttl_seconds 86400 Maximum presigned URL lifetime.
presigned_url_extra_content_types [] Content types added to the default set. See below.
presigned_url_denied_content_types [] Content types removed from that set. See below.

presigned_url_hmac_key

This field is optional. When it's absent, the server starts with the presigned URL feature disabled and logs Presigned URL feature disabled (presigned_url_hmac_key not configured). When it's set, the value must be valid hexadecimal that decodes to at least 32 bytes — generate one with openssl rand -hex 32. An invalid or too-short key stops the server from starting. Set this only for deployments that hand out presigned URLs, and use a fresh key per deployment. Vending a presigned URL needs the presign permission on the repository. Without [server.auth], every caller holds it.

Presigned URL content types

Redeemed content is served only with a Content-Type on an allowlist. A type off the allowlist is rejected at mint with 400 and coerced to application/octet-stream at redeem.

Both fields are additive: they build on the default set rather than replacing it, so adding one type does not require restating the others. The default set is application/octet-stream, binary/octet-stream, image/png, image/jpeg, image/gif, image/webp, application/pdf, and text/plain. Both fields default to empty, so a config that sets neither gets exactly that set.

[server.http]
presigned_url_extra_content_types = ["application/zip", "audio/mpeg"]
presigned_url_denied_content_types = ["application/pdf"]

Removals apply after additions, so a type named in both fields is not allowed. Denying every default type is valid. The server logs the resolved set at startup.

Some types can never be allowed, because a browser executes them as a document and redeemed bytes are caller-supplied: text/html, application/xhtml+xml, image/svg+xml, text/xml, application/xml, application/xslt+xml, text/javascript, application/javascript, and application/ecmascript. Naming one in presigned_url_extra_content_types stops the server from starting; naming one in presigned_url_denied_content_types has no effect.

Each entry must be a bare type/subtype drawn from the RFC 9110 token character set. Any of the following stops the server from starting:

Rejected entry Example
Empty or whitespace-only ""
A parameter text/plain; charset=utf-8
A comma-joined list image/png,image/gif
A wildcard image/*, */*
Whitespace inside the value text / html, image/pn g
A control character or any non-ASCII character image/pñg
Not exactly one type and one subtype png, image/, image/png/extra

Note

These are array fields, so they cannot be set through a LORE__ environment variable, and a later config layer replaces the whole array rather than merging it.

gRPC endpoints

[server.grpc] is the public gRPC API over HTTP/2 and TCP. It serves the admin, storage, revision, repository, environment, thin-client, lock, and notification services in normal mode. [server.grpc_internal] is the opt-in server-to-server endpoint. It is disabled by default and requires mutual TLS. Both tables share the same fields.

Note

[server.grpc]'s default port 41337 is the same number as [server.quic], but the two do not conflict: gRPC listens on TCP and QUIC on UDP.

Field Default (server.grpc) Description
host 0.0.0.0 Bind address.
port 41337 (grpc), 41340 (grpc_internal) Listen port.
request_handler_timeout_seconds 50 Per-request handler timeout in seconds. Keep below any upstream load-balancer timeout.
http2_keepalive_interval_seconds none HTTP/2 keep-alive PING interval in seconds. Unset by default.
http2_keepalive_timeout_seconds none HTTP/2 keep-alive PING timeout in seconds. Unset by default.
certificate none Optional [server.grpc.certificate] / [server.grpc_internal.certificate] block — same fields as the Certificate block. When present, the endpoint serves TLS.

[server.grpc_internal] additionally honors two fields that [server.grpc] ignores:

Field Default Description
enabled false Whether to start the replication endpoint. Set true to opt in.
verify_client_certs true Require client certificates (mutual TLS). The endpoint refuses to start unless this is true with a full certificate triple (cert_file + pkey_file + cert_chain), or explicitly set to false to accept unverified clients.

gRPC public services

[server.grpc_public_services] holds one block per service the public gRPC endpoint can register, plus forwarded_requests.

Every service block accepts enabled and a general namespace. A block may also define service-specific fields. A general field affects only the services named in its description:

Field Default Description
enabled true Whether the public router registers this service. Set false and every RPC on it answers UNIMPLEMENTED.
general.max_encoding_message_size unset Maximum encoded gRPC response size in bytes. When unset, the gRPC framework default applies. Honored by lock_service.

Use lock_service.general.max_encoding_message_size instead of lock_service.max_encoding_message_size, which current servers ignore. During a mixed-version rollout, set both paths. Legacy servers read the direct key; current servers read the key beneath general. Remove the direct key after all servers are upgraded.

Selecting services

An absent block means enabled. A present block without enabled also means enabled. Restrict a deployment by disabling every service it must not serve:

Block Registers
admin_service urc.rpc.AdminService (ServerInfo, Obliterate)
storage_service urc.rpc.StorageService and lore.storage.v1.StorageService
revision_service urc.rpc.RevisionService and lore.revision.v1.RevisionService
repository_service urc.rpc.RepositoryService and lore.repository.v1.RepositoryService
environment_service urc.rpc.EnvironmentService and lore.environment.v1.EnvironmentService
thin_client_service lore.thin_client.v1.ThinClientService. Every RPC it serves is a read.
lock_service urc.lock.LockService. Also requires [lock_store] at a mode other than none.
notification_service lore.notification.NotificationService. Registers for local notification mode, the default when [notification] is absent. Notification plugins provide a sender but do not register this public service.

One block gates a whole proto family. The legacy urc.rpc services are not read-only shadows of their v1 twins. They carry BranchPush, RepositoryCreate, and RepositoryDelete.

Each flag is a scalar, so it is also settable from the environment:

LORE__SERVER__GRPC_PUBLIC_SERVICES__STORAGE_SERVICE__ENABLED=false

Disabling every service is legal. The process starts, and the public gRPC listener answers every RPC with UNIMPLEMENTED. The same result occurs when only lock_service is enabled without a store, or only notification_service is enabled with a notification plugin. An empty effective set logs a warning: No public gRPC services registered; every RPC on this listener will answer UNIMPLEMENTED.

Unknown keys are ignored, as elsewhere in the settings. A misspelled block or key therefore leaves the service registered. Verify the effective set in the startup log.

The startup message Registered public gRPC services lists the services that the router registered. Its authenticated field reports whether [server.auth] is active. The effective set can differ from the configured set because lock_service requires a store and notification_service requires local mode.

For example, a read-only thin-client deployment disables every other service:

# Enabled by default; written out so the file states what the process serves.
[server.grpc_public_services.thin_client_service]
enabled = true

[server.grpc_public_services.admin_service]
enabled = false

[server.grpc_public_services.storage_service]
enabled = false

# ... revision_service, repository_service, environment_service,
#     lock_service, notification_service

lore-server/config/thin.example.toml is a complete example. It contains the exclusions above, disables the QUIC and HTTP listeners, and points both stores at a separate full server so the process keeps no repository copy. Copy it to a separate directory as default.toml, then point LORE_CONFIG_PATH at that directory. The server does not load the example in place.

Important

These flags govern only the gRPC router. For a read-only process, disable QUIC and either disable HTTP or enable its health-only mode. Set server.quic.enabled = false for the thin role. To serve HTTP health without repository content routes, use the block below. The gRPC listener continues serving thin RPCs on port 41337; this feature adds no gRPC Health RPCs.

A service added in a later release defaults to enabled. It therefore mounts on a restricted deployment without an edit. Check the Registered public gRPC services line after an upgrade.

[server.http]
enabled = true
health_only = true
host = "0.0.0.0"
port = 41339
store_health_check = true
available_interval_seconds = 30
available_timeout_seconds = 5

Health-only mode serves unauthenticated GET /health_check: cached store availability returns 200, or 503 when unavailable and store_health_check is true. Repository and presigned content routes return 404. The server ignores presign configuration in this mode. Omitting health_only keeps existing full HTTP behavior; enabled = false prevents the listener regardless of health_only.

The health cache starts available and the monitor waits before its first sample. The interval above is thirty seconds; the monitor enforces a minimum ten-second interval. The store receives the configured five-second availability budget. Replicated-store availability reads a client health flag, rather than verifying an upstream transaction or continuously testing authentication and tables.

Maintenance retains its existing 200 response without store checks. This single endpoint does not distinguish liveness from readiness: account for maintenance and store outages when choosing readiness and restart policies. A binary built with health-only support is required before using this configuration.

Forwarded requests

[server.grpc_public_services.forwarded_requests] lets this server answer selected public RPCs by forwarding them to another Lore server's internal endpoint. It is absent by default, and no RPC is forwarded until it is named under enabled_rpcs.

[server.grpc_public_services.forwarded_requests.enabled_rpcs] takes one boolean per forwardable RPC, all false by default. Releases add to the set; an unknown key here is ignored, so a name that is not yet forwardable forwards nothing.

lock_query, lock_lock, lock_status and lock_unlock forward the lock service's Query, Lock, Status and Unlock. The peer answers them only if its own [lock_store] is at a mode other than none; otherwise it answers UNIMPLEMENTED, which the forwarding server relays to its client. The forwarding server authorizes the caller before it forwards, including whether an Unlock may release other users' locks, and the peer sends the lock and unlock notifications. The peer trusts that authorization, as it does for every forwarded RPC, so only Lore servers should hold a client certificate its internal endpoint accepts. A peer running a release without one of these RPCs answers it UNIMPLEMENTED as well, so upgrade the peer before turning a flag on.

[server.grpc_public_services.forwarded_requests.client] configures the channel to the peer. The defaults suit a long-lived connection that sits idle between forwards; tune them to the path the peer is actually reached over:

Field Default Description
url none (required) The peer's internal gRPC endpoint, for example https://peer.example.com:41340.
certs none Optional certificate block for mutual TLS to the peer — same fields as the Certificate block. The peer's [server.grpc_internal] requires client certificates unless it sets verify_client_certs = false.
connect_timeout_seconds 5 Ceiling on the TCP connect, divided across the addresses the URL resolves to. It covers neither DNS resolution nor the TLS handshake, so it is not a bound on the whole of establishing a connection.
request_timeout_seconds 40 Deadline for each forwarded request. Keep below the request_handler_timeout_seconds of the endpoint doing the forwarding, so that handler outlives the call it forwards.
tcp_keepalive_seconds 30 TCP keep-alive probe interval. Holds open any NAT or proxy flow state on the path while the channel is idle between requests.
http2_keepalive_interval_seconds 20 HTTP/2 keep-alive PING interval. Keep below the idle timeout of anything on the path that reaps idle connections. Pings are sent while the channel is idle, not only while requests are in flight.
http2_keepalive_timeout_seconds 10 How long a keep-alive PING may go unanswered before the connection is dropped and redialled.
[server.grpc_public_services.forwarded_requests.client]
url = "https://peer.example.com:41340"

[server.grpc_public_services.forwarded_requests.client.certs]
cert_file = "/etc/lore/tls/client.crt"
pkey_file = "/etc/lore/tls/client.key"
cert_chain = "/etc/lore/tls/ca.crt"

[server.grpc_public_services.forwarded_requests.enabled_rpcs]
repository_get = true

Authentication

[server.auth] configures JWT verification for the gRPC API. When [server.auth] is defined, JWT verification is enabled. If it is absent, the services accept unauthenticated requests, and every caller holds read, write, obliterate and presign on every partition. Repository delete and branch protection, which otherwise need owner or admin, or write for the repository's creator, need only write there, since an unauthenticated caller has no identity to compare with the creator. With [server.auth], set-protected also permits branch protection; lore branch protect and lore branch unprotect also need write. If [server.auth.jwk].endpoint is set, it will be used as the JWKS endpoint. If not, the validation keys will be discovered from JWT issuer OIDC discovery document.

When [server.auth] is present, jwt_issuer and jwt_audience are both mandatory and the server refuses to start without them: A deployment that verifies tokens without pinning issuer would accept tokens from any issuer. And a deployment that doesn't pin the audience would accept tokens minted for any service.

Field Default Description
jwt_issuer required Accepted JWT iss values, as a string or an array. Tokens whose issuer matches no entry are rejected. Two entries are for the duration of an issuer's iss cutover if the issuer is changed. The validator accepts tokens minted under both the old and the new value while both are in flight.
jwt_audience required Array of accepted JWT aud values. A token's audience must match one entry.
jwt_typ none Accepted JWT typ header values, as a string or an array. When set, a token whose header carries no typ, or a typ that doesn't match any of the entries, is rejected. If unset, the token value is not checked. jwt_typ = "at+jwt" is the RFC 9068 access-token profile for OAuth2/OIDC deployments, and should be used for OIDC-compliant setups. Values compare as media types: case-insensitively, and with or without the application/ prefix, so at+jwt also accepts application/at+jwt.
jwk none The optional [server.auth.jwk] override sub-table below.
oidc none The optional [server.auth.oidc] sub-table below, which configures the OIDC provider info shown to clients.
permission_claim none Dotted path of the JWT claim carrying the caller's allowed actions, e.g. realm_access.roles (Keycloak) or groups (Dex). When using GlobalGrantsAuthorizer (Tier 1), this JWT claim defines where the user's global permissions are read from. When resource_claim is set and ResourceGrantsAuthorizer (Tier 2) is in use, it instead names the field inside each resource entry holding the per-partition actions, defaulting to permission.
implicit_actions ["write"] Actions every token holder gets under GlobalGrantsAuthorizer (Tier 1), added to those permission_claim carries and to read, which any token implies. Set [] to grant write through a role only, or, without permission_claim, to make the server read-only. Any of read, write, owner, admin, migrate, push-protected, set-protected, obliterate and presign may be listed; any other name is a configuration error. The server refuses to start with it set beside resource_claim or auth_url, where it would do nothing.
resource_claim none Dotted path of the JWT claim carrying per-repository resource grants. If this is set, enables the granular ResourceGrantsAuthorizer (Tier 2) authorizer.
resource_id_claim resource_id The field inside each resource entry that names the resource, for providers whose entry shape cannot be changed. Keycloak's UMA authorization.permissions entries carry the resource name in rsname, for example: set resource_claim = "authorization.permissions", resource_id_claim = "rsname" and permission_claim = "scopes" to read them. Tier 2 only.
resource_id_template urc-{id} Template that renders a repository id into the corresponding resource name. {id} is replaced by the repository id. When verifying permissions with ResourceGrantsAuthorizer (Tier 2), uses this string to search for the matching resource entry in the JWT.
resource_wildcard urc-* The resource name that matches every repository.
baseline_access denied What the baseline repository catalog answers to lore repository list: denied (the default) lists none, reachable lists every partition ID the server holds. Gates listing of the IDs only, never grants access to the contents. denied blocks no operation on a partition the caller holds a grant for. Not consulted by the auth_service or user_service catalogs. A server with no [server.auth] lists everything it holds.
repository_catalog derived Which catalog answers lore repository list: user_service fetches the list from RepositoryList on the lore.user.v1.RepositoryRegistryService at [environment.endpoint] user_url, and requires user_url. auth_service fetches the list from UrcAuthApi gRPC service's LookupUserPermissions. baseline fetches the list from the server's own store, based on baseline_access configuration rule. When unset, uses user_service if [environment.endpoint] user_url is set, else auth_service if auth_url is set, and baseline otherwise. Both remote catalogs forward the caller's own token. A listing of more than 100,000 partitions fails with RESOURCE_EXHAUSTED. Set this to auth_service to keep an auth-service catalog on a deployment authorizing from token claims, or set it to baseline to list from the server store on a UrcAuthApi deployment.
repository_catalog_url auth_url The UrcAuthApi endpoint the auth_service catalog asks. The user_service catalog ignores it and asks user_url. Defaults to [environment.endpoint] auth_url. This is required with repository_catalog = "auth_service" when auth_url is unset. The catalog forwards the caller's own token, so the endpoint must accept the tokens this server verifies.

The caller's identity, recorded as the creator of what the caller makes and compared wherever an identity is checked, is read from the token: its identity claim, or the namespaced alias https://lore.org/claims/identity, where the issuer mints one, and sub otherwise. No setting names it.

[server.auth.jwk]:

Field Default Description
endpoint none URL of the JWKS (JSON Web Key Set) endpoint, as an override for providers with non-standard discovery. When unset and jwt_issuer is an issuer URL, the server resolves the endpoint through OIDC discovery: it fetches <jwt_issuer>/.well-known/openid-configuration (the first jwt_issuer entry, when several issuers are configured) and takes jwks_uri from it. The server fetches and caches signing keys at startup and re-fetches on an unknown key ID. If this is unset, and jwt_issuer has no issuer URL, this is a startup error.
# Presence of `[server.auth]` enables JWT verification. By default the
# JWKS endpoint is resolved through OIDC discovery against jwt_issuer.
# Add [server.auth.jwk] endpoint = "..." to override discovery.
[server.auth]
jwt_issuer = "https://accounts.example.com"
jwt_audience = ["lore-service"]

[server.auth.oidc]:

When this table is present, the environment service advertises an OIDC provider to clients. GlobalGrantsAuthorizer (Tier 1) and ResourceGrantsAuthorizer (Tier 2) require it, since without [environment.endpoint] auth_url clients have no other way to log in. If auth_url is set, it is optional, and advertises the OIDC path next to the auth service during a migration. The advertised OIDC issuer is the first jwt_issuer entry, which must be an issuer URL.

Field Default Description
client_id required The public client ID clients present to the provider.
scopes [] Default scopes clients request at an interactive (device) login. Empty leaves the choice to the client.
client_credentials_scopes [] Scopes clients request when they log in with the client credentials grant, lore auth login --client-id. Set it for a provider that adds the claims Lore reads only for a requested scope. Empty requests no scope, which leaves the client's default scopes to the provider. scopes doesn't apply to this grant. Clients from the release that adds this setting on send the scopes; older clients send none.
preferred false Whether a client should use OIDC auth rather than at auth_url, if both are configured. Used during migration to route clients to the old auth by default, while allowing testing of the new OIDC auth.
token_exchange_issuer jwt_issuer The issuer of the RFC 8693 token-exchange endpoint that mints partition-scoped tokens. Set it only when a separate token service does the exchange, as an http or https issuer URL. If jwt_issuer lists it, the jwt_issuer keys verify its tokens. Otherwise, the server verifies a token naming the service as iss against the service's own keys, found through <token_exchange_issuer>/.well-known/openid-configuration, and every other token against the jwt_issuer keys. It fetches the service's keys at startup and doesn't start if it can't. jwt_audience and jwt_typ apply to the service's tokens too, and [server.auth.jwk].endpoint to the jwt_issuer keys only. Tier 2.
resource_template none Template string for mapping a partition to an RFC 8707 resource, for example https://lore.example.com/partitions/{id}. {id} is replaced by the partition ID. Tier 2.
scope_template none Template string for mapping a partition to a scope value, for example partition:{id}. For OIDC providers that use scope for token exchange, not resource. Tier 2.

ResourceGrantsAuthorizer (Tier 2, resource_claim set) requires one of resource_template and scope_template. The templates are mutually exclusive.

[server.auth]
jwt_issuer = "https://accounts.example.com"
jwt_audience = ["lore-service"]
resource_claim = "resources"

[server.auth.oidc]
client_id = "lore-cli"
scopes = ["openid", "offline_access"]
resource_template = "https://lore.example.com/partitions/{id}"

Unsigned identity

Without [server.auth], the server records every caller as <unknown>, so a lock or a notification can't tell one user from another. With server.trust_unsigned_identity = true, the server reads the identity from a bearer token without checking its signature or the values of iss, aud and exp. The token must still carry iss, sub, aud, iat and exp. It takes the identity claim, or sub when there is none, as other deployments do. A client sends such a token when the server advertises no authentication and the call has an identity, from --identity or the repository or global configuration. A request without a token is still accepted as <unknown>. A token that doesn't decode or names no identity is refused: with UNAUTHENTICATED on gRPC, with 401 on HTTP, and as an authorization failure on QUIC.

The identity names the caller and grants nothing: permissions stay as described above for a server without [server.auth]. Any caller can claim any identity, and hooks receive the token's is_service_account claim as given. No caller holds owner or admin, so only a caller naming the lock's owner can release it: lore --identity <owner> lock release <path>. A lock that a client without an identity took is owned by <unknown>.

Container sockets

[server.uds] serves the containers of one machine over stream sockets in the filesystem, one socket per container: Unix domain sockets on Linux and macOS, and AF_UNIX sockets on Windows. A server that does so is the machine's machine server; Run a machine server for containers sets one up. A client reaches a socket through a lore-unix://<upstream host>/<repository> remote, with LORE_UDS_SOCKET naming the socket (see the Lore CLI configuration reference). A connection that opens with the storage handshake speaks the storage protocol, and the server answers it from its stores with the same storage service as [server.quic]. A connection that opens with the HTTP/2 client preface carries gRPC over plaintext HTTP/2, which the server forwards to the host each request names (see Forwarded gRPC). The server closes a connection that opens with neither. The table does nothing unless it sets enabled = true.

Field Default Description
enabled false Whether to serve the sockets.
sockets [] Socket paths, one per container, each in a directory bind-mounted into its container. A relative path resolves against the server's working directory. See Socket files.
socket_mode 0o666 Permission bits of each socket file on Unix. On Windows, a mode that lets others write (0o002) lets the machine's users connect to the socket; otherwise the socket keeps what its directory grants.
credits 4000 Requests a connection may have in handling. The server states it in its handshake, and a client never has more requests outstanding.
credit_bytes 268435456 Bytes a connection may hold (256 MiB): its request bodies in handling, the largest response, 262480 bytes, for each read (Get, GetResolved) in handling, and its responses the socket has not taken yet. The server states it in its handshake.
max_connections_per_socket 64 Connections a socket holds at once, storage and gRPC alike, which the container's processes share. The server closes a connection past the limit as it accepts it. A closed connection counts until its requests in handling finish.
socket_bytes 1073741824 Bytes all of a socket's connections may hold together (1 GiB): request bodies of 4096 bytes or more in handling, the largest response for each read in handling, and responses not yet written. Smaller request bodies count against their connection's credits and credit_bytes only, so a socket may have up to max_connections_per_socket times credits of those requests in handling, 256000 by default.
handler_timeout_seconds 50 Longest the server handles one storage request before it answers SlowDown, from 1 to 65535. The server states it in its handshake.
forward {} Hosts gRPC is forwarded to: a table from the host name a request names to the URL the server reaches that host at. See Forwarded gRPC.

When a connection reaches credits, credit_bytes or socket_bytes, the server stops reading it until a handler finishes or a response is written, and the socket's own buffer holds the client back. The server never answers SlowDown for these limits.

The server closes a connection whose first four bytes, or the rest of its storage handshake or HTTP/2 client preface after them, take more than 5 seconds to arrive. It also closes a storage connection whose client takes none of its responses for 30 seconds. No setting changes either bound.

At the shutdown signal, the server stops accepting on its sockets and closes every socket connection, storage and gRPC alike, as it closes its QUIC connections. Requests still in handling get no response. A client reconnects with back-off once a server answers on the socket again, and sends a request the closed connection failed once more.

With enabled = true, the server refuses to start unless all of these hold:

  • [server.auth] is set, since the sockets verify every token.
  • The authorizer grants per partition: [environment.endpoint] auth_url is set, or [server.auth] resource_claim is (Tier 2). GlobalGrantsAuthorizer (Tier 1) lets every authenticated caller reach every partition, so the sockets refuse it.
  • sockets names at least one path.
  • handler_timeout_seconds is from 1 to 65535.
  • Every key in forward is a bare host name, with no scheme or port, and every value is a valid URL.

An empty forward starts the server with a warning: its containers then reach no host over gRPC, so they can't clone or push.

Whatever its configuration, the server refuses to start with LORE_UDS_SOCKET set in its own environment: the variable would send the server's own gRPC, such as a remote store's calls to its upstream, into a socket (see the Lore CLI configuration reference). An empty value reads as unset.

The server raises a value below its floor instead of refusing it: credits to 1, credit_bytes and socket_bytes to 524960, twice the largest message body, and max_connections_per_socket to 1. It lowers credits above 1048575 to 1048575.

Socket files

For each path in sockets, the server:

  • Creates the socket's directory when it is missing. On Unix it leaves the directory's permissions to the operator. On Windows a directory it creates lets only SYSTEM, the Administrators and its owner change it, and the machine's users list and traverse it; the server refuses an existing directory that another account owns or may change.
  • Claims the path with a lock file beside the socket, <socket>.lock, and refuses a path that another server has claimed or answers on. The lock file stays after the server stops.
  • Removes whatever file is at the path once nothing answers on it, a socket or not, so a sockets entry must name a path that holds no other file. Then binds a new socket at the path and applies socket_mode to it.
  • Removes the socket file when it stops.

A socket the server cannot claim or bind stops the server.

Forwarded gRPC

A client that names a socket sends every gRPC request through it, with the host it would have dialed as the request's authority: the upstream, its authentication service, and each service endpoint the upstream advertises. forward maps each such host name, without its port and compared without regard to case, to the URL the server reaches it at, so it names every one of them. Each socket reaches each host over a connection of its own, with TLS for an https URL, so a container that stops reading a response holds up no other container's requests. It answers a request for a host the table does not name with PERMISSION_DENIED, and a request it cannot deliver with UNAVAILABLE. A request's metadata, its token included, passes through unchanged: the server verifies no token on gRPC, and the host it forwards to authorizes the caller.

# Also needs [server.auth] and an authorizer that grants per partition; see above.
[server.uds]
enabled = true
sockets = ["/var/run/lore/build-1/lore.sock", "/var/run/lore/build-2/lore.sock"]

[server.uds.forward]
"lore.example.com" = "https://lore.example.com:41337"
"auth.example.com" = "https://auth.example.com"

Store settings

Lore Server keeps three stores: an immutable store for content-addressed fragments, a mutable store for branch pointers, and a lock store for distributed locking. Each is configured by a top-level table — [immutable_store], [mutable_store], [lock_store] — whose mode field selects the backend.

Table mode default Available modes
[immutable_store] local local, composite, replicated, remote, or a plugin name such as aws.
[mutable_store] local local, remote, or a plugin name such as aws.
[lock_store] local local, none, or a plugin name such as aws (DynamoDB).

lock_store.mode = "none" builds no lock store, so LockService does not register. The mode exists because default.toml sets [lock_store] and a layered configuration cannot remove a key a lower layer supplied.

Each mode reads its settings from a matching sub-table. The local mode uses [immutable_store.local], [mutable_store.local], and the in-memory local lock store. Plugin modes such as aws read from [plugins.<name>] (see Plugin backends).

Local store mode

[immutable_store.local] and [mutable_store.local] configure the on-disk local stores. The mutable store accepts only path and flush_delay_seconds; the immutable store accepts the full set below.

Field Default Applies to Description
path derived <temp>/lore-server both Filesystem location for the store. When empty, the server derives a path under the system temporary directory at startup (ephemeral — see Zero-config defaults).
flush_delay_seconds 10 both Seconds between background flushes to disk. In the immutable store, index writes pending after a capacity eviction pass are also spread across this interval, group by group, except in maintenance mode, where they are written as the pass ends. If the server stops before a group's writes reach disk, the entries evicted from that group are back when it restarts.
max_capacity none immutable Maximum number of entries before eviction.
max_size none immutable Maximum total store size in bytes before background compaction reclaims space. Compaction rewrites a group's packfiles only once at least 10% of their bytes are no longer referenced.
eviction_delay none immutable Interval in milliseconds between eviction passes. Defaults to 10 s when unset.
compaction_delay none immutable Interval in milliseconds between compaction passes. Defaults to 24 h when unset.
target_capacity_percentage 70 immutable Capacity-utilization target (percent) that eviction reclaims down to. Applies only when max_capacity is set; 0 or ≥100 is treated as 70.
target_size_percentage 70 immutable Size-utilization target (percent) that compaction reclaims down to. Applies only when max_size is set; 0 or ≥100 is treated as 70.
compaction_parallel_groups 8 immutable Number of compaction groups processed in parallel.

Note

The composite mode layers a local cache tier over a durable plugin tier (for example, a local cache in front of S3). It reads [immutable_store.composite.local] and [immutable_store.composite.durable], where the durable tier names a plugin mode such as aws, or remote (see Remote store mode). Composite store internals are out of scope here. Of the replicated store's settings, only congestion_algorithm is covered, in Replicated store mode.

The lock store's local mode takes no sub-table — it uses an in-process, in-memory lock store (a single in-memory map) with no fields to configure. Because it lives entirely within one server process, it coordinates locks only on that node; distributed locking across a multi-node cluster requires a plugin backend such as aws (DynamoDB).

Remote store mode

The remote mode keeps a store at another Lore server, the upstream, which the server reaches as a client does: the immutable store reads and writes content there, and the mutable store loads and stores mutable keys there, but lists none. [immutable_store] mode = "remote" reads [immutable_store.remote], [mutable_store] mode = "remote" reads [mutable_store.remote], and a composite store's durable tier in remote mode reads [immutable_store.composite.durable.remote]. The server refuses to start in remote mode without the table. How many storage connections it opens to the upstream follows server.upstream_connections (see Server and endpoint settings).

Field Default Applies to Description
remote_url required both URL of the upstream as a client names it, without a repository, for example lores://lore.example.com:41337.
verify false immutable Whether the store checks each payload the upstream serves against its address, decoding and hashing it. When false, the store trusts the upstream and checks only a payload's sizes. Either way, a client checks each payload it fetches from the server against its address, except a client that trusts its remote (--trust-remote, or trust_remote or skip_verify through the C API), which checks only the sizes. A client that finds a payload corrupt asks the server to heal it: the server drops its own copy only if that copy is corrupt, and asks the upstream to heal only where its own copy was corrupt or missing.
auth_url none immutable Despite its name, the identity the store authenticates at the upstream as, not a URL. The server uses the login stored for that identity in the token store of the user it runs as. When unset, the store uses the first identity stored there that the upstream accepts. The remote mutable store ignores the field and always uses that first identity.
congestion_algorithm bbr both Congestion controller a storage connection to the upstream runs when the store establishes it, which paces what the server sends there, such as content it writes through: bbr or cubic. A connection to the upstream already established is reused as it is, so where the immutable and mutable stores reach one upstream as the same identity, their connections run the controller of the store that established them. Any other value fails startup. The server reads no environment variable for it; LORE_QUIC_CONGESTION_ALGORITHM is for clients with no settings to name one.
[mutable_store]
mode = "remote"

[mutable_store.remote]
remote_url = "lores://lore.example.com:41337"

Replicated store mode

The replicated mode forwards the immutable store's operations to another Lore server, the peer, which the server reaches on the peer's internal QUIC endpoint, [server.quic_internal] (see QUIC endpoints). [immutable_store] mode = "replicated" reads [immutable_store.replicated], and a composite store's tier in replicated mode reads the replicated table of that tier, such as [immutable_store.composite.durable.replicated]. The server refuses to start in replicated mode without the table. Only the table's congestion_algorithm field is covered here.

Field Default Description
congestion_algorithm cubic Congestion controller of each connection the store establishes to the peer's internal QUIC endpoint, which paces what the server sends there, such as the content it stores at the peer: bbr or cubic. It applies to every connection the store establishes, including those that replace a connection at a periodic refresh or after a failure. A connection already established is reused as it is, with the controller it was established with. What the peer sends back follows the congestion_algorithm of the peer's [server.quic_internal]. Any other value fails startup. LORE_QUIC_CONGESTION_ALGORITHM doesn't apply to it.
[immutable_store]
mode = "replicated"

[immutable_store.replicated]
# remote_url and the store's other settings, not covered here
congestion_algorithm = "bbr"

Topology settings

[topology] selects how the server discovers its peers. The provider field is the selector.

provider Discovery model Configuration
none (default) Single-node mode, no peers. None.
fixed Static, built-in peer list. [topology.fixed].
rotating_id_fixed Static peer list whose IDs rotate on an interval (built-in). [topology.rotating_id_fixed].
composite Merges peers from one or more topology sources (built-in). [topology.composite].
consul Dynamic service discovery (plugin). Configured via [plugins.consul]. See Plugin backends.

When [topology] is omitted entirely, the server runs in single-node mode, the same as provider = "none".

Fixed topology

[topology.fixed] holds a static peers array. Each peer is a table with address, port, and locality — all three are required.

[topology]
provider = "fixed"

[topology.fixed]
peers = [{ address = "192.168.1.10", port = 41340, locality = "SameRegion" }]
Field Description
address Peer hostname or IP address.
port Peer port.
locality Peer locality relative to this server: either SameRegion or OtherRegion.

[topology.fixed] also takes an optional self_address. The server leaves out any peer whose address is exactly equal to it. Set it to the server's own address so that every server in a group can share one peers list without replicating to itself. As a scalar it can come from the environment, for example LORE__TOPOLOGY__FIXED__SELF_ADDRESS, which lets each server name itself while the list stays in a shared file.

[topology.fixed]
peers = [
    { address = "lore-0.lore-headless", port = 41340, locality = "SameRegion" },
    { address = "lore-1.lore-headless", port = 41340, locality = "SameRegion" },
]
self_address = "lore-0.lore-headless"

Rotating-ID fixed topology

[topology.rotating_id_fixed] is fixed with periodically rotating peer IDs. It takes the same peers array plus a required rotation_interval_seconds.

[topology]
provider = "rotating_id_fixed"

[topology.rotating_id_fixed]
rotation_interval_seconds = 300
peers = [{ address = "192.168.1.10", port = 41340, locality = "SameRegion" }]

Composite topology

[topology.composite] combines peers from several topologies. Its sources array holds nested topology configs, each with its own provider and settings.

[topology]
provider = "composite"

[[topology.composite.sources]]
provider = "fixed"
fixed = { peers = [{ address = "192.168.1.10", port = 41340, locality = "SameRegion" }] }

[[topology.composite.sources]]
provider = "consul"

Plugin backends

Backends beyond the built-in store modes and topology providers documented above are supplied by plugins, selected with the same mode / provider fields.

Important

Plugins are compiled into the server binary, not loaded at runtime. The stock open-source loreserver registers no plugins, so selecting a plugin backend — mode = "aws", provider = "consul", and so on — fails at startup with a PluginNotFound error listing the plugins actually available (none, by default). Using a plugin requires a server binary built with that plugin registered. The aws and consul backends referenced elsewhere on this page are reference implementations that ship as source in this repository (the lore-aws and lore-hashicorp crates) but are not part of loreserver.

How plugin selection works

Five kinds of backend can be supplied by a plugin, each chosen by a different field:

Plugin kind Selector Built-in alternatives
Immutable store immutable_store.mode local, composite, replicated, remote
Mutable store mutable_store.mode local, remote
Lock store lock_store.mode local, none
Topology topology.provider none, fixed, rotating_id_fixed, composite
Notification notification.mode local

When a selector names a plugin rather than a built-in, the server hands that plugin its [plugins.<name>] table as raw configuration and lets the plugin parse it. The field names and defaults of [plugins.<name>] are therefore owned by the plugin — and by the binary that compiles it in — not by loreserver. If no plugin of that name is registered, startup fails with PluginNotFound; a malformed plugin table fails with PluginConfigError; and a plugin that starts but cannot reach its backend fails with PluginInitError.

Reference plugins

This repository ships two reference plugin implementations as source. Both require a derived server binary that registers them; neither is compiled into loreserver.

  • lore-aws backs the immutable store with Amazon S3 and DynamoDB, and the mutable and lock stores with DynamoDB. AWS credentials do not come from the config file. They resolve from, in order: the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, container credentials (ECS and EKS Pod Identity), web identity (AWS_WEB_IDENTITY_TOKEN_FILE with AWS_ROLE_ARN, as EKS IRSA sets them), the EC2 instance metadata service, and static keys in ~/.aws/credentials, or AWS_SHARED_CREDENTIALS_FILE, for the profile AWS_PROFILE names (default when unset). ~/.aws/config is not read, and a profile that takes its credentials from role_arn, SSO or credential_process does not resolve. Each store takes its region from its region setting, AWS_REGION or AWS_DEFAULT_REGION, and fails to start without one.
  • lore-hashicorp provides a Consul topology that discovers peers from a service catalog. It only reads the catalog — each server must be registered in Consul externally (by your orchestrator or a Consul agent) — returns only passing or healthy nodes, and re-polls on a fixed interval.

Note

Per-field configuration for these plugins depends on the binary that registers them and is out of scope for this page. A dedicated Server plugins guide — covering the plugin registry, the factory traits, and how to build a server binary with plugins compiled in — is planned.

Hook system config

Hooks run custom logic at points in the server lifecycle. Each hook is configured in its own [hooks.<name>] table. Every hook table has an enabled flag (default false) plus fields specific to that hook.

Hooks fire at these points:

  • BranchPush — before a branch push is committed.
  • BranchCreate — before a new branch is created.
  • BranchDelete — before a branch is deleted.
  • RepositoryCreate — before a new repository is created.
  • Obliterate — before content is obliterated.

A hook's pre-handler runs before the operation, and the operation waits for it. A pre-handler still running after 1 second, or after the timeout the hook sets for itself, is cancelled and the operation fails with UNAVAILABLE, so the client can retry. On the v1 BranchPush, BranchCreate, and BranchDelete RPCs, a pre-handler sees the branch name and whether the caller is a service account.

A hook can veto an operation by returning an error, log or audit it, or trigger an external notification. The example below sketches a compliance hook that denies pushes to protected branch patterns and posts to a webhook on failure. It is illustrative — deny_patterns, allowed_users, and webhook_url are fields a custom compliance hook would define; the stock loreserver ships no such hook (see note below):

# Illustrative only — requires a custom "compliance" hook compiled in.
[hooks.compliance]
enabled = true
deny_patterns = ["^release/.*$", "^protected/.*$"]
allowed_users = ["admin", "release-bot"]
webhook_url = "https://compliance.example.com/notify"
Field Description
enabled Whether the hook is active. Defaults to false.
Hook-specific fields Each hook defines its own fields — for example deny_patterns, allowed_users, and webhook_url for a compliance hook, or per-event webhook URLs for a notification hook.

Note

The base loreserver binary registers no hooks. A [hooks.<name>] table is matched by name against hooks compiled into the binary: a disabled table for an unknown hook is ignored, but an enabled table naming a hook that isn't compiled in aborts server startup. Custom hooks implement the Hook and HookFactory traits in Rust and are wired in by build.rs at compile time (the registry is populated at startup).

Telemetry settings

[telemetry.logger] configures log output. [telemetry.exporter] configures the OpenTelemetry (OTLP) exporter. [telemetry.metrics] and [telemetry.traces] tune metric collection intervals and trace sampling.

Field Default Description
telemetry.logger.format json (shipped default) Log line format. One of ansi, json, or text.
telemetry.logger.output stdout Log destination. One of stdout, stderr, or a { file = "<path>" } table.
telemetry.logger.enable_otlp false Forward logs over OTLP in addition to the local output.
telemetry.exporter.endpoint none OTLP collector endpoint, for example http://collector:4317.
telemetry.exporter.queue_size none Export queue size.
telemetry.exporter.timeout none Export timeout in milliseconds.
telemetry.additional_labels none Extra key-value labels attached to exported telemetry.

Note

[telemetry.exporter] is optional as a whole, but when the table is present all three fields (endpoint, queue_size, timeout) are required — they have no individual defaults. Logs, metrics, and traces are exported over OTLP only when [telemetry.exporter] is configured; telemetry.logger.enable_otlp forwards logs only in that case.

Metrics and traces

[telemetry.metrics] and [telemetry.traces] ship in default.toml with the defaults below.

[telemetry.metrics]:

Field Default Description
export_interval_millis 30000 Interval in milliseconds between samples of the async (Tokio) runtime metrics.
sample_interval_millis 10000 Interval in milliseconds at which the OTLP reader exports metrics to the collector; also paces local-store memory-stats reporting.

[telemetry.traces]:

Field Default Description
sample_rate 0.05 Fraction of traces sampled.
sample_rate_low_tier 0.001 Sampling fraction applied to low-tier (high-volume) traces.
service_name none Service name reported on exported traces. Falls back to lore when unset.

Note

Both sample rates must fall within [0.0, 1.0] inclusive, or the server refuses to start with a configuration error.

Notification settings

[notification] selects the notification backend.

Field Default Description
notification.mode local Notification backend. local uses in-process broadcast channels; any other value names a notification plugin.

Examples

Run with zero config

loreserver

Starts a single-node server from the built-in defaults: an ephemeral self-signed certificate, a store under <temp>/lore-server, and the presigned URL feature disabled. Everything is local — the certificate is regenerated on each start, and the store lives in the OS temp directory, which a reboot can clear. For trying Lore out, not for keeping data.

Persistent single-node server with a local overlay

Create a config directory with a local.toml that pins the stores to a fixed path and references real certificates:

# ./config/local.toml
[server.quic.certificate]
cert_file = "./cert.pem"
pkey_file = "./key.pem"

[immutable_store.local]
path = "/var/lib/lore/store"
flush_delay_seconds = 10

[mutable_store.local]
path = "/var/lib/lore/store"
flush_delay_seconds = 10

[topology]
provider = "none"
loreserver --config ./config

The local.toml overlay overrides the defaults, so the stores persist at /var/lib/lore/store across restarts.

Select a non-default environment

loreserver --config /etc/lore/config --env dev

Layers /etc/lore/config/dev.toml over the built-in defaults, then /etc/lore/config/local.toml. A missing dev.toml is skipped, so this is safe even when only local.toml exists. The same selection works through environment variables: LORE_ENV=dev LORE_CONFIG_PATH=/etc/lore/config loreserver.

See also