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
| Flag | Short | Default | Description |
|---|---|---|---|
--force | false | Send SIGKILL instead of SIGTERM | |
--timeout | 5s | Grace period before force kill | |
--graceful | false | Graceful stop (run pre_stop/post_stop hooks) | |
--format | -f | text | Output format: text, json |
Stop Behavior
- SIGTERM is sent to the process group (
Kill(-pid, SIGTERM)) - Runix waits for the
--timeoutduration - If the process hasn't exited, SIGKILL is sent (unless
--forceskips 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
| Flag | Short | Default | Description |
|---|---|---|---|
--parallel | false | Restart all processes concurrently | |
--format | -f | text | Output format: text, json |
Restart Behavior
- Stops the process (SIGTERM → timeout → SIGKILL)
- Runs pre_stop and post_stop hooks
- Starts the process again
- 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
| Flag | Short | Default | Description |
|---|---|---|---|
--rolling | false | Perform rolling reload | |
--batch-size | 1 | Processes to reload concurrently | |
--wait-ready | false | Wait for readiness between batches | |
--rollback | false | Rollback on failure | |
--format | -f | text | Output format: text, json |
Reload vs Restart
| Restart | Reload | |
|---|---|---|
| Process stops | Yes | Yes |
| Config re-read | No | Yes |
| Hooks | All | All |
| New PID | Yes | Yes |
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
| Flag | Short | Default | Description |
|---|---|---|---|
--force | false | Force stop before deleting | |
--format | -f | text | Output format: text, json |
Delete Behavior
- Stops the process if running
- Removes it from the supervisor's process table
- Log files are preserved (use
runix flushto clear them)
Common Target Syntax
All lifecycle commands accept:
| Target | Description |
|---|---|
<name> | Exact process name match |
<id> | Numeric ID |
all | All managed processes |
Dry Run
All lifecycle commands support the global --dry-run flag:
runix stop api --dry-run
# [Runix] Dry run: would stop "api"