Apps
Every key an app can have in a config file.
Every key an app can have in a config file. Times are in the unit the key names: _ms and the restart and kill delays are milliseconds, _secs, stable_uptime and crash_window are seconds.
What to run
namestringThe app's name. Required. A name is also what a selector matches, so it is limited in charset and length (a cluster name to 59 characters).
modestring alias: runtimeHow to run it:
cmd,node,npm,pnpm,yarn,cargo,rust,python,go, or a runtime an installed adapter provides. If you leave it out, ascriptgets its mode from its extension, and the file is refused if that is not possible.scriptstringWhat to run. For
cmdit is the program; fornpm,pnpmandyarnthe name of the package script; fornodeandpythonthe file.binstringThe binary name, for
cargo.binarystringThe path to a binary, as an alternative to
scriptorbin.argslist of strings default: noneArguments passed to the program.
cwdstringThe working directory.
Environment and tags
envtable default: emptyEnvironment variables for the app, for example
env = { RUST_LOG = "info" }.env_filestringA file of
KEY=VALUElines. A missing file is an error.tagslist of strings default: noneGroup apps, and select them with
@tag.
Restarts
restartstring default: "on-crash"on-crash,alwaysornever. See Restarts and states.no_autorestartboolean default: falseTurn automatic restarts off.
restart_delaynumber default: 500Milliseconds before the first restart. It doubles for every crash in a row.
max_restart_delaynumber default: 60000The cap on that delay, in milliseconds.
max_restartsnumber default: 15More than this many restarts inside
crash_windowend the apperrored.crash_windownumber default: 600Seconds. See
max_restarts.stable_uptimenumber default: 60A run this long, in seconds, starts the delay over.
kill_timeoutnumber default: 3000Milliseconds the app has to exit after the stop signal.
Dependencies, limits and schedules
depends_onlist of app names default: noneApps that must be running before this one starts. See Dependencies.
depends_timeoutseconds default: 60How long to wait for them, from 1 to 3600.
depends_fail_openboolean default: falseLaunch anyway, with a warning, when the wait times out. Discouraged.
max_memory_mbnumberRestart the app when it is over this resident size. See Limits and cron.
max_uptime_secsnumberRestart the app after this many seconds of uptime.
restart_cronstringA cron expression for scheduled restarts. Five fields, UTC; Sunday is 0 or 7.
Clusters
instancesnumber default: 1How many instances, up to 256. See Clusters.
portnumberThe base port. Instance
igetsport + i.port_rangetable{ start = 3000, end = 3010 }. The range must hold every instance.portandport_rangetogether are refused.
Checks, hooks and logs
health_checktableExactly one of
http_url,tcporscript, plus optional settings. See Health checks.hookstableon_start,on_stop,on_restart,on_crash,on_error. See Environment and hooks.log_max_sizestring default: "10mb"Rotate a log file at this size, for example
"50mb".log_max_filesnumber default: 5How many rotated files to keep.
log_compressboolean default: falseCompress rotated files with gzip.
Safety markers
protectedboolean default: falseRead-only for AI actors and other non-human callers. See Protected apps.
ai_controlboolean default: falseAI actors may stop, restart and reload the app. They can never start or delete it.
Accepted, with no effect
watchboolean default: falsetrueis an error: file watching is not available yet.falseis accepted.ignorelist of stringsIgnore patterns for watching. They have no effect while watching is refused.
adapterstableReserved. It must be empty.