Storage

Configuration — v0.9.0

Advanced configuration and schema inspection for Alloy Edge v0.9.0

For the full schema of the version on your device, run alloy-edge config show --json --schema. Current version: v0.9.7 and v0.9.8.

This is an advanced reference for devices that already run v0.9.0. Start with Track Folder v0.9.0; link creates the required files and run selects them from the installation scope.

Files and locations

FilePurpose
edge-manager.yamlCloud connection, identity seed, process supervision, and restart policy
edge-sync.yamlTracked folder, upload behaviour, disk cleanup, lifecycle, and processing pipeline
Transform YAMLOptional per-recording transformation or redaction rules
ScopeConfigurationState
User$XDG_CONFIG_HOME/alloy-edge or ~/.config/alloy-edge$XDG_STATE_HOME/alloy-edge or ~/.local/state/alloy-edge
Folder-local<track-folder>/.alloy<track-folder>/.alloy/state
System/etc/alloy-edge/var/lib/alloy-edge

Use --user, --system, or --local to select an installation explicitly. Without a scope, Alloy Edge discovers the nearest valid folder-local installation, then the user installation, then the system installation. A malformed installation is an error; it does not silently fall back.

edge-manager.yaml

Top-level fields

FieldDefaultPurpose
backend_urlAlloy production backendAlloy backend endpoint. ALLOY_BACKEND_URL overrides it.
state_dirScope-specific state directoryManager state, credentials, desired state, and child configuration. ALLOY_STATE_DIR overrides it.
remote_statelink writes enabled: falseenabled: true applies the process configuration from Edge settings in Alloy. enabled: false uses local_state. paused: true keeps the device connected but stops applying configuration from Alloy.
tags{}Device tags set on the device. They override tags with the same key from Alloy.
seed_state{}Bootstrap identity and transport used until the device is approved.
local_state—Processes and tags used when remote_state.enabled is false. Alloy Edge ignores this block while remote configuration is on.
supervisorBuilt-in defaultsAdvanced restart, backoff, stability, and shutdown tuning.

If remote_state is absent, a file with local_state uses local configuration, and a file without local_state uses remote configuration.

Credentials and device identity live under the installation state directory. Deleting state is not a harmless cache clear. Use alloy-edge unlink with the installation's scope when intentionally removing a linked installation.

seed_state

alloy-edge link writes and manages credentials for new installations. The seed fields remain available for legacy or manually authored installations:

FieldDefaultPurpose
api_key—Enrollment-only provisioning key used until approval. Prefer alloy-edge link; runtime commands use the persisted device key.
edge_idMachine ID, then a random IDDevice identifier reported to Alloy. Without a value, Alloy Edge uses the operating system's machine ID. If it cannot read one, it generates a random ID that changes on every start. ALLOY_EDGE_ID overrides it.
tags{}Initial tags for grouping and filtering devices. Alloy manages them after the first sync.
transport.http.poll_secs15Seconds between desired-state checks. link writes 5.
processes[]Bootstrap processes used before the first successful cloud sync. Prefer local_state.processes for locally owned processes.

local_state

FieldDefaultPurpose
tags{}Device tags used when local configuration is selected.
processes[]Processes to run when local configuration is selected. See below.
reportfalseReport a safe, read-only projection of this state to Alloy.

local_state.processes

FieldDefaultPurpose
name—Required process name used in logs and reported state.
command—Command to execute. A process without a command stays stopped.
enabledtrueKeep the process declared but stopped when false.
restarton_failureRestart policy: always, on_failure, or never.
shellfalseRun through /bin/sh -c when shell expansion is required.
triggerStart on applyStart at boot, on a five-field cron schedule, or when connectivity returns.
duration—Stop the process after a bounded duration.
requires_authfalseHold the process until Alloy approves the device. Set this for the sync process.
files{}Inline configuration files attached to the process.

Set local_state.report: true to report a safe, read-only projection of locally pinned state to Alloy. The default is false.

