Storage

Configuration — v0.8.5

Advanced edge-manager.yaml and edge-sync.yaml reference for Alloy Edge v0.8.5

Current version: v0.9.7 and v0.9.8.

This reference is for v0.8.5. Do not copy these files into a v0.9 installation.

The v0.8 Track Folder flow uses two YAML files:

FileLoaded byPurpose
edge-manager.yamlalloy-edge managerCloud connection, device identity, and local process supervision
edge-sync.yamlalloy-edge syncFolder watching, uploads, cleanup, lifecycle, and the processing pipeline

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

Print the complete commented templates shipped with your installed binary:

alloy-edge manager sample-config
alloy-edge sync sample-config

edge-manager.yaml

Top-level fields

FieldPurpose
backend_urlAlloy backend endpoint. Defaults to the Alloy production backend; ALLOY_BACKEND_URL overrides it.
state_dirManager state, credentials, and child configuration. Defaults to .alloy/state; ALLOY_STATE_DIR overrides it.
seed_stateBootstrap identity and transport used until the device is approved.
local_stateLocally owned tags and processes that cloud configuration cannot overwrite.

seed_state

FieldDefaultPurpose
api_key—Provisioning key used until approval. ALLOY_PROVISIONING_KEY overrides it before approval; ALLOY_API_KEY overrides the permanent key at runtime.
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.
processes[]Bootstrap processes used before the first successful cloud sync. Prefer local_state.processes for locally owned processes.

local_state.processes

FieldDefaultPurpose
name—Required process name used in logs and reported state.
command—Required command to execute.
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 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 alloy-edge sync.
files{}Inline configuration files attached to the process.

A locally owned Track Folder sync process has this shape:

local_state:
  processes:
    - name: edge-sync
      command: alloy-edge sync --config /data/recordings/.alloy/edge-sync.yaml
      enabled: true
      restart: on_failure
      trigger: boot
      requires_auth: true

edge-sync.yaml

v0.8 uses strict schema version 1. Only input_dir is required. Cleanup limits default to no size or age limit, 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

Scanning and upload

FieldDefaultPurpose
version—Set to 1 for the v0.8 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 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_dir.alloy/stateHolds sync state and the shared device credentials.
index_store.backendsqlitePer-file upload state: sqlite or jsonl. Switching backends migrates automatically when sync starts.

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. | index_store.path | Derived from state_dir | Optional JSONL path and SQLite migration source. |

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
FieldDefaultPurpose
original.afterkeepkeep/keep_continue, keep_stop, delete, or move the source.
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.
original.uploadSee belowUpload the untransformed original if it reaches the end of the pipeline.
transform.on_rule_errorskip_recordskip_record, skip_file, or explicitly fail open with pass_original.
transform.on_reader_errorskip_tailskip_tail, abort, or recover malformed MCAP data.
transform.output_compressioninheritinherit, none, zstd, or lz4.
transform.auditEmbedded audit enabledConfigure the JSONL sidecar and embedded MCAP audit record.

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
FieldDefaultPurpose
pipeline_triggerdelay-after-closeStart after the close delay, or use close to start on a close event.
transform—Rules file used to create a transformed artefact.
transform_suffixStep indexInfix added to the transformed filename.
uploadfalseUpload the transformed artefact.
original_afterlifecycle.original.afterkeep/keep_continue, keep_stop, delete, or move the source after this step.
transform_afterlifecycle.transform.afterKeep, delete, or move the transformed artefact.
file_patternAll filesRestrict the step to matching paths.
filter—Gate the step by footer, topics, duration, message count, file size, or content expression.

When alloy-edge sync starts, it upgrades an unstamped v0.7-style sync file to version: 1 and keeps the original as <name>.bak. To preview or run the migration yourself:

alloy-edge migrate --config /data/recordings/.alloy/edge-sync.yaml --dry-run
alloy-edge migrate --config /data/recordings/.alloy/edge-sync.yaml

For transform-rule syntax, use the Redaction reference.

On this page