Skip to main content

Environment reference

The keys Crumb reads from .env, grouped by area (a few generic ones like RUST_LOG and LOG_FORMAT are omitted, and so are the deep internals that exist only to make a test or a support session easier). .env.example in the repository carries the same set with inline comments; this page is the browsable version of it, and the two are kept in step. Most installs never need to touch most of these, setup-env.sh fills in the values that matter for a first boot.

Every key below, apart from the last table, is wired into the stock docker-compose.yml (the GPU keys ride in via their opt-in overlay files), so the workflow is uniform: set the key in .env, restart the affected container, done. No docker-compose.override.yml is needed. Where a value is also editable in the admin console, the console value (stored in the database) wins over the env default; that's flagged in the notes.

Most secret-bearing keys also answer to a _FILE twin (DATABASE_URL_FILE, JWT_SECRET_FILE, SEED_ADMIN_PASSWORD_FILE, METRICS_TOKEN_FILE, HA_TOKEN_FILE) holding a path to read the value from, for Docker secrets. The _FILE twin is read in preference to the plain variable, so a mounted secret always wins over a stale value left in .env. GO2RTC_USER/GO2RTC_PASS are a partial exception: the api does read GO2RTC_USER_FILE/GO2RTC_PASS_FILE, but the embedded go2rtc restreamer expands the plain variables straight from the process environment and compose requires them, so the plain form has to be set regardless and the _FILE twin buys you nothing on its own. Only HA_TOKEN_FILE and METRICS_TOKEN_FILE get their own rows below, because the others are mechanical; see Secrets for the list.

Time zone​

