For years, whenever I needed to run an app as a Windows service, I used either sc.exe or NSSM. They work, but both had limitations that became painful in real projects:
- sc.exe always defaults to C:\Windows\System32 as the working directory, which breaks apps that rely on relative paths or local configs.
- NSSM is lightweight but lacks monitoring, logging rotation, and has only a minimal UI.
- WinSW is configurable, but XML-based and not very user-friendly for quick setups.
After running into these issues one too many times, I decided to build my own tool: Servy.
The goals
I wanted a solution that was:
- Easy to use with a clean UI, but also scriptable via CLI for automation.
- Flexible enough to run any app (Node.js, Python, .NET, scripts, etc.).
- Robust with logging, health checks, recovery, and restart policies built-in.
- Compatible with a wide range of Windows versions (from Windows 7 up to 11, plus Server editions).
Challenges along the way
- Working directory handling: Ensuring services run with the correct startup folder without hacks.
- Log management: Redirecting stdout/stderr to files, but with rotation to avoid unbounded growth.
- Health monitoring: Adding checks so the service can automatically restart or recover if something goes wrong.
- UI design: Balancing simplicity (for casual use) with advanced options (for professionals).
The result
The result is Servy, an open-source tool that turns any app into a native Windows service, combining both a modern GUI and a CLI for automation. It's designed to be both approachable and powerful enough for production use.
GitHub: github.com/aelassas/servy
Demo video
Getting Started
You have two options to install Servy. Download and install manually or use a package manager such as WinGet or Chocolatey.
Make sure you have WinGet or Chocolatey installed.
Run one of the following commands as administrator from Command Prompt or PowerShell:
WinGet
winget install servy
Chocolatey
choco install -y servy
Quick Links
- Download
- Installation Guide
- Usage
- Servy Manager
- Servy CLI
- Service Event Notifications
- Export/Import Services
- Security
- Architecture
- Building from Source
- Troubleshooting
- FAQ
Features
- Clean, simple UI
- Quickly monitor and manage all installed services with Servy Manager
- CLI for full scripting and automated deployments
- Run any executable as a Windows service
- Set service name, description, startup type, priority, working directory, environment variables, dependencies, and parameters
- Environment variable expansion supported in both environment variables and process parameters
- Run services as Local System, local user, or domain account
- Redirect stdout/stderr to log files with automatic size-based rotation
- Run pre-launch script execution before starting the service, with retries, timeout, logging and failure handling
- Prevent orphaned/zombie processes with improved lifecycle management and ensuring resource cleanup
- Health checks and automatic service recovery
- Monitor and manage services in real-time
- Browse and search logs by level, date, and keyword for faster troubleshooting from Servy Manager
- Export/Import service configurations
- Service Event Notification alerts on service failures via Windows notifications and email
- Compatible with Windows 7–11 x64 and Windows Server editions
Contributing
Servy is fully open-source, and we welcome contributions of all kinds! Whether it's fixing bugs, adding new features, improving documentation, or sharing ideas, your help makes Servy better for everyone.
You can contribute by:
- Submitting pull requests on GitHub
- Opening issues to report bugs or request features
- Joining discussions and providing feedback
Every contribution counts — help us make running Windows services simpler, more reliable, and more enjoyable!
Top comments (0)