Hot Reload
Runix can reload its configuration file without restarting the daemon or interrupting healthy processes.
Usage
# Reload config via CLI
runix config reload
# Or send SIGHUP to the daemon (if supported)
How It Works
Config Diffing
The internal/config/hotreload.go module computes the diff between old and new configs:
func DiffConfigs(old, new *types.RunixConfig) *ConfigDiff
What the diff detects
| Change | Action |
|---|---|
| New process added | Start the new process |
| Process removed | Stop and remove the process |
| Process config changed | Reload (graceful restart) the process |
| Process unchanged | No action — process continues running |
| Defaults changed | Applied to processes on next restart |
| Cron jobs changed | Update scheduler |
| New cron job | Register with scheduler |
| Removed cron job | Unregister from scheduler |
Diff Output
[Runix] Configuration changes:
+ process "worker" added
- process "legacy-api" removed
~ process "api" env.PORT changed: "8080" → "9090"
~ defaults.max_restarts changed: 5 → 10
Safety Guarantees
- Validation first — The new config is validated before any changes are applied
- No disruption — Unchanged processes continue running without interruption
- Rollback on failure — If applying changes fails, the daemon keeps the old config
Config Reload Without Daemon
If the daemon is not running, runix config reload still reads and validates the config:
runix config reload
# [Runix] Config reloaded (daemon not running, changes apply on next start)
What's Next
- Configuration Reference — Full YAML schema
- Daemon — How the daemon manages config
- CLI: Config Reload — Command reference