KeyDefaultNotes
TZUTCLocal wall-clock for the whole stack: quiet hours, the nightly DB backup schedule (DB_BACKUP_SCHEDULE), the offsite-sync cron, every log timestamp, and the event times in notifications sent to providers that cannot localize them themselves (ntfy, Pushover, Telegram, the generic webhook; Discord and Slack render in each viewer's own zone instead). Set an IANA name like America/Los_Angeles or Europe/Berlin. setup-env.sh detects the host's zone and writes it; if it can't, the compose default is UTC (not any local zone), so the clock is at least predictable.
RECORDER_TZinherits TZIANA zone the recorder's per-camera archive-schedule cron runs in. Unset or empty means it inherits TZ above, which is what you want; set it only to run archive schedules in a different zone than the rest of the stack. A value that fails to parse is logged loudly and falls back rather than stopping the recorder.

PostgreSQL​

KeyDefaultNotes
POSTGRES_USERcrumb
POSTGRES_PASSWORDgeneratedstrong random value from setup-env.sh
POSTGRES_DBcrumb
DATABASE_URLderivedfull connection string used by api + recorder
DB_POOL_SIZE32connection pool size. Fixed default of 32, not a per-camera formula. Raise it past ~16 cameras (rule of thumb 2 * cameras + 10), and raise Postgres max_connections to match. Forwarded by the stock docker-compose.yml to both api and recorder; set it in .env and restart both containers.

WebRTC live (iOS / browser)​

KeyDefaultNotes
WEBRTC_CANDIDATEemptyThe server's own LAN IP that go2rtc advertises to WebRTC/iOS clients as an ICE candidate, in the form <server-LAN-ip>:8556. Required for the iOS/browser WebRTC live path: without it, LAN clients never complete ICE and live silently degrades to roughly 1fps snapshots. setup-env.sh detects and writes the host LAN IP; leave it blank only if you don't use WebRTC/iOS live view.

Streaming (go2rtc)​

Crumb's own go2rtc restreamer runs embedded in the recorder container. The values below are fallbacks: once you set the server's address in the admin console's Server section, that value wins.

The admin console's Crumb RTSP base is client-facing only: it is the address native desktop and phone apps are told to pull from, and nothing else reads it. The recorder dials its own embedded go2rtc over loopback, so you can set that field to whatever your clients can reach without affecting recording.

KeyDefaultNotes
CRUMB_GO2RTC_API_BASEemptyleave blank, internal compose defaults are correct. Read by the api only (http://recorder:1984); the recorder does not talk to go2rtc's REST API, so the stock compose no longer passes this key to it
CRUMB_GO2RTC_RTSP_BASEemptyleave blank; set the public RTSP address native clients pull from in the admin console instead. The recorder does NOT use this with the embedded restreamer, it dials go2rtc over loopback; the value only reaches the recorder when GO2RTC_EMBEDDED=false, where it is the external restreamer's address
CRUMB_GO2RTC_LOOPBACK_PORT8554the port the embedded go2rtc RTSP listener binds inside the recorder container, which the recorder dials as rtsp://127.0.0.1:<port>. Only set it if you changed rtsp.listen in go2rtc/go2rtc.yaml
GO2RTC_USERgo2rtca fixed, non-secret Basic-auth username label (not generated); required, compose fails fast if unset
GO2RTC_PASSgeneratedrequired; required to be strong, rotate with care (needs a recorder + api restart)
GO2RTC_EMBEDDEDtrueset false only if running an external restreamer
GO2RTC_AUTHempty (auth ON)optional restream auth opt-out. Leave unset for the secure default (authenticated LAN RTSP restream). Set to off to run an OPEN, credential-free restream on a trusted LAN: any LAN client can then pull every camera at rtsp://<host>:18554/<name> with no password. Any value other than off (including empty) keeps auth ON. The internal go2rtc REST API (:1984) stays authenticated regardless, so GO2RTC_USER/GO2RTC_PASS are still required.
GO2RTC_RTSP_BASE / GO2RTC_API_BASEemptya separate, external Frigate go2rtc instance, only used for cameras served by it

Recording​

KeyDefaultNotes
SEGMENT_SECONDS42 to 6 seconds; short segments mean near-instant seek
SEGMENT_RECEIPT_TIMEOUT_SECS90stall watchdog: how long a worker waits for the next segment before it reconnects. Raise it for a long-GOP camera whose keyframe interval exceeds the default. Clamped to [20, 3600]; unset or unparseable falls back to the default rather than erroring.

Recorder internals​

Tuning knobs for the recorder's supervision loops. The defaults are right for almost everyone; RECONCILE_PAUSED is the only one an operator normally touches, and only during a deliberate storage migration.

KeyDefaultNotes
CONFIG_POLL_SECONDS30how often the recorder diffs the database camera list against its running workers to pick up config changes
RECONCILE_INTERVAL_SECONDS900how often the reconcile pass re-runs (adopt orphan files on disk, repair size drift, prune dangling index rows); floored to 60
RECONCILE_PAUSEDfalsemaintenance switch: true runs no reconcile passes at all. Set it while deliberately moving footage files out-of-band (storage migration, disk swap), since reconcile would race the move. Recording, motion, and retention continue normally.

Motion-mode RAM cache​

See Motion & Detection for the mechanism this configures.

KeyDefaultNotes
MOTION_CACHE_TMPFS_BYTES536870912 (512 MiB)tmpfs size for the pre/post-roll ring buffer; sizing rule of thumb in .env.example
MOTION_CACHE_DIR/cache/motiononly change alongside the compose tmpfs target
MOTION_RECORDING_SHADOW01 records everything as before but stamps each segment with the keep/discard verdict the buffer would have made, for validating before flipping a camera live

Timeline previews (scrubbing)​

See Timeline scrubbing for what these do. All optional; the defaults work.

:::tip The one scrubbing knob THUMB_PREGEN_ENABLED (or Server settings → Scrub previews in the admin console) is the setting that decides how scrubbing feels. Off (the default), the first drag over a spot builds its preview on the spot (about 0.1-0.3 s per picture on a 4K camera) and later drags are instant. On, previews for new footage are built in the background, so the first drag is instant too, and the desktop and Android apps get a new preview every second instead of every four.

What "on" costs, per camera, measured on real 1080p-4K footage: roughly 7-20 % of one CPU core while recording (one 4 s piece of footage costs about 0.3-0.8 s of CPU for its previews) and about 1 GB a day of preview images, kept within the cache budget below (20 GB by default, the oldest go first). The background work runs one picture at a time, so it never uses more than about one core however many cameras you have; on a system with more than about 5 to 7 4K cameras it simply keeps up with the most recent two hours rather than all of it. :::

Five of these are also editable live from the admin console (Server → Scrub previews): the env value below is only the default until an operator sets it in the console, at which point the console value wins (no restart needed, takes effect within one scan interval / cache-sweep tick). The other three (THUMB_CACHE_DIR, THUMB_PREGEN_WIDTH, THUMB_EXTRACT_MAX_CONCURRENCY) are env-only, see the Notes column.

All of these are forwarded by the stock docker-compose.yml into the api container: set them in .env and restart the api. For the five console-editable knobs, prefer the console anyway; once an operator sets a value there, the database copy wins and the env value is just the default.

One honest footnote: a few more THUMB_* names exist in the source (THUMB_INTERVAL_SECS, THUMB_MAX_ATTEMPTS, THUMB_MAX_WIDTH, THUMB_MIN_WIDTH, THUMB_NEAR_BLACK_LUMA, THUMB_EXTRACT_TIMEOUT_SECS) as fixed built-in constants (a 4-second preview grid, widths clamped 48-640 and then snapped to the nearest of 80/160/320/480/640 so the preview cache holds a handful of sizes instead of hundreds, a 12-second extract timeout, and the black-frame retry logic). They are not read from the environment and the compose file deliberately does not forward them, because forwarding a name implies a tunability that does not exist. Setting them in .env does nothing, so they don't get rows here.

KeyDefaultConsole-editable?Notes
THUMB_PREGEN_ENABLEDfalseyesthe scrubbing knob (see the tip above): build scrub previews and the 1-second preview strips in the background so the first drag is instant too; costs about 7-20 % of a core and ~1 GB/day of cache per camera
THUMB_PREGEN_LOOKBACK_HOURS2yeshow far back to build previews when the worker starts (console clamps 0-168h)
THUMB_PREGEN_SCAN_SECS60yeshow often to build previews for newly-recorded footage (console clamps 5-3600s)
THUMB_PREGEN_WIDTH480no, env-onlypreview width in pixels; must equal the playback clients' scrub-still width or pre-generated previews go unused (silently wasted CPU/storage), which is why this one stays a deployment-time setting, not a console toggle
THUMB_CACHE_DIR(EXPORT_DIR)no, env-onlywhere the preview cache lives; point at an SSD/NVMe mount to keep scrubbing fast on a spinning-disk system (a filesystem mount, not a preference)
THUMB_EXTRACT_MAX_CONCURRENCYscales with coresnohow many previews Crumb builds at once; default is roughly half the CPU cores
THUMB_CACHE_MAX_BYTES21474836480 (20 GiB)yespreview cache size budget; oldest previews are dropped past this (console floors it at 100 MiB)
THUMB_CACHE_TTL_SECONDS2592000 (30 days)yespreview cache age budget (console clamps 1 hour-1 year)

Storage​

KeyDefaultNotes
MEDIA_HOST_PATH./_datahost directory bind-mounted into both containers. It must be writable by uid 1001, the user the recorder runs as, or nothing records while live view still looks fine. setup-env.sh reads this key as an input, prepares the directory when it can, and preflights it either way, see Platform notes
MEDIA_ROOT/datacontainer-side root; all storage paths must live under it
LIVE_STORAGE_PATH/data/livedefault live bucket
LIVE_STORAGE_NAMELivedisplay name for the live bucket in the console and clients; cosmetic, and only read when the bucket is first created
ARCHIVE_STORAGE_PATH/data/archivedefault archive bucket; unset means archive shares the live disk
ARCHIVE_STORAGE_NAMEArchivedisplay name for the archive bucket, same rules as above
MIN_FREE_FRACTION0.05 (5%)free-space floor as a fraction of the disk, 0.0 up to but not including 1.0. Eviction starts before the disk fills rather than after. An unparseable or out-of-range value falls back to the default without complaining. Re-read on every sweep, so a change takes effect without a restart. A per-policy override, set in the console, replaces it for that policy. See Storage tiers
MIN_FREE_BYTES53687091200 (50 GiB)absolute free-space floor. The stricter of this and MIN_FREE_FRACTION wins, with one guard: if the absolute floor is at least half the disk it is ignored entirely, so a small test disk isn't permanently in eviction. Free space is measured as blocks available to a non-privileged writer, so the filesystem's root reserve doesn't count as free

GPU / motion decode​

KeyDefaultNotes
MOTION_HWACCELcpucpu (the default) forces software decode: it works on any host and is cheap at the ~320px/5fps analysis resolution. vaapi forces an Intel/AMD iGPU, cuda forces NVDEC. auto picks NVDEC only when the recorder can actually create an NVIDIA decode device at startup (it asks ffmpeg to open one, not just whether ffmpeg was built with cuda), and uses cpu otherwise, so auto on a GPU-less host is software decode, not broken motion. Whatever you pick, a hardware backend that fails to decode a camera is dropped to CPU for that camera and the reason is shown in the console's decode-status panel. The admin console setting (server_settings.motion_hwaccel) overrides this, DB wins over env. Only affects motion decode; recording is always stream-copy
MAX_GPU_DECODE_SESSIONS4global cap on concurrent NVDEC decode sessions; a camera past the cap decodes on CPU instead of failing
MOTION_VAAPI_DEVICE/dev/dri/renderD128DRI render node used when MOTION_HWACCEL=vaapi; wired in by the docker-compose.vaapi.example.yml overlay, ignored otherwise. On a multi-GPU host prefer the stable /dev/dri/by-path/pci-<addr>-render symlink, renderD* numbers can reorder across a driver upgrade + reboot. Also overridden by the DB (server_settings.motion_vaapi_device). See Hardware decode
RENDER_GID993host render group GID, read by the VAAPI overlay's group_add (not by Crumb itself) so the uid-1001 container user can open the render node; find yours with getent group render
NVIDIA_VISIBLE_DEVICESallwhich GPUs the NVIDIA container runtime exposes to the recorder; read by the runtime, not by Crumb. Wired in by docker-compose.gpu.example.yml, ignored otherwise. Narrow it to a device index or UUID on a host whose other GPUs belong to something else

See Hardware decode for enabling this.

API auth​

KeyDefaultNotes
JWT_SECRETgeneratedat least 32 bytes; the API refuses to boot on the placeholder value
JWT_EXPIRY_SECONDS86400token lifetime, 24 hours

API server​

KeyDefaultNotes
API_BIND0.0.0.0:8080Leave this at 0.0.0.0:8080. Docker already gates host exposure through the compose ports: mapping. Setting 127.0.0.1:8080 here does not lock the API to the host, it binds container-local, so the published port answers nothing while the healthcheck still passes: a silently dead API. To restrict the API to localhost, change the compose port mapping to "127.0.0.1:8080:8080" instead.
CRUMB_HTTPS_PORT8443the port the bundled Caddy serves HTTPS on. Read by Caddy, not by Crumb, and used on both sides of the compose port mapping because the Caddyfile binds the templated port; changing it needs the caddy container recreated, not just restarted. The api's plain :8080 is unaffected. See TLS
TRUST_PROXYunset (off)tells the api to take the client address from X-Forwarded-For instead of the TCP peer, for rate limiting and the sign-in backoff. Set it when the api sits behind a reverse proxy, including the bundled Caddy: without it every HTTPS request keys on the proxy's container IP, so all your HTTPS users share one rate-limit bucket. The header is only read on requests that arrive from a proxy listed in TRUSTED_PROXIES; anything that reaches the api directly (for example on :8080) is keyed on its own address, whatever it sends. The api uses the right-most address in the header that is not itself a trusted proxy, which is the one your proxy added. This is a set/unset flag, not a boolean: any non-empty value turns it on, including TRUST_PROXY=false. Read once at startup, so restart the api after changing it.
TRUSTED_PROXIEScaddywhich proxies may name the client when TRUST_PROXY is on: a comma-separated list of IP addresses, CIDR ranges (192.0.2.0/24) or hostnames. The default is the bundled Caddy's service name, so the stock HTTPS setup needs nothing here. Hostnames are looked up at startup and every 30 seconds, so a recreated Caddy container is picked up on its new address. Set it only when you run your own proxy, to that proxy's address as the api sees it. Keep the list tight: every address on it can choose the client address the api records. Read once at startup.
BOOKMARK_MAX_PROTECTED_PER_USER50the most active protected bookmarks ("Protect from auto-delete") a non-admin user may hold at once. Further protected bookmarks are refused until older ones expire or are deleted; 0 removes the cap. Administrators are never limited. Forwarded by the stock docker-compose.yml; set it in .env and restart the api container.

Export​

KeyDefaultNotes
EXPORT_DIR/exportsits own volume, not under the read-only /data mount
EXPORT_TTL_SECONDS86400how long a completed export survives before cleanup
EXPORT_CACHE_MAX_BYTES21474836480 (20 GiB)size budget for the on-disk export cache; oldest entries are dropped past it. In-flight jobs are never deleted, but the space they already occupy counts against this budget, so finished exports are cleared to make room for them
EXPORT_MAX_CONCURRENT2how many export jobs may be queued or running at once. Each job runs one video encode per camera, so this is the main brake on export CPU. A request that arrives while the slots are full gets a "too many requests" answer and should be retried shortly
EXPORT_MAX_RANGE_SECONDS86400 (1 day)the longest time window a single export may cover, per camera. Beyond this the request is refused with a clear message rather than starting an encode that would run for hours. Raise it if you genuinely export multi-day ranges; the same limit applies to each clip in a batch export

Streams the server generates on demand​

Crumb builds two derived streams lazily, only while something is watching. Both are sized for a phone on a slow link.

KeyDefaultNotes
MOBILE_STREAM_ENABLEDtruethe on-demand H.264 transcode that mobile clients fall back to when a camera's own streams won't decode on the device, notably a camera that is H.265 all the way down. Turning it off saves server CPU and costs those cameras live view on Android
MOBILE_STREAM_WIDTH640transcode width in pixels, floored at 160
MAIN_REPAIR_TRANSCODE_ENABLEDfalseopt-in, per-camera full-resolution H.265 to H.264 transcode of a main stream whose SDP has no fmtp attribute. Android's video player rejects such a main ("missing attribute fmtp", seen on some Uniview LPR cameras) and otherwise steps down to the H.264 sub in SD. Leave it off and those cameras play in SD on Android; turn it on to get HD, at the cost of recorder CPU while an Android viewer is watching that camera fullscreen. A cheaper copy-only repair does not work for this case, which is why it is a real re-encode and off by default. The cheapest fix of all, when the camera allows it, is to set the camera's main stream to H.264 in its own web UI
SEGMENT_LOW_CACHE_MAX_BYTES2147483648 (2 GiB)size budget for the cache of low-resolution playback segments
FRAME_PROXY_MAX_CONCURRENCYscales with cores (one per core, at least 8, at most 32)how many live camera stills Crumb fetches at once. The low-bandwidth tile walls on the phone apps poll one still per tile per second, so this is what keeps a big wall from queueing. Past the limit a still request is answered with "busy, retry shortly" and the tile keeps its previous image until the next poll

Database backup​

See Backups for the full picture.

KeyDefaultNotes
DB_BACKUP_ENABLEDtrueonly false, 0, no, or off opts out
DB_BACKUP_HOST_PATH./backupshost directory holding the dumps; must be writable by uid 1001
BACKUP_DIR/backupsthe container-side path the above is mounted at. Leave it alone: if it is unset or empty the api disables the backup job entirely, which is not a failure you want to discover from a missing dump
DB_BACKUP_SCHEDULE03:15local wall-clock time
DB_BACKUP_KEEP_DAYS7
DB_BACKUP_KEEP_WEEKS4
DB_BACKUP_KEEP_MONTHS00 disables the monthly tier

Off-host backup copy (optional)​

KeyDefaultNotes
BACKUP_OFFSITE_REMOTEemptyan rclone remote:path; leaving this empty makes the optional sidecar idle even if started
BACKUP_OFFSITE_SCHEDULE15 5 * * *5-field cron, not the HH:MM form the main backup uses
BACKUP_OFFSITE_RCLONE_CONF./rclone.confkeep this file out of the repository, same trust level as .env

Alerting​

KeyDefaultNotes
ALERT_WEBHOOK_URLemptya generic JSON webhook (Discord/Slack-compatible) for recorder-death paging; empty means silent
CAMERA_OFFLINE_BOOT_GRACE_SECS180holds camera-offline alerts for this long after a recorder restart. Forwarded by the stock docker-compose.yml; set it in .env and restart the api container.
MAINTENANCE_UNTILemptyunix-seconds timestamp to pre-arm a maintenance window at boot. Forwarded by the stock docker-compose.yml; set it in .env and restart the api container.
MOTION_UNHEALTHY_ALERT_SECS180how long a camera's motion detector must stay continuously unhealthy before the recorder raises a system alert. This is alert hysteresis for flaky cameras that blip and self-heal; it delays only the alert, never the fail-open recording safety rail. A camera added with a main stream only (no sub-stream) never raises this alert at all: pixel motion needs the sub-stream, so that camera records continuously by design rather than being broken.

Monitoring​

GET /metrics serves the API's own gauges in the Prometheus text format (database pool saturation, export jobs by status, recorder heartbeat age, active cameras, uptime, build info). It requires an Authorization: Bearer credential: an admin session token always works, and METRICS_TOKEN gives a scraper that has no Crumb account its own. /health and /version stay open, so an uptime check needs no credential.

KeyDefaultNotes
METRICS_TOKENemptya shared token that authorizes GET /metrics on its own, sent as Authorization: Bearer <token>. In Prometheus this is bearer_token (or bearer_token_file) in the scrape_config. Generate one with openssl rand -hex 32. Empty means only an admin session can read /metrics.
METRICS_TOKEN_FILEemptypath to a Docker-secret file holding the token, e.g. /run/secrets/metrics_token; read in preference to METRICS_TOKEN

ONVIF (PTZ, presets, focus)​

KeyDefaultNotes
ONVIF_CONFIG_B64emptya legacy fallback, and normally left blank. Per-camera ONVIF host and credentials live in the database and are edited in the admin camera editor, which always wins. This key holds the pre-database form: a base64-encoded JSON object keyed by each camera's go2rtc stream name. It is base64 so the JSON survives .env and compose substitution unmangled; the raw ONVIF_CONFIG name is still read if the base64 one is empty. setup-env.sh writes the key blank

Update-available check (issue #7)​

KeyDefaultNotes
UPDATE_CHECK_ENABLEDfalseopt-in; when true, the api periodically asks github.com for the latest CrumbVMS release tag (version number only, nothing sent) so clients can show an "update available" notice. false means zero github.com requests, ever. The admin console's "Enable update checks" toggle (Server section) overrides this once set, DB wins over env.

Seed (admin bootstrap)​

KeyDefaultNotes
SEED_ADMIN_USERNAMEadmin
SEED_ADMIN_PASSWORDgenerated by setup-env.shplaintext; setup-env.sh generates a memorable passphrase and the api seeds the admin with it by default. Blank it to opt into the browser create-admin wizard instead
SEED_ADMIN_PASSWORD_HASHemptyprecomputed argon2id hash, an alternative to the plaintext var above
SEED_DEFAULT_CAMERASfalsedev-only; keep false in any real deployment

Image source​

KeyDefaultNotes
CRUMB_IMAGE_PREFIXghcr.io/badbread/crumbvmspoint at a different registry/namespace
CRUMB_VERSIONlatestpin a specific tag for reproducible upgrades

Frigate integration (optional, bring your own)​

All of these are unset by default. See Integrations for the full setup.

KeyDefaultNotes
FRIGATE_MQTT_URLemptyleaving this unset disables the Frigate MQTT provider (no broker connection, no background task). It does not touch Crumb's other detection paths, Home Assistant motion sources and the crumb-alpr LPR ingest work independently of it. Plaintext mqtt:// only (or a bare host:port). Crumb's MQTT client is built without a TLS transport, so an mqtts:// URL is refused with a clear error instead of being connected in the clear, keep the broker on a trusted LAN.
FRIGATE_MQTT_USER / FRIGATE_MQTT_PASSWORD / FRIGATE_MQTT_PASSWORD_B64emptybroker auth, only if required
FRIGATE_MQTT_PREFIXfrigate
FRIGATE_API_BASEemptyfallback; the admin console setting overrides it
FRIGATE_MIN_SCORE0.3detection confidence floor
FRIGATE_CATCHUP_HOURS24how far back to backfill on startup

Crumb-native LPR worker (optional, alpr profile)​

Crumb's own local plate OCR (fast-alpr), no cloud and no third-party agent. It's opt-in: nothing runs until you start the alpr compose profile with docker compose --profile alpr up -d --build crumb-alpr. First enable LPR and mint an ingest token in Admin → LPR (Rotate ingest token), then set the keys below. One worker instance per camera. See License plate recognition for the full setup.

KeyDefaultNotes
LPR_INGEST_TOKENemptythe rotated token from Admin → LPR; the worker authenticates its POST /lpr/reads calls with it
LPR_CAMERA_IDemptythe Crumb camera UUID this worker reads
LPR_RTSP_URLemptythe go2rtc restream RTSP for that camera, e.g. rtsp://<go2rtc-user>:<go2rtc-pass>@recorder:8554/<stream-name>
LPR_MIN_CONFIDENCE0.80drop reads below this mean OCR confidence
LPR_SAMPLE_FPS5analysis frame rate while a pass is active
LPR_API_BASEhttp://api:8080override only if the worker runs off-host (mapped to the worker's CRUMB_API_BASE)
LPR_LOG_LEVELinfoworker log verbosity

The worker reads several more tuning knobs (detector/OCR model names, motion gating, pass timing) with sensible defaults, see services/alpr-worker/worker.py and its README if you need to tune them.

Home Assistant (optional, off by default)​

A self-hosted integration, off until you enable it. Normally you configure this in the admin console (its own Home Assistant section), which stores it in the database, and the DB value wins. The keys below are only a read-time fallback used when the matching DB field is empty. Use a long-lived token from a dedicated non-admin HA user.

KeyDefaultNotes
HA_BASE_URLemptye.g. http://<home-assistant-host>:8123; fallback for the console's Home Assistant base URL
HA_TOKENemptya long-lived access token; a secret. Prefer HA_TOKEN_FILE in production.
HA_TOKEN_FILEemptypath to a Docker-secret file holding the token, e.g. /run/secrets/ha_token; read in preference to HA_TOKEN

All three are forwarded by the stock docker-compose.yml into both the api and recorder containers: set them in .env and restart both. The console path (which writes to the database) is still the supported way to configure Home Assistant, and the DB value wins whenever both are set.

Keys the stock compose does not forward​

The code reads a few more tuning keys that docker-compose.yml deliberately does not pass through, so setting them in .env alone does nothing. The defaults are right for almost every install. If support asks you to change one, add it under the matching service's environment: in a docker-compose.override.yml and recreate that container.

KeyContainerDefaultNotes
PLAYBACK_MAX_CONCURRENCYapi8how many database connections multi-camera synchronized playback may hold at once, so a burst of playback requests cannot starve everything else
CLIP_GEN_MAX_CONCURRENCYapi4how many Clips-tab clips can play at once; each playing clip runs one video encode
CLIP_CACHE_MAX_BYTESapi10737418240 (10 GiB)size budget for the on-demand clip cache under EXPORT_DIR; oldest clips are dropped past it, on top of the 24-hour age limit
DB_STATEMENT_TIMEOUT_MSapi, recorder30000longest any single database query may run before it is cancelled
DB_LOCK_TIMEOUT_MSapi, recorder10000longest a database query may wait on a lock before it gives up
ARCHIVE_TICK_SECONDSrecorder60how often the archive scheduler checks for footage due to move to the archive tier
ARCHIVE_TICK_BUDGET_SECONDSrecorder30how long one archive pass may spend moving footage; the rest carries over to the next pass
RECONCILE_ORPHAN_RATE_HZrecorder40how many untracked footage files per second the reconcile pass adds back to the index (1 to 1000), so a large adoption does not swamp the database
SKIP_RECONCILErecorderoff1 or true skips the background reconcile pass at recorder startup only. For ongoing maintenance use RECONCILE_PAUSED instead