Documentation

`vectron.toml` reference

Exhaustive reference for the main Vectron configuration file, including defaults and inheritance rules.

This page is the normative reference for vectron.toml.

When a field is optional, the table tells you whether its behavior comes from:

  • a fixed default value
  • inheritance from a parent field
  • a derived runtime rule

Resolution rules

  • Relative paths are resolved from the directory containing vectron.toml.
  • Process-level fields can override global fields.
  • Some fields have an effective runtime default even when the TOML field itself is omitted.
  • At least one [[process]] entry must exist for the config to validate.

Top-level sections

FieldTypeRequiredDefault / Inherits / DerivedNotes
globaltableNoOptional tableGlobal defaults applied to processes
processarray of tablesYesNoneAt least one [[process]] is required
log_templatestableNoDefault: empty tableNamed rendering presets

[global]

FieldTypeRequiredDefault / Inherits / DerivedNotes
log_dirpathNoDefault: .vectron/logsFile log directory
beforestring or array of stringsNoDefault: nonePreflight command(s) run before process startup
show_timestampsbooleanNoEffective default: trueInherits into processes
log_modeenumNoDefault: consoleAllowed: console, files, both
log_formatenumNoDefault: textAllowed: text, logfmt, json, json_pretty
lifecycleenumNoDefault: fail-fastCurrent lifecycle policy
readinesstableNoDefault: noneGlobal readiness model
colorcolorNoDefault: noneDefault process color; accepts CSS-like color strings such as red or #808080
log_templatetableNoDefault: noneDefault rendering preset binding
disable_color_envbooleanNoDefault: falseDisables ANSI color-related env vars in child processes
disabled_groupsarray of stringsNoDefault: []Groups disabled unless re-enabled at runtime
disabled_labelsarray of stringsNoDefault: []Labels disabled unless re-enabled at runtime
cleanup_logsbooleanNoDefault: trueRecreates log_dir on start
envstring mapNoDefault: {}Base env vars for all processes
env_filepathNoDefault: noneLoaded after global.env
instance_env_suffixstringNoDefault: noneMust contain {index}
port_startintegerNoDefault: 5000Base port allocation; legacy alias: port_base
port_stepintegerNoDefault: 100Port spacing between processes
formation_port_stepintegerNoDefault: 1Port spacing between instances
shutdown_timeout_secsintegerNoDefault: 90Graceful shutdown window before escalation
working_dirpathNoDefault: noneEffective behavior: workspace/config root when omitted
tuitableNoDefault: empty table with threshold defaultsTUI-only settings

[global.readiness]

Log readiness

FieldTypeRequiredDefault / Inherits / DerivedNotes
typestringYesRequired value: logSelects log-based readiness
readytableNoDefault: noneSuccess pattern
errortableNoDefault: noneError pattern
ready.patternstringYes, if ready existsNoneRegex pattern
ready.streamenumNoDefault: stdoutAllowed: stdout, stderr
error.patternstringYes, if error existsNoneRegex pattern
error.streamenumNoDefault: stdoutAllowed: stdout, stderr

At least one of ready or error must be present.

TCP readiness

FieldTypeRequiredDefault / Inherits / DerivedNotes
typestringYesRequired value: tcpSelects TCP readiness
hoststringNoDefault: 127.0.0.1Probe host
portstring or integerNoDefault: autoauto follows the allocated instance port
interval_msintegerNoDefault: 500Poll interval

[global.log_template]

FieldTypeRequiredDefault / Inherits / DerivedNotes
presetstringNoDefault: noneApplied to both streams unless overridden
stdout_presetstringNoDefault: noneStdout-only override
stderr_presetstringNoDefault: noneStderr-only override

[global.tui.metrics.thresholds]

FieldTypeRequiredDefault / Inherits / DerivedNotes
cpu_warnfloatNoDefault: 60.0Per-instance CPU warn threshold
cpu_critfloatNoDefault: 85.0Per-instance CPU crit threshold
rss_warnbytes or IEC stringNoDefault: 256MiBPer-instance RSS warn threshold
rss_critbytes or IEC stringNoDefault: 1GiBPer-instance RSS crit threshold
total_cpu_warnfloatNoDefault: none; derived if omittedUI status-bar total threshold
total_cpu_critfloatNoDefault: none; derived if omittedUI status-bar total threshold
total_rss_warnbytes or IEC stringNoDefault: none; derived if omittedUI status-bar total threshold
total_rss_critbytes or IEC stringNoDefault: none; derived if omittedUI status-bar total threshold

When total thresholds are omitted, the UI derives totals from per-instance thresholds.

[[process]]

