mirror of
https://github.com/fosrl/newt.git
synced 2026-03-09 07:12:28 -05:00
Run newt.exe as Windows Service #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LukasSt46 on GitHub (Apr 3, 2025).
Hi, is it possible, to run newt.exe including all parameters, as a Windows Service?
@oschwartz10612 commented on GitHub (Apr 3, 2025):
You should be able to but you'll have to create it manually! Take a look at the following link: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable
@LukasSt46 commented on GitHub (Apr 3, 2025):
Yes, I tried that. Unfortunately, the service doesn't start. It stays in the "Starting" state and then terminates after 60 seconds. The service would work during those 60 seconds. It seems as if the EXE file isn't transmitting the "started" status to Windows.
@oschwartz10612 commented on GitHub (Apr 4, 2025):
Instead of manually creating the service, have you considered using a tool like nssm (Non-Sucking Service Manager)? It simplifies creating Windows services from executables. It might handle the 'started' status issue automatically. You can find it here: https://nssm.cc/
If you still encounter problems with nssm, please provide the command you used and any error messages. Unfortunately I am not a Windows expert and have not created services before but if we figure this out we could add it to the docs.
@oschwartz10612 commented on GitHub (Apr 22, 2025):
Please reopen if you need further help!
@paivaric commented on GitHub (Sep 1, 2025):
Hi guys... I tried all those solution but have no success... anyone have succeed?
@oschwartz10612 commented on GitHub (Sep 1, 2025):
Newt stored and loads credentials from
%PROGRAMDATA%\newt\newt-client\config.jsonaccording to the readme. Maybe you can make sure it is populated (you can run newt in the cli with the --id and --secret) and it will save this file. Then run it as a service with nssm and let me know what happens?Are you able to get the logs to see what it is doing when it is a service?