Operations 4 min read

Guide to Using nssm for Windows Service Management and .NET 6 Web Application Deployment

This article introduces nssm, a Windows service wrapper, explains its features, installation steps, configuration options, common commands, and demonstrates turning a .NET 6 web application into a manageable Windows service with practical command‑line examples.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
Guide to Using nssm for Windows Service Management and .NET 6 Web Application Deployment

nssm (Non‑Sucking Service Manager) is a lightweight Windows service wrapper that can turn any executable, including console or GUI programs, into a service that starts automatically on boot.

Key features: supports ordinary exe programs, simple installation and modification, and automatic monitoring with automatic restart if the process crashes.

Official website: https://nssm.cc/

Configuration Details

Path – the executable to run.

Startup directory – the directory of the application.

Arguments – command‑line arguments for the executable.

Service name – the name of the created Windows service.

Common commands:

nssm install servername   // create service and open configuration UI
nssm start servername     // start service
nssm stop servername      // stop service
nssm restart servername   // restart service
nssm remove servername    // delete service
nssm edit servername      // edit service configuration
nssm set servername param value   // set a service parameter
sc delete servername      // Windows built‑in command to delete a service

Practical example: turning a .NET 6 web application into a Windows service.

Application start command:

dotnet WebApplication_nssm.dll --urls=http://*:8888/ --port=8888

Installation steps using nssm:

nssm install
Path: C:\Program Files\dotnet\dotnet.exe
Startup directory: D:\TechLearn\001\Tools--nssm\WebApplication_nssm\bin\Debug
et6.0
Arguments: WebApplication_nssm.dll --urls=http://*:8888/ --port=8888
Service name: webapp8888

After clicking “install service”, the service appears in the Windows Services list.

Service management commands:

D:
ssm-2.24\win64>nssm start webapp8888
D:
ssm-2.24\win64>nssm stop webapp8888
D:
ssm-2.24\win64>nssm restart webapp8888
D:
ssm-2.24\win64>nssm edit webapp8888
D:
ssm-2.24\win64>nssm remove webapp8888

These commands demonstrate starting, stopping, restarting, editing, and removing the service, with corresponding success messages.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

OperationsDeploymentnetnssmWindows Service
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.