Skip to main content

start

Launch managed processes in one of three modes:
  • manifest services (sysg start)
  • units (sysg start <command...>)
  • child units (sysg start --child --parent-pid <pid> -- <command...>)

Options

:::info The --stderr flag is particularly useful for:
  • Development: See error output immediately while debugging
  • CI/CD Pipelines: Capture all output in a single stream
  • Real-time Monitoring: Watch for errors as they happen
Note: This flag only affects foreground mode. In daemonized mode, stderr is written to log files when the service uses logs.sink: file. :::

Examples

Start with default configuration

Looks for systemg.yaml or sysg.yaml in the current directory.

Start with specific configuration

Foreground mode

Without --daemonize, the terminal attaches to the selected project. Boot progress updates in place, and output from every running service is multiplexed with a per-service prefix. Ctrl-C stops only that project and returns the terminal; the resident supervisor and other projects remain running.

Daemon mode

Start without retaining a terminal attachment. The command returns after the project reaches its target state; subsequent commands use the same resident supervisor.
Check if the daemon is running:

Debug mode

See detailed output during startup:

Capture stderr in foreground

Useful for development and debugging:
Output identifies the service and captured stream:

Unit mode (no config file)

Unit mode is for ad-hoc commands you want systemg to manage without writing a project manifest first:
systemg stages the command by translating it into a generated version 2 manifest—the common format the central supervisor understands for services and projects.
With no supervisor, the staged manifest starts a supervisor and the unit runs immediately. With a resident supervisor, staging does not alter live state: no process starts until you run the explicit sysg start --config ... command printed by systemg.
See Units for the complete stage, apply, inspect, and stop workflow.

Child mode for orchestrators (replacement for spawn)

What happens

  1. Manifest mode validates the complete graph and starts dependencies first
  2. Unit mode creates a single managed unit from the command
  3. Child mode attaches a managed child to the parent process tree
  4. Service output follows the configured logs.sink policy
  5. PIDs, process groups, lifecycle state, and cron history are tracked by project
In either mode, the supervisor owns the services. Foreground versus daemon mode controls the terminal attachment, not whether supervision exists.

See also

  • stop - Stop running services
  • status - Check service health
  • restart - Restart services