Repository navigation
Overview
Important
Console UI Compatibility If your app tries to visually update the command prompt (like clearing the screen or moving the cursor), it will crash when running as a background service since services don't have visible windows. To fix this without changing your code, enable the Enable Console UI option in the service configuration while installing your service.
Servy lets you run any application as a native Windows service with full control over startup, environment, logging, and lifecycle management.
You can manage services using the desktop app (GUI), the CLI (servy-cli), or PowerShell.
Important
Desktop Interaction and Session 0 Isolation
Servy can wrap any executable as a native Windows service, including GUI apps as long as they do not require an interactive desktop session. Like all Windows service wrappers (including NSSM and WinSW), Servy processes execute within Session 0, which runs in an isolated environment without interactive desktop access.
If you attempt to run a GUI application that requires an interactive desktop as a service, it will fail to start or crash at runtime, often throwing errors such as Access Violation (0xC0000005) or Null Pointer Exception. If your application requires an active desktop session, use an alternative automation tool (such as Windows Task Scheduler configured to run only when a user is logged on) instead.
Note
Before You Begin
Servy requires administrator rights to install and manage Windows services. If you are using a modern Windows workstation or server, choose the .NET 10.0+ build. If you need support for older platforms such as Windows 7 SP1 or Windows Server 2008 R2, use the .NET Framework 4.8 build instead.
To get started, download the latest release from GitHub or install via a package manager:
WinGet
winget install servyChocolatey
choco install -y servyScoop
scoop bucket add extras
scoop install servyPatch My PC
Servy is available in the official Patch My PC catalog for enterprise automated deployment and updates via Microsoft Intune and ConfigMgr (SCCM).
After a default installation servy-cli is on the system PATH - see Installation Guide for the option that controls this and for the portable package.
You can manage services using the desktop app (GUI), the CLI, or PowerShell.
Here's a minimal example using the CLI to run a Node.js app as a Windows service. Run it from an elevated PowerShell prompt: installing, starting and stopping a Windows service all require administrator privileges.
servy-cli install `
--name="NodeApp" `
--path="C:\Program Files\nodejs\node.exe" `
--startupDir="C:\apps\nodeapp" `
--params="server.js" `
--enableHealthThis creates a service named NodeApp that runs a Node.js server in the background, starts automatically with Windows, and has health monitoring enabled.
Then start the service:
servy-cli start --name="MyService"Or from an elevated Command Prompt:
sc.exe start MyServiceExplore more examples and recipes for Python, Java, Go, and other popular frameworks.
The Servy Desktop App provides an intuitive graphical interface to configure, install, and manage individual Windows services.
Configure core service properties including name, description, executable path, arguments, working directory, and startup type. See Servy Desktop App.
For more details on CPU affinity, see the FAQ.
Configure stdout and stderr log file redirection, size-based and date-based log rotation, and retention policies. See Logging & Log Rotation.
Note
Enabling the debug option will record sensitive information in the local log file at %ProgramData%\Servy\logs\services\<ServiceName>\Servy.Service.log. This behavior only occurs when local logging is enabled, which is the default setting. Sensitive data is never recorded in the Windows Event Log. The CLI show command and Show-ServyService mask the encrypted fields by default; --decrypt / -Decrypt prints the parameters and environment variables in clear text (the stored password always stays masked). See Servy CLI and Servy PowerShell Module.
For detailed information about logging, check out the Logging & Log Rotation documentation.
Configure automated liveness checks, external diagnostic heartbeat pings, and automatic restart behavior. See Health Monitoring & Recovery.
For detailed information about health monitoring and recovery, check out the Health Monitoring & Recovery documentation.
Set custom process environment variables and Windows service dependencies. See Environment Variables and Service Dependencies.
For detailed information about environment variables, check out the Environment Variables documentation.
For detailed information about service dependencies, check out the Service Dependencies documentation.
Configure service execution accounts including LocalSystem, built-in service accounts, domain accounts, and gMSAs. See Security.
You can also run the service under:
NT AUTHORITY\NetworkServiceNT AUTHORITY\LocalService- Passwordless accounts
Execute custom initialization scripts or executables before the main service process starts. See Pre-Launch & Post-Launch Actions.
For detailed information about the pre-launch hook, check out the Pre-Launch & Post-Launch Actions documentation.
Run auxiliary tasks immediately after the primary process launches successfully. See Pre-Launch & Post-Launch Actions.
For detailed information about the post-launch hook, check out the Pre-Launch & Post-Launch Actions documentation.
Run graceful shutdown tasks or resource draining scripts prior to stopping the main service. See Pre-Stop & Post-Stop Actions.
For detailed information about the pre-stop hook, check out the Pre-Stop & Post-Stop Actions documentation.
Execute post-cleanup tasks after the primary service and all child processes have completely exited. See Pre-Stop & Post-Stop Actions.
For detailed information about the post-stop hook, check out the Pre-Stop & Post-Stop Actions documentation.
Servy Manager is a central administrative interface to manage, monitor, and inspect all services installed across the system.
View all registered services, inspect real-time CPU/RAM metrics, and trigger lifecycle actions. See Servy Manager.
Track real-time CPU and memory utilization using live visual performance graphs. See Servy Manager.
Stream unified stdout and stderr console output in real time with live filtering and tailing controls. See Servy Manager.
Inspect full Windows Service Control Manager (SCM) dependency trees with status color coding. See Servy Manager.
Inspect Windows Event Log entries directly within the application viewer. See Servy Manager.
Servy includes a command-line interface (servy-cli) and a PowerShell module for full automation and CI/CD integration.
Execute service operations directly via command-line arguments or configuration files. See Servy CLI.
Manage services natively using PowerShell cmdlets and pipeline objects. See Servy PowerShell Module.
Copyright © Akram El Assas. All rights reserved.
Getting Started
Core Suite
Configuration & Features
- Advanced Configuration
- Logging & Log Rotation
- Health Monitoring & Recovery
- Environment Variables
- Service Dependencies
- Export / Import Services
Lifecycle Hooks
Automation & Production
- Servy Automation & CI/CD
- Embedding in Custom Installers
- Integration with Monitoring Tools
- Service Event Notifications
- Backup / Restore & VM Cloning
Reference & Support