pboss logo pboss.docs
Menu

Guides

Configuration reference

Every ecosystem file option — process, cluster, log, health check, watch, and deploy configuration.

The complete set of options for ecosystem files. Every CLI flag from pboss start maps to a field here (camelCase instead of kebab-case).

A bare pboss start auto-detects the config file to load — the priority order lives in Ecosystem files.

Ecosystem file format#

The ecosystem file is a JSON, JavaScript, or TypeScript file with the following top-level structure:

interface EcosystemConfig {
  apps: StartOptions[];
  crons?: CronJobConfig[];
  deploy?: Record<string, DeployConfig>;
}
Top-level fieldTypeDescription
appsStartOptions[]Processes to run — the tables below document each entry
cronsCronJobConfig[]Standalone scheduled commands (friendly schedules like everyday@9:11) — see Cron Jobs
deployRecord<string, DeployConfig>Deployment environments — see Deploy configuration

Process options#

The complete set of options available for each entry in the apps array:

OptionTypeDefaultDescription
namestringFilenameProcess name
scriptstringrequiredPath to the script to execute; relative paths resolve against the config file’s directory
argsstring[][]Arguments passed to the script
cwdstringThe config file’s directoryWorking directory for the process
envRecord<string, string>{}Environment variables
instancesnumber or "max"1Number of instances
execMode"fork" or "cluster""fork"Execution mode
autorestartbooleantrueRestart on crash
maxRestartsnumber16Maximum restart attempts before giving up
minUptimenumber1000Minimum ms a process must be up to be considered stable
maxMemoryRestartstring or number—Memory threshold for restart
restartDelaynumber0Delay in ms between restart attempts
killTimeoutnumber5000Grace period in ms before SIGKILL
interpreterstringAutoCustom interpreter
interpreterArgsstring[]—Arguments for the interpreter
nodeArgsstring[]—Additional runtime arguments
namespacestring—Namespace for grouping processes
onNsMemberExit"ignore" or "exit"ignoreReaction to a namespace sibling’s terminal exit (namespaced processes only; see Processes — Namespaces)
dependsOnstring or { name, policy } array—Dependencies resolved before start (#33): pboss processes first, then systemd units; policy is "required" (default) or "optional" — see Processes — Dependencies
sourceMapSupportbooleanfalseEnable source map support
waitReadybooleanfalseWait for process to emit ready signal
listenTimeoutnumber3000Timeout when waiting for ready signal
noDaemonbooleanfalseRun in foreground without a daemon

Cluster options#

OptionTypeDefaultDescription
instancesnumber or "max"1Worker count
execMode"cluster""fork"Set to cluster for multi-instance mode
portnumber—Base port. Worker i gets port + i

Cluster semantics and per-worker environment variables are covered in Cluster mode.

Log options#

OptionTypeDefaultDescription
outFilestring~/.pboss/logs/<name>-<id>-out.logCustom stdout log path
errorFilestring~/.pboss/logs/<name>-<id>-error.logCustom stderr log path
mergeLogsbooleanfalseMerge all instance logs into one file
rawbooleanfalseMirror child stdout and stderr to pboss stdout and stderr
logDateFormatstring—Date format for log line prefixes
logMaxSizestring or number"10M"Max log file size before rotation
logRetainnumber5Number of rotated files to keep
logCompressbooleanfalseGzip-compress rotated log files

Health check options#

OptionTypeDefaultDescription
healthCheckUrlstring—URL to probe
healthCheckIntervalnumber30000Probe interval in ms
healthCheckTimeoutnumber5000Probe timeout in ms
healthCheckMaxFailsnumber3Consecutive failures before restart

A failing health check also reports to the cloud (health.failing / health.recovered events, with the consecutive-failure count) — the dashboard’s process rows show a health chip for any process with a healthCheckUrl.

Alert options#

Per-process overrides for the resource threshold alerts (details):

OptionTypeDefaultDescription
alertCpuSpikePercentnumber95CPU spike trigger (percent)
alertCpuSustainedPercentnumber70Sustained CPU trigger (percent)
alertMemSpikeGrowthPercentnumber40Memory growth rate that counts as a leak (percent per 60s)
alertMemHighPercentnumber85Memory-high trigger, percent of maxMemoryRestart
alertMemHighMBnumber—Absolute memory ceiling (MB) when no maxMemoryRestart is set — opts this process into the memory-high alert
alertDisabledbooleanfalseOpt this process out of ALL threshold alerts

These persist with the process and survive restarts; pboss alerts show renders the effective merge of defaults, machine overrides (~/.pboss/alert-thresholds.json) and these fields.

Watch options#

OptionTypeDefaultDescription
watchboolean or string[]falseEnable file watching
ignoreWatchstring[]["node_modules", ".git", ".pboss"]Patterns to ignore

Deploy configuration#

OptionTypeDescription
userstringSSH user
hoststring or string[]Remote host(s)
refstringGit ref to deploy
repostringGit repository URL
pathstringRemote deployment path
preDeploystringCommand to run locally before deploy
postDeploystringCommand to run remotely after deploy
preSetupstringCommand to run remotely during setup
postSetupstringCommand to run remotely after setup
ssh_optionsstringAdditional SSH options
envRecord<string, string>Environment variables for remote commands

Deploy semantics (release directories, symlink rotation, cleanup) are covered in Deployment.