Skip to main content

Configuration Reference

Runix loads configuration from runix.yaml, runix.yml, runix.json, or runix.toml.

Resolution Order​

When no explicit path is passed, Runix checks the current directory in this order:

  1. runix.yaml
  2. runix.yml
  3. runix.json
  4. runix.toml

If no config file is found, Runix still starts with defaults.

Top-Level Schema​

daemon:
socket_path: ~/.runix/runix.sock
pid_dir: ~/.runix
data_dir: ~/.runix
log_level: info

defaults:
restart_policy: on-failure
max_restarts: 10
restart_window: 60s
backoff_base: 1s
backoff_max: 60s
log_max_size: 10485760
log_max_age: 168h
watch_debounce: 100ms

processes:
- name: api
runtime: go
entrypoint: ./cmd/api

cron:
- name: cleanup
schedule: "0 */6 * * *"
command: "rm -rf /tmp/old-*"

web:
enabled: true
listen: localhost:9615

mcp:
enabled: false
transport: stdio
listen: localhost:8090

security:
auth:
enabled: false
mode: disabled
local_only: false

metrics:
enabled: true
interval: 5s

secrets: {}
profiles: {}

Top-level fields:

FieldTypeDescription
daemonobjectDaemon socket, PID, data dir, and log level settings
defaultsobjectDefault values applied to each process
processesarrayList of ProcessConfig entries
cronarrayList of cron job definitions
webobjectWeb UI listen address and legacy auth block
mcpobjectMCP transport settings
securityobjectShared authentication settings
metricsobjectMetrics collector settings
secretsmapNamed secret references
profilesmapArbitrary profile overlays

Daemon​

FieldTypeDefault
socket_pathstringplatform/default data dir socket
pid_dirstringplatform/default data dir
data_dirstringplatform/default data dir
log_levelstringinfo

Defaults​

FieldTypeDefault
restart_policyenumon-failure
max_restartsinteger10
restart_windowduration60s
backoff_baseduration1s
backoff_maxduration60s
log_max_sizeinteger10485760
log_max_ageduration168h
watch_debounceduration100ms

Only some defaults are copied directly onto each process today: restart_policy, max_restarts, and instances fallback behavior. The rest are consumed by the runtime subsystems.

Processes​

processes is an array, not a map. Each item is a ProcessConfig.

Required Fields​

FieldTypeNotes
namestringMust be unique
entrypointstringCommand, script, or executable

Core Fields​

FieldTypeDescription
runtimestringgo, python, node, bun, deno, ruby, php, auto, unknown
argsstring arrayEntrypoint arguments
cwdstringWorking directory; defaults to config file directory when omitted
envstring mapEnvironment overlay
interpreterstringExplicit interpreter override
use_bundleboolWrap Ruby execution in bundle exec
autostartboolUsed by start_all and daemon boot startup
instancesintegerDefaults to 1
namespacestringNamespace prefix for process names
labelsstring mapArbitrary labels
tagsstring arrayArbitrary tags
instance_indexintegerInternal multi-instance index

Restart And Shutdown​

FieldTypeDescription
restart_policyenumalways, on-failure, never
max_restartsintegerMaximum restart attempts
restart_windowdurationRestart counting window
stop_signalstringSignal name, default behavior is SIGTERM
stop_timeoutdurationGrace period before forced kill
cron_restartstringCron expression for scheduled restart

Watch​

watch:
enabled: true
paths: ["./src"]
ignore: ["node_modules", "dist"]
debounce: 250ms
FieldTypeDescription
enabledboolTurns file watching on
pathsstring arrayPaths to watch
ignorestring arrayIgnore patterns
debounceduration stringDebounce interval

Hooks​

hooks is a nested object containing lifecycle commands such as pre_start, post_start, pre_stop, post_stop, pre_restart, post_restart, pre_reload, and post_reload.

Health Checks​

Runix supports both the legacy healthcheck_url field and the structured healthcheck block.

healthcheck:
type: http
url: http://localhost:8080/health
interval: 10s
timeout: 5s
retries: 3
grace_period: 15s
FieldTypeDescription
typeenumhttp, tcp, command
urlstringHTTP health endpoint
tcp_endpointstringTCP target in host:port form
commandstringShell command for command checks
intervalduration stringCheck interval
timeoutduration stringPer-check timeout
retriesintegerConsecutive failures before unhealthy
grace_periodduration stringDelay before first check

Scheduling, Dependencies, And Limits​

FieldTypeDescription
depends_onstring arrayStart-order dependencies
priorityintegerLower values start earlier
extendsstringInherit from another named process
cpu_quotastringCPU quota expression
memory_limitstringMemory limit expression
log_max_filesintegerRotated log retention

Cron Jobs​

cron is an array of CronJobConfig.

cron:
- name: cleanup
schedule: "0 */6 * * *"
command: "rm -rf /tmp/old-*"
enabled: true
cwd: /tmp
timeout: 5m
FieldTypeNotes
namestringRequired
schedulestringRequired
runtimestringOptional runtime hint
commandstringRequired
cwdstringWorking directory
envstring mapEnvironment values
timeoutdurationOptional timeout
enabledboolExplicit enable flag

Security​

Shared authentication settings live under security.auth.

security:
auth:
enabled: true
mode: basic
username: admin
password_hash: "$2a$10$..."
local_only: false
FieldTypeDescription
enabledboolTurns auth on
modeenumdisabled, basic, token
usernamestringRequired for basic auth
passwordstringDev-only plain text password
password_hashstringPreferred bcrypt hash
tokenstringRequired for token auth
local_onlyboolSkip auth for loopback requests

Validation rules:

  • basic mode requires username and exactly one of password or password_hash
  • token mode requires a token with length at least 16
  • disabled mode ignores credential fields

Web, MCP, Metrics, Secrets, Profiles​

These are covered in dedicated pages: