Skip to content

helix stop

Stop the background daemon started by helix start (or any process whose PID lives in /tmp/helix.pid). The handshake is graceful: SIGTERM first, then a 10-second grace period, then SIGKILL if the process is still alive.

Usage

helix stop

Flags

This subcommand takes no flags and no arguments.

Behavior notes

  • Requires $HELIX_LICENSE. Even though stopping doesn't load a flow, the license gate runs first; this is intentional so an unlicensed binary can't be used to manage a licensed one.
  • Reads /tmp/helix.pid. If the file is missing or the PID is no longer running, prints Helix is not running and returns success (exit 0). Stale PID files are cleaned up automatically.
  • Sends os.Interrupt (SIGTERM on Unix) to the child. Then polls every 500ms for up to 10 seconds (20 iterations) waiting for the process to exit gracefully — the engine drains in-flight exchanges within helix.shutdown.drain_timeout during this window.
  • After 10 seconds, force-kills with process.Kill() (SIGKILL on Unix) and prints Helix force-killed.
  • Always removes /tmp/helix.pid on exit, even if the process was already dead.

Exit codes

  • 0 — daemon stopped (or was not running)
  • 1 — unable to find or signal the process (rare; typically a stale PID file)

Examples

Stop a running daemon:

helix stop
# Stopping Helix (PID 12345)...
# Helix stopped

Stop + start to pick up edits:

helix stop && helix start app.yaml
# or, equivalently:
helix restart app.yaml

Source

cmd/helix/main.go lines 1300-1338 (cmdStop)

See also