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: default1port_start: default5000port_step: default100formation_port_step: default1port_env: default noneinstance_env_suffix: default none
Ports and environment handling
Port allocation is controlled globally or per process with:
port_startport_stepformation_port_stepport_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