Using NSSM to Run frpc as a Windows Service
In my previous blog post, I demonstrated how to set up FRP to tunnel local services to a public server. In this post, I’ll show you how to use NSSM (Non-Sucking Service Manager) to run the FRP client (frpc) as a Windows service. This ensures that frpc automatically starts on boot and stays running in the background without manual intervention.
What Is NSSM?
NSSM is a lightweight and user-friendly tool that lets you run any executable as a Windows service. Unlike some other service managers, NSSM focuses on simplicity and reliability.

With NSSM, you can:
- Automatically start your applications at system boot.
- Monitor and restart the application if it crashes.
- Manage application logs and adjust service settings easily.
Using NSSM to run frpc is especially useful if you’ve already configured FRP to expose your local services (like a web server, RDP, etc.) and you want a robust solution that keeps your FRP tunnel active even after reboots or unexpected shutdowns.
Step-by-Step Guide to Using NSSM
Below are the steps to install and configure NSSM to run an application as a Windows service, using frpc as our example.
Step 1: Download and Extract NSSM
- Download NSSM:
Visit the NSSM download page and select the appropriate version for your system (typically the 64-bit version for modern Windows). - Extract NSSM:
Unzip the downloaded file into a convenient directory, such asC:\nssm
.
Step 2: Prepare Your Application
For our example, we assume that you already have frpc set up on your Windows machine. In this scenario:
- Application Path:
C:\frp\frpc.exe
- Configuration File:
C:\frp\frpc.toml
(already configured and tested) - Test Run: Ensure the application runs correctly from the command line:
C:\frp\frpc.exe -c C:\frp\frpc.toml
Note: The same approach applies to any other application you’d like to run as a service.
Step 3: Install the Application as a Service with NSSM
- Open an Elevated Command Prompt:
Click Start, typecmd
, right-click Command Prompt, and choose Run as administrator. - Navigate to the NSSM Directory:
Change to the directory where NSSM is located. For example:cd C:\nssm\win64
- Launch NSSM to Install the Service:
Run the command:nssm install frpc
This command opens the NSSM GUI for service configuration.
Step 4: Configure the NSSM GUI
In the NSSM configuration window, fill in the following details:
- Application Path:
Set this to your executable. For our frpc example:C:\frp\frpc.exe
- Startup Directory:
Specify the directory containing the executable:C:\frp
- Arguments:
Provide the arguments needed to run your application. For frpc:-c C:\frp\frpc.toml
Optional: Configure additional settings such as the service description, logging parameters, and restart delays under the “Details” and “Log on” tabs.

Click Install Service to finalize the setup.
Step 5: Start and Verify the Service
- Start the Service:
You can either use the NSSM GUI or run the command:nssm start frpc
Alternatively, open the Windows Services console (services.msc
), locate the service (named “frpc”), and click Start. - Verify Operation:
- Services Console: Confirm the service status is “Running.”
- Task Manager: Check that the process (e.g.,
frpc.exe
) appears. - Application Logs: If applicable, review logs to ensure the application is running without issues.
NSSM installs the service with the startup type set to Automatic, ensuring that your application (frpc, in our case) will start automatically with Windows.
For the first time use, you might need to start the service manually.

Conclusion
Using NSSM, you can easily convert any executable into a reliable Windows service. In this guide, we walked through the process of:
- Downloading and extracting NSSM.
- Preparing your application (frpc as an example).
- Installing and configuring the application as a Windows service using NSSM.
- Starting and verifying the service.
While our example focused on frpc, the same steps can be applied to any application you want to run continuously on your system. This approach not only ensures that your critical processes remain active but also simplifies management and monitoring. Happy servicing!