-
-
Notifications
You must be signed in to change notification settings - Fork 88
Service Dependencies
Akram El Assas edited this page Sep 14, 2025
·
34 revisions
Servy supports optional service dependencies, allowing a service to start only after one or more other Windows services are running.
Enter each dependent service by its service name (not the display name) on a new line or separate them with semicolons (;).
This ensures that your service starts in the correct order and avoids errors if required services are not yet running.
The --deps command-line option lets you specify one or more Windows service dependencies when installing a service via the CLI.
-
Syntax:
--deps "Service1; Service2; Service3" - Servy will wait for all specified services to be running before starting the main service.
- Multiple dependencies can be separated with semicolons or listed on separate lines in the configuration file.
- This is especially useful for applications that rely on databases, message brokers, or other background services.
.\servy-cli install `
--name "My NodeJS Service" `
--description "My NodeJS Server" `
--path "C:\Program Files\nodejs\node.exe" `
--startupDir "C:\Apps\App" `
--params "C:\Apps\App\index.js" `
--startupType Automatic `
--priority Normal `
--stdout "C:\Apps\App\stdout.log" `
--stderr "C:\Apps\App\stderr.log" `
--enableRotation `
--rotationSize 10485760 `
--enableHealth `
--heartbeatInterval 10 `
--maxFailedChecks 3 `
--recoveryAction RestartService `
--maxRestartAttempts 5 `
--env "ENV_VAR1=VAL1; ENV_VAR2=VAL2;" `
--deps "MongoDB; MySQL80" `
--user ".\username" `
--password "secret"Tip: You can combine service dependencies with pre-launch scripts and health checks to ensure that your service starts reliably in complex environments.
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
- Backup/Restore & VM Cloning
- Architecture
- Building from Source
- Troubleshooting
- FAQ