Skip to main content

Runtime Settings

Most configuration flags bind once at startup. A curated subset can be overridden at runtime via the /admin/settings page, the mr admin settings CLI, or the /v1/admin/settings HTTP API -- no restart required.

How precedence works

  1. Boot flag / env var supplies the initial value.
  2. If the runtime_settings table has a row for the key, that override wins.
  3. When an override differs from the boot value (flag, env var, or built-in default), one WARN line is logged at startup so operators are not silently surprised.

Reset via the UI (Reset button), CLI (mr admin settings reset <key>), or API (DELETE /v1/admin/settings/<key>) removes the override and returns to the boot value.

Runtime-editable settings

KeyTypeBoundsBoot flagTakes effect
max_upload_sizeint64 (bytes)1 KiB–1 TiB; 0 = unlimited-max-upload-sizenext upload request
upload_concurrencyint1–16(runtime only)next page render
upload_widget_file_thresholdint1–10000(runtime only)next page render
upload_widget_size_thresholdint64 (bytes)1 MiB–1 TiB(runtime only)next page render
max_import_sizeint64 (bytes)1 MiB–1 TiB-max-import-sizenext import parse
mrql_default_limitint1–100000-mrql-default-limitnext MRQL query
mrql_page_query_budgetint0–100000; 0 disables-mrql-page-query-budgetnext page render
mrql_query_timeoutduration100ms–5m-mrql-query-timeoutnext MRQL query
export_retentionduration1m–30d-export-retentionnext sweep + UI disclosure
remote_connect_timeoutduration1s–10m-remote-connect-timeoutnext remote download
remote_idle_timeoutduration1s–1h-remote-idle-timeoutnext remote download
remote_overall_timeoutduration10s–24h-remote-overall-timeoutnext remote download
remote_user_agentstringat most 8192 bytes, no control characters; empty = browser-like default-remote-user-agentnext remote download
download_failed_retentionduration1h–365d-download-failed-retentionnext history sweep
download_history_retentionduration1h–365d-download-history-retentionnext history sweep
download_cockpit_limitint1–200-download-cockpit-limitnext jobs-panel render
share_public_urlstring (http/https URL)absolute http/https URL; empty = relative /s/<token> only-share-public-urlnext share link render
docs_site_base_urlstring (http/https URL)absolute; non-empty host-docs-site-base-urlnext page render
docs_links_disabledint0–1; 1 hides links-docs-links-disablednext page render
hash_similarity_thresholdint0–11 (v2 pairs stored up to distance 11)-hash-similarity-thresholdnext hash comparison
hash_ahash_thresholduint640–64; 0 disables-hash-ahash-thresholdnext hash comparison
hash_backfill_pausedint0–1; 1 pauses the v2 backfill(runtime only)next backfill cycle

Metadata index build status

Indexed keys are configured in each resource category, group category, or note type editor, alongside its metadata schema. See indexed metadata keys.

The Metadata index builds section on this page shows background build status and errors. GET /v1/admin/settings/metadata-index-status exposes the same status for administrators. Saved category changes are normally picked up within five seconds. Failed builds retry after a minute; each reconciliation has a 30-minute budget. PostgreSQL concurrent builds interrupted by shutdown are repaired on retry or restart.

Bulk resource uploads

max_upload_size bounds one request body. That distinction matters on the create-resource page, which has two ways of submitting:

  • Native post - the browser sends every selected file in one multipart body, so max_upload_size caps the batch as a whole.
  • Client-side widget - above upload_widget_file_threshold files or upload_widget_size_threshold bytes, the page sends one request per file, upload_concurrency at a time, with a progress bar and per-file errors. Each file is then capped individually, and the widget refuses an oversized file in the browser rather than spending the transfer to be rejected.

All three are read when the create-resource page renders and embedded in the form, so a change applies to the next page load rather than to an upload already in flight.

Set upload_widget_file_threshold to 1 to put every multi-file selection through the widget. SQLite has exactly one writer, so upload_concurrency above about 3 buys little there; Postgres tolerates more.

Audit trail

Every change writes a row to log_entries with entity_type=runtime_setting, the key as entity_name, old→new values in message, and the request IP in ip_address. Visible at /logs (filter entity type runtime_setting), or via GET /v1/logs.

CLI reference

See mr admin settings.