Skip to content

Servy Desktop App

aelassas edited this page Aug 21, 2026 · 38 revisions

Servy is a Windows service wrapper that allows you to transform any executable, script, or batch file into a background service. It bridges the gap between simple console applications and the enterprise-grade management expected from native Windows services.

Table of Contents

  1. Introduction
  2. Overview
    1. Service Details
    2. Logging
    3. Recovery
    4. Advanced
    5. Log On
    6. Pre-Launch
    7. Post-Launch
    8. Pre-Stop
    9. Post-Stop
  3. Features
  4. Availability
  5. Usage
  6. See Also

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.

Introduction

Servy provides an intuitive interface to run any app as a native Windows service with configuration and management options. By using Servy, you can ensure that your applications start automatically when the system boots, restart following unexpected crashes, and maintain detailed logs without modifying a single line of your application code.

Whether you are hosting a web server, a background worker, or a database, the Servy Desktop App simplifies the process of deployment and maintenance through a clean, tabbed interface.

Note

If you get a blank screen on remote management tools (like MeshCentral, TeamViewer, or AnyDesk), run the desktop app from an admin command prompt with the following command: Servy.exe --force-sr

Overview

The following sections illustrate the key components of the Desktop App, showing how you can customize every aspect of your service lifecycle.

Service Details

This tab lets you configure the main service properties such as name, description, executable path, startup directory, and startup type.

servy-config-main

For more details on CPU affinity, see the FAQ.

Logging

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.

servy-config-logging

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.

Recovery

This tab lets you configure automated health-monitoring and failure-handling behavior. It enables continuous internal liveness checks, optional out-of-band diagnostic pings to external monitoring platforms (e.g., healthchecks.io or Uptime Kuma Push Monitors), and customizable recovery actions to keep your application running reliably without manual intervention.

servy-config-recovery

For detailed information about health monitoring and recovery, check out the Health Monitoring & Recovery documentation.

Advanced

The advanced tab provides additional configuration options such as environment variables and service dependencies.

servy-config-advanced

For detailed information about environment variables, check out the Environment Variables documentation.

For detailed information about service dependencies, check out the Service Dependencies documentation.

Log On

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.

servy-config-logon

You can also run the service under:

  • NT AUTHORITY\NetworkService
  • NT AUTHORITY\LocalService
  • Passwordless accounts
servy-config-logon-builtin-accounts

Important

If the service runs under an account other than Local System, you must grant Modify access to %ProgramData%\Servy for the service account and run the mandatory hardening script (Set-ServyExePermissions.ps1 -TargetAccount "domain\user") to lock down binary executables to Read & Execute, preventing unprivileged binary tampering and local privilege escalation. For script location and execution instructions, see the Executable Permission Hardening Guide.

Pre-Launch

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, the pre-launch hook runs synchronously with a timeout. If it fails or times out, 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.

servy-config-pre-launch

For detailed information about the pre-launch hook, check out the Pre-Launch & Post-Launch Actions documentation.

Post-Launch

Configure an optional post-launch program that runs after the process starts successfully.

servy-config-post-launch

Orphaned post-launch hooks are cleaned up when the service stops.

For detailed information about the post-launch hook, check out the Pre-Launch & Post-Launch Actions documentation.

Pre-Stop

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.

servy-config-pre-stop

For detailed information about the pre-stop hook, check out the Pre-Stop & Post-Stop Actions documentation.

Post-Stop

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.

servy-config-post-stop

For detailed information about the post-stop hook, check out the Pre-Stop & Post-Stop Actions documentation.

Features

  • Run Anything: Wrap executables, scripts, or batch files as native Windows services.
  • Smart Recovery: Automatically restart services or the entire host machine based on custom health monitoring rules.
  • Flexible Lifecycle Hooks: Execute custom code at every stage (pre-launch, post-launch, pre-stop, and post-stop).
  • Log Rotation: Rotate logs by size or date, with real-time tailing in the Manager console.
  • Secure Credentials: Encrypted storage of service account passwords using industry-standard AES.
  • Real-time Monitoring: Integrated CPU and RAM performance tracking.
  • Dependency Mapping: Visual dependency trees to troubleshoot startup sequences.

Availability

Servy Desktop App is distributed in multiple editions to cover modern and older systems:

  • .NET 10.0+ (Recommended)

    • Self-contained installer
    • Does not require any .NET runtime to be pre-installed
  • .NET Framework 4.8 (For older systems)

    • Standard installer package
    • Requires .NET Framework 4.8 Runtime

Usage

  1. Launch: Run the Servy Desktop App (Servy.exe).
  2. Configure: Enter your application path and service details in the "Service Details" (Main) tab.
  3. Options: Customize your environment variables, logging preferences, and recovery actions in the respective tabs.
  4. Install: Click the "Install" button to register the service with the Windows Service Control Manager (SCM).
  5. Manage: Use Servy Manager to monitor the performance of your new service and browse logs.

See Also

Clone this wiki locally