A drop-in modern replacement for classic NSSM. Turn any Windows executable, Python script, Node.js app, or batch file into a rock-solid background Windows Service with intelligent restart throttling and automatic log rotation.
Click a command to see how nssm-rs registers and manages services in Windows Service Control Manager
Solves all common Windows Service wrapping pain points with modern Rust safety
Hooks directly into the Windows Service Control Manager. Visible in services.msc, controllable via sc.exe, PowerShell, or the Services GUI.
Prevents catastrophic 100% CPU lockups when a Windows service crashes immediately upon startup. Exponential backoff protects your server from reboot loops.
Redirect console stdout/stderr to files with automatic size-based rotation (AppRotateBytes) without locking file handles on Windows.
Configure Windows process priority class (Realtime, High, Normal, Idle) and pin background processes to specific CPU core affinity masks.
Inject custom environment variables into the service environment via AppEnvironmentExtra without polluting the global Windows System PATH.
Sends Windows Ctrl+C and WM_CLOSE events to allow applications to save state and clean up, with configurable timeout before forcing termination.
Automated release binaries compiled via GitHub Actions on Windows Server runners
| Parameter | Type | Description | Default |
|---|---|---|---|
| Application | Path | Full path to Windows binary (e.g. C:\node.exe) | — |
| AppParameters | String | Command-line arguments passed to application | — |
| AppDirectory | Path | Working directory for child process | — |
| AppStdout / AppStderr | Path | Redirect console output to Windows log files | — |
| AppRotateFiles | 0 | 1 | Enable automatic file rotation for stdout/stderr | 0 |
| AppRotateBytes | Integer | Rotate log file when size exceeds specified bytes | — |
| AppThrottle | Milliseconds | Minimum runtime to clear restart backoff | 1500 |
| AppExit | Enum | Action on exit: Restart, Ignore, Exit, Suicide | Restart |
| AppEnvironmentExtra | KEY=VAL | Inject extra environment variables into service | — |
| Feature | nssm-rs | Original C NSSM |
|---|---|---|
| Memory Safety (Rust) | 100% Rust (Zero Buffer Overflows) | Legacy C (Vulnerable) |
| Maintenance & Updates | Actively Maintained (2026+) | Abandoned since 2017 |
| Windows Server 2025 / Win 11 Support | Tested & Supported | Unmaintained compatibility |
| Crash Throttling (AppThrottle) | Yes (Exponential Backoff) | Yes |
| Log Rotation by Size & Time | Robust Async Rotation | Prone to Windows file lock crashes |
| License | MIT License | Public Domain |