Skip to main content

stop / restart / reload / delete

Lifecycle commands for managing running processes.

stop​

Stop a managed process.

runix stop <id|name|all> [flags]

Examples​

# Stop by name
runix stop api

# Stop by numeric ID
runix stop 1

# Stop all processes
runix stop all

# Force kill (SIGKILL)
runix stop api --force

# Custom timeout before force kill
runix stop api --timeout 10s

# Graceful stop
runix stop api --graceful

Flags​

FlagShortDefaultDescription
--forcefalseSend SIGKILL instead of SIGTERM
--timeout5sGrace period before force kill
--gracefulfalseGraceful stop (run pre_stop/post_stop hooks)
--format-ftextOutput format: text, json

Stop Behavior​

  1. SIGTERM is sent to the process group (Kill(-pid, SIGTERM))
  2. Runix waits for the --timeout duration
  3. If the process hasn't exited, SIGKILL is sent (unless --force skips step 1)

restart​

Restart a managed process.

runix restart <id|name|all> [flags]

Examples​

# Restart by name
runix restart api

# Restart all processes
runix restart all

# Restart all in parallel
runix restart all --parallel

Flags​

FlagShortDefaultDescription
--parallelfalseRestart all processes concurrently
--format-ftextOutput format: text, json

Restart Behavior​

  1. Stops the process (SIGTERM → timeout → SIGKILL)
  2. Runs pre_stop and post_stop hooks
  3. Starts the process again
  4. Runs pre_start and post_start hooks

reload​

Gracefully reload a process (restart preserving configuration).

runix reload <id|name> [flags]

Examples​

# Reload a single process
runix reload api

# Rolling reload all processes
runix reload api --rolling

# Rolling reload with batch size
runix reload api --rolling --batch-size 3

# Rolling reload with readiness check
runix reload api --rolling --wait-ready

# Rolling reload with rollback on failure
runix reload api --rolling --rollback

Flags​

FlagShortDefaultDescription
--rollingfalsePerform rolling reload
--batch-size1Processes to reload concurrently
--wait-readyfalseWait for readiness between batches
--rollbackfalseRollback on failure
--format-ftextOutput format: text, json

Reload vs Restart​

RestartReload
Process stopsYesYes
Config re-readNoYes
HooksAllAll
New PIDYesYes

delete​

Stop and remove a process from the process table.

runix delete <id|name|all> [flags]

Examples​

# Delete by name
runix delete api

# Delete by ID
runix delete 1

# Delete all processes
runix delete all

# Force stop before deleting
runix delete api --force

Flags​

FlagShortDefaultDescription
--forcefalseForce stop before deleting
--format-ftextOutput format: text, json

Delete Behavior​

  1. Stops the process if running
  2. Removes it from the supervisor's process table
  3. Log files are preserved (use runix flush to clear them)

Common Target Syntax​

All lifecycle commands accept:

TargetDescription
<name>Exact process name match
<id>Numeric ID
allAll managed processes

Dry Run​

All lifecycle commands support the global --dry-run flag:

runix stop api --dry-run
# [Runix] Dry run: would stop "api"