-
-
Notifications
You must be signed in to change notification settings - Fork 72
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, simply turn on 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.
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 innounp
scoop update innounp
scoop install servyYou 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:
servy-cli install `
--name="MyService" `
--path="C:\Program Files\nodejs\node.exe" `
--startupDir="C:\MyServer" `
--params="C:\MyServer\server.js" This creates a service named MyService that runs your Node.js server in the background and starts automatically with Windows.
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.
This tab lets you configure the main service properties such as name, description, executable path, arguments, startup directory, and startup type.
This tab lets you configure stdout and stderr logging, including size-based log rotation, date-based log rotation, the maximum number of rotated log files to retain, and additional options such as enabling debug logs.
Note
Enabling the debug option will record sensitive information in the local log file at %ProgramData%\Servy\logs\Servy.Service.log. This behavior only occurs when local logging is enabled, which is the default setting. To maintain security, sensitive data is never recorded in the Windows Event Log or displayed within the CLI and PowerShell module.
For detailed information about logging, check out the Logging & Log Rotation documentation.
Here you can set up recovery actions (restart service, restart process, restart computer, or run a failure program) to automatically handle process crashes and failed health checks.
For detailed information about health monitoring and recovery, check out the Health Monitoring & Recovery documentation.
The advanced tab provides additional configuration options such as 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.
This tab allows you to configure the service account, including support for local accounts, domain accounts, and gMSA accounts.
Servy securely encrypts stored passwords using AES. For more details, see the Security page.
You can also run the service under:
NT AUTHORITY\NetworkServiceNT AUTHORITY\LocalService- Passwordless accounts
Important
Permissions: If the service runs under an account other than LocalSystem, NetworkService, or LocalService, you must grant Write access to %ProgramData%\Servy for that account. See the Security page for more information.
Scoop Users: If you installed via Scoop, permissions are not set automatically. You must manually grant NetworkService or LocalService access to the %ProgramData%\Servy folder.
Configure an optional pre-launch program that runs before the main service process starts. This can be used to prepare the environment, set up dependencies, or run initialization scripts. By default, pre-launch hook runs synchronously with a timeout. If it fails, the service won't start unless Ignore Failure is enabled.
Set the timeout to 0 to run the pre-launch hook in fire-and-forget mode. When set to 0, the hook is started and the service is launched immediately without waiting for completion. Use this only for tasks that do not affect the service's ability to start or run correctly. Stdout/Stderr redirection and retries are not available in fire-and-forget mode.
Orphaned fire-and-forget pre-launch hooks are cleaned up when the service stops.
For detailed information about pre-launch hook, check out Pre-Launch & Post-Launch Actions documentation.
Configure an optional post-launch program that runs after the process starts successfully.
Orphaned post-launch hooks are cleaned up when the service stops.
For detailed information about post-launch hook, check out Pre-Launch & Post-Launch Actions documentation.
Configure an optional script or executable to run before the main service stops. This can be used for graceful shutdown tasks such as notifying external systems or draining resources. The pre-stop process runs synchronously and extends the service stop timeout while it is running. Set the timeout to 0 to run the pre-stop process in fire-and-forget mode.
For detailed information about pre-stop hook, check out Pre-Stop & Post-Stop Actions documentation.
Configure an optional script or executable to run after the wrapped process and all of its child processes have exited. The post-stop process is started in fire-and-forget mode and does not block service shutdown.
For detailed information about post-stop hook, check out Pre-Stop & Post-Stop Actions documentation.
Servy Manager is a utility for Servy that provides a centralized interface to manage all services installed or imported into Servy.
The Manager provides a central place to view all installed services, their status, CPU & RAM usage in real time, and quick actions (start, stop, restart, install, uninstall, remove, edit, copy PID).
Monitor CPU & RAM usage in real time from the Performance tab with live graphs.
Monitor service stdout and stderr output in real time from a single, unified console.
The Console view automatically loads recent log history, continues tailing live output, and keeps both streams ordered by timestamp for accurate troubleshooting.
You can filter logs instantly, pause updates while selecting or copying text, and resume live streaming without losing context.
The Dependencies tab provides a visual representation of a service dependency tree retrieved from the Service Control Manager (SCM). Each dependency is displayed with its current status, where running services are shown in green, stopped services in red, and cycles in orange. The tree can be refreshed at any time using the Refresh button or by pressing F5.
This view is especially useful for understanding startup and shutdown order, diagnosing why a service fails to start, and quickly identifying stopped or missing dependencies that may impact service availability.
Servy writes logs to the Windows Event Log, and its built-in log viewer lets you inspect them in real time directly from the GUI.
Servy also comes with a PowerShell module and CLI commands, enabling full automation and integration into CI/CD pipelines.
After installation, the Servy directory is automatically added to the system PATH environment variable. This allows you to run servy-cli.exe directly from any elevated Command Prompt or PowerShell session.
Copyright © Akram El Assas. All rights reserved.
- Home
- Overview
- Installation Guide
- Advanced Configuration
- Usage
- Servy Desktop App
- Servy Manager
- Servy CLI
- PowerShell Module
- Examples & Recipes
- Logging & Log Rotation
- Health Monitoring & Recovery
- Environment Variables
- Service Dependencies
- Pre-Launch & Post-Launch Actions
- Pre-Stop & Post-Stop Actions
- Shutdown & Teardown
- Export/Import Services
- Automation & CI/CD
- Integration with Monitoring Tools
- Service Event Notifications
- Comparison with Alternatives
- Security
- Architecture
- Building from Source
- Troubleshooting
- FAQ