Documentation

Running multiple processes

Use multiple process entries and instances to describe a local workspace.

One config, many processes

Vectron launches one or more [[process]] entries from the same vectron.toml.

Each process can define:

  • its command
  • its working directory
  • per-process environment variables
  • a group and startup labels
  • readiness
  • logging behavior

Scaling one process with instances

Set instances = N to start multiple copies of one process specification.

[[process]]
name = "web"
command = "npm run dev -- --port {PORT}"
instances = 2
port_env = "PORT"

Vectron allocates instance-specific ports and expands instance-specific environment variables where configured.

Defaults involved here

  • instances: default 1
  • port_start: default 5000
  • port_step: default 100
  • formation_port_step: default 1
  • port_env: default none
  • instance_env_suffix: default none

Ports and environment handling

Port allocation is controlled globally or per process with:

  • port_start
  • port_step
  • formation_port_step
  • port_env

Instance-specific environment suffixes are controlled with instance_env_suffix.

Working directories

Set working_dir globally or per process when child processes must start from different project directories.

If working_dir is omitted everywhere, the effective working directory is the workspace or config root.

Good practice

  • keep process names stable
  • start with one process and one instance
  • add a group when you need the TUI group view or group filters
  • add labels when you need cross-cutting startup filters
  • add readiness when a process is not considered usable immediately on spawn