FieldTypeRequiredDefault / Inherits / DerivedNotes
namestringYesNoneStable process identifier
commandstringYesNoneChild command line
instancesintegerNoDefault: 1Number of copies to launch
working_dirpathNoInherits global.working_dir; effective default: workspace/config rootSpawn directory
log_modeenumNoInherits global.log_mode; effective default: consoleAllowed: console, files, both
log_formatenumNoInherits global.log_format; effective default: textAllowed: text, logfmt, json, json_pretty
groupstringNoDefault: noneSingle process group used by the TUI and group filters
labelsarray of stringsNoDefault: []Startup-only labels used by label filters
show_timestampsbooleanNoInherits global.show_timestamps; effective default: trueConsole/TUI timestamp display
lifecycleenumNoInherits global.lifecycle; effective default: fail-fastLifecycle policy
readinesstableNoInherits global.readinessPer-process readiness override
colorcolorNoDefault: noneProcess color; accepts CSS-like color strings such as red or #808080
instance_colorsarray of colorsNoDefault: []Optional per-instance CSS-like colors
log_templatetableNoInherits global.log_templateRendering preset override
disable_color_envbooleanNoInherits global.disable_color_env; effective default: falseChild ANSI handling override
envstring mapNoDefault: {}Per-process env vars
env_filepathNoDefault: noneLoaded after process env
instance_env_suffixstringNoInherits global.instance_env_suffixMust contain {index}
port_envstringNoField default: none; effective env var: PORTOverrides the environment variable that receives the allocated port
port_startintegerNoDerived from the current allocation cursorNot a fixed constant default
port_stepintegerNoInherits global.port_step; effective default: 100Port spacing for this process
formation_port_stepintegerNoInherits global.formation_port_step; effective default: 1Instance spacing for the next allocation base
log_dirpathNoInherits global.log_dirPer-process file log directory
tui.metrics.thresholds.cpu_warnfloatNoInherits global threshold; effective default: 60.0Per-process override
tui.metrics.thresholds.cpu_critfloatNoInherits global threshold; effective default: 85.0Per-process override
tui.metrics.thresholds.rss_warnbytes or IEC stringNoInherits global threshold; effective default: 256MiBPer-process override
tui.metrics.thresholds.rss_critbytes or IEC stringNoInherits global threshold; effective default: 1GiBPer-process override

[log_templates.<name>]

FieldTypeRequiredDefault / Inherits / DerivedNotes
extendsstringNoDefault: noneInherit from another preset
fieldstableNoDefault: noneShared layout for stdout and stderr
stdout_fieldstableNoDefault: noneStdout-only layout
stderr_fieldstableNoDefault: noneStderr-only layout

[log_templates.<name>.*_fields]

FieldTypeRequiredDefault / Inherits / DerivedNotes
separatorstringNoEffective default: " "Inserted between rendered fields
missingstringNoDefault: noneReplacement text for missing keys
fieldsarray of tablesNoDefault: []Rendered in order

[[log_templates.<name>.*_fields.fields]]

FieldTypeRequiredDefault / Inherits / DerivedNotes
keystringYesNoneExtracted field key
prefixstringNoDefault: nonePrepended before the value
suffixstringNoDefault: noneAppended after the value
defaultstringNoDefault: noneFallback value when key is missing
mapstring mapNoDefault: {}Value remapping
formatenumNoEffective default: noneAllowed: none, lowercase, uppercase, number, duration_ms
visible_ifenumNoEffective default: alwaysAllowed: always, present, non_empty
colorcolorNoDefault: noneValue color
color_rulesarray of tablesNoDefault: []Regex-based color overrides

Color values are parsed as CSS-like color strings. Common examples include named colors such as red and hex colors such as #808080 or #112233.

[[log_templates.<name>.*_fields.fields.color_rules]]

FieldTypeRequiredDefault / Inherits / DerivedNotes
regexstringYesNoneRegex matched against the field value
colorcolorYesNoneCSS-like color applied when regex matches

Example:

[log_templates.api.fields]
fields = [
  { key = "level", color_rules = [
    { regex = "WARN|ERROR", color = "red" },
  ] },
]

Validation rules

Validation includes checks for:

  • at least one process
  • non-empty commands
  • valid process names, groups, and labels
  • valid disabled_groups and disabled_labels labels
  • valid port_step and formation_port_step values
  • port allocation overflow
  • existing referenced env_file paths
  • valid readiness configuration
  • valid log-template references
  • valid instance_env_suffix values containing {index}

Source of truth

Use vectron.example.toml as the main onboarding example when you want a full commented config. Use this page when you need the exact field behavior.