In this post, you will learn how to use Porta SFTP Server as a Windows Service (Linux – Coming soon). However, it is important to know that you only need this if you want to run a long-live SFTP Server that can be started whether the user is logged in or not on the computer. This means the SFTP Server will run in a daemon/background and will not have a user interface (UI).
To enable the Porta SFTP Server to run as a service, you have to make sure that you are using version 3.1.0 or higher. This later version uses WinSW64.exe as a wrapper for the Porta SFTP Server in order to work as a Windows Service.
Required Version & Files

Note. The WinSW64.exe and the WinSW64.xml comes with the Porta SFTP Server Zip file.
XML Configuration
Open the WinSW64.xml file and make sure that it matches the following

Note. The Porta SFTP Server already has this configured by default.
Service Installation
Next, run the Porta SFTP Server go to the Server Settings, and tick/check the “Run As a Windows Service”. This will call the WinSW64.exe and install it as a Windows Service to use the Porta SFTP Server.

Note. This will need a admin privileges and will prompt you to provide the admin credentials. Also, make sure to tick/check the “Server Auto Start” to allow the SFTP Server to automatically start.
Starting Service
After the installation, click the “Start” button to start the installed Windows Service. This will also restart the Porta SFTP Server application to connect the User Interface (UI) to the service.

Note. During the start, this will may freeze the UI 3-5 seconds. If so, please wait.
Verifying Installed Service
Once the application has been restarted, you should get a log like the following. This indicates that the UI is connected to the Windows service.

Note. At this time, you should be able to connect any SFTP Client to the SFTP Server.
Removing Service
Now, to uninstall the Windows Server, you have to do the reverse such as:
- Stop the service using the “Server Settings” form
- Uncheck the “Run As a Windows Service” Check Box
- And Restart the Porta SFTP Server
Conclusion
In conclusion, this post shows how to use the Porta SFTP Server as a Windows Service. This new capability is made possible by open-source Windows Service Wrapper – WinSW. That said, you can now let the Porta SFTP Server run in the background.