link writes a locally owned Track Folder sync process like this:

remote_state:
  enabled: false
  paused: false
local_state:
  report: false
  processes:
    - name: sync
      command: 'alloy-edge internal sync -c "$ALLOY_CONFIG_DIR/edge-sync.yaml"'
      shell: true
      enabled: true
      restart: on_failure
      trigger: boot
      requires_auth: true

supervisor

FieldDefaultPurpose
max_restarts10Restarts allowed before a child is marked crashed.
max_backoff_secs60Maximum exponential restart backoff.
stable_secs60Runtime required before the restart count resets. Must be greater than zero.
graceful_timeout_secs10Grace after SIGTERM before SIGKILL.

edge-sync.yaml

v0.9 uses strict schema version 1. Only input_dir is required. Cleanup has no size or age limit by default, with a default maximum of 100,000 files.

version: 1
input_dir: /data/recordings
file_pattern: "*.mcap,*.json,*.jsonl"
upload_delay: 30s

cleanup:
  max_folder_size: 10GB
  max_file_age: 72h
  max_file_count: 1000

lifecycle:
  original:
    after: keep

Durations use strings such as 5s, 1m, 72h, and 7d. Sizes and bandwidth limits use values such as 500MB, 10GB, and 5MB.

Scanning and upload

FieldDefaultPurpose
version—Set to 1 for the current strict schema. An absent value enters legacy compatibility mode.
input_dir—Required folder to scan.
file_pattern*.mcap,*.json,*.jsonlComma-separated file globs. .tmp entries are reserved and removed.
cycle_time1sSafety-net scan interval.
upload_delay30sMinimum age before a footer-less recording is eligible.
upload_orderoldest_firstDispatch ready files using oldest_first or newest_first.
mcap_require_footerfalseRequire an MCAP footer instead of falling back to file age.
upload_typesigned_urlsigned_url uploads to Alloy. none keeps files on the device and uploads nothing.
bwlimitUnlimitedOutbound bandwidth limit.
max_concurrent_uploads1Number of files uploaded in parallel.
scan_exclude[]Subdirectory basenames to skip; dot-directories are always skipped.
fs_event_enabledtrueUse filesystem events for low-latency scans while retaining periodic scans.

The top-level part_concurrency and signed_url_endpoint fields are deprecated compatibility aliases. Leave them out of new configuration.

Cleanup and upload state

FieldDefaultPurpose
cleanup.max_folder_sizeUnboundedDelete oldest eligible files when the tracked folder exceeds this size.
cleanup.max_file_age—Delete eligible files older than this duration.
cleanup.max_file_count100000Delete oldest eligible files when the count exceeds this limit.
state_dirScope-specific state directoryHolds sync state and shared device credentials.
index_store.backendsqlitePer-file upload state: sqlite or jsonl. Switching backends migrates automatically when sync starts.
index_store.pathDerived from state_dirOptional JSONL path and SQLite migration source.

Under version: 1, the top-level max_folder_size, max_file_age, max_file_count, and keep_files fields are rejected with an error. Put cleanup limits in the cleanup: block and use lifecycle in place of keep_files. The deprecated txlog_path, credentials_dir, and flat redaction block still load for compatibility, but do not use them in new configuration.

Lifecycle

Lifecycle controls what happens to the original and to each transformed artefact:

lifecycle:
  original:
    after: keep
    cleanup:
      include_in_storage_cleanup: false
  transform:
    after: move
    move_to: .alloy-redacted
    cleanup:
      include_in_storage_cleanup: false
    on_rule_error: skip_record
    on_reader_error: skip_tail
    output_compression: inherit
    audit:
      jsonl_path: .alloy/state/redaction-audit.jsonl
      embed_in_mcap: true
      max_bytes: 5MB
      max_files: 2
