How to set up Stash as a Windows service
Source: Dev.to
Note
There are quite a few packages called Stash. This guide is for the Stash application.
Stash is provided as a standalone executable. Below are the steps to turn it into a Windows service that launches automatically when you log in (and possibly before).
Step 1: Download Stash
Download the latest stash‑win.exe from the Stash releases page and place it in C:\Program Files\stash.
You can use a different location, but Program Files gives the executable maximum protection from non‑admin actions.
Because browsers usually cannot write directly to Program Files, you may need to download the file to a temporary folder first and then move it to its final destination with a file manager.
Step 2: Install Servy
Install Servy from its GitHub releases page.
The non‑net installer is recommended.
Step 3: Perform initial Stash service setup
-
Launch Servy.
-
In the Main tab, fill in the required fields:
- Service Name * – choose a descriptive name.
- Display Name – optional, but helpful for later identification.
- Service Description – optional description.
- Process Path * – browse to the
stash‑win.exeyou placed in Step 1.
-
By default the service will run as SYSTEM, which is unsafe if the app is compromised. Switch to the Log On tab, select the User Account radio button, and enter your Windows username and password (both Password and Confirm Password fields).
Step 4: Grant %ProgramData%\Servy permissions to your Windows user account
-
Open File Explorer and type
%ProgramData%in the address bar, then press Enter. -
Locate the
Servyfolder, right‑click it, and choose Properties → Security → Edit…. -
Click Add…, enter your Windows username in the Enter the object names to select field, and click OK.
-
Select your user account in the list and ensure the following permissions are checked under Allow:
- Read & execute
- List folder contents
- Read
- Write
-
Click Apply, then OK to close the dialogs.
Step 5: Finalize Stash service setup
Return to the Servy window and click Install. Wait for the confirmation that the service has been installed.
Step 6: Verify the service installation
- Open the Services manager: Start → type
services→ select the Services result (gear icon). - Locate the entry you created in Step 3, select it, and click Start on the left pane.
- Once the service starts, open a web browser and navigate to http://localhost:9999. The Stash UI should appear.
Removing the service (if you need to start over)
Open an elevated PowerShell prompt: Start → type PowerShell → right‑click the latest version → Run as administrator. Then run:
Remove-Service -Name "ServiceNameYouChoseInStep3"
This deletes the service from Windows, allowing you to begin the setup again.
Credits
Thanks to zimanninetynine for the initial setup instructions.