FieldDefaultPurpose
original.afterkeepkeep/keep_continue, keep_stop, delete, or move the source.
original.uploadSee belowUpload the untransformed original if it reaches the end of the pipeline.
transform.afterkeepkeep, delete, or move the transformed artefact.
<stage>.move_toStage-specific dot-directoryDestination when after: move; relative paths resolve from input_dir.
<stage>.cleanup.include_in_storage_cleanupfalseInclude moved files in the global size, age, and count limits.
transform.on_rule_errorskip_recordskip_record, skip_file, or explicitly opt into pass_original.
transform.on_reader_errorskip_tailskip_tail, abort, or recover malformed MCAP data.
transform.output_compressioninheritinherit, none, zstd, or lz4.
transform.audit.jsonl_path—Write an optional rotating JSONL audit sidecar.
transform.audit.embed_in_mcaptrueEmbed the audit record in the transformed MCAP.
transform.audit.max_bytes5MBRoll the sidecar before it exceeds this size; 0 disables rotation.
transform.audit.max_files2Rotated generations to retain; must be at least one.

The original.upload default depends on the rest of the file. With no pipeline: and no flat redaction block, it is true unless upload_type is none, so original recordings upload. With a pipeline or a flat redaction block, it is false. Do not set original.upload: false in a file without a pipeline unless you want to stop uploading original recordings.

Processing pipeline

The optional ordered pipeline can filter, transform, upload, and retain different artefacts from one recording:

pipeline_trigger: delay-after-close
pipeline:
  - transform: .alloy/redaction.yaml
    transform_suffix: redacted
    upload: true
    transform_after: delete
    original_after: delete
    file_pattern: "**/camera/*.mcap"
    filter:
      require_topics: ["/nav/**"]
      min_duration: 60s
      min_messages: 100
      min_size: 10MB
      if: "done == true"
      if_at: any
FieldDefaultPurpose
pipeline_triggerdelay-after-closeStart after the close delay, or use close to start as soon as the file closes.
transform—Rules file used to create a transformed artefact.
transform_suffixStep indexInfix added to the transformed filename.
uploadfalseUpload the transformed artefact. Requires transform.
original_afterlifecycle.original.afterControl source flow after this step.
transform_afterlifecycle.transform.afterKeep, delete, or move the transformed artefact.
file_patternAll filesRestrict the step to matching paths.
filter.mcap_require_footer—Wait and retry when an MCAP footer is absent.
filter.require_topics[]Require matching topics; glob patterns are supported.
filter.min_duration—Require a minimum recording duration.
filter.min_messages—Require a minimum message count.
filter.min_size—Require a minimum file size.
filter.if—Evaluate a Jinja2 expression against JSON or MCAP record content.
filter.if_atanySelect records for if: any, first, last, an index, or a range.
filter.require_fields—Equality-map shorthand for simple if conditions.

All configured filter conditions must match for a step to run. A content miss continues to the next step rather than failing the file.

Inspect, validate, and edit configuration

The v0.9 CLI is the canonical source for the complete schema installed on a device:

# Authored manager and every referenced sync/transform file
alloy-edge config show

# Deterministic JSON plus the complete Draft 2020-12 schemas
alloy-edge config show --json --schema

# Validate the selected installation and every referenced file
alloy-edge config check

Select manager or an exact configured process name to narrow config show. Add --no-comments for plain YAML, or use --json --comments for source-ordered comments alongside the semantic JSON projection.

Prefer the configuration CLI for small edits. It preserves unrelated comments and styles, validates a staged candidate, and atomically replaces the source:

alloy-edge config set track-folder /data/recordings
alloy-edge config set sync.input_dir /data/recordings
alloy-edge config set sync.upload_delay 60s

Process names form the first segment of an address, such as sync.input_dir. Use alloy-edge config show to see the configured process names before editing. Do not change manager.state_dir: it must match the installation scope.

After changing configuration, restart alloy-edge run or its service. Validate a change without backend calls or child processes with:

alloy-edge run --user --dry-run

For transformation rules, continue to the Redaction reference.

On this page