boundary icon indicating copy to clipboard operation
boundary copied to clipboard

Unable to run Boundary Server has Windows Service

Open allynl93 opened this issue 2 years ago • 5 comments

Deploying a worker on a Windows device is a valid setup, but I cannot find any documentation on how to run the executable as a Windows Service.

I completed the following to create the service:

sc.exe Create Boundary binPath= '"D:\Boundary\boundary.exe" Server -config="D:\Boundary\pki-worker.hcl"'

The service was created successfully but when I try and start the service I receive an error:

"Error 1053: The service did not respond to the start or control request in a timely manner".

Perhaps I am missing a flag? But the documentation is lacking in this area. Support made an article for Linux hosts but didn't include Windows.

allynl93 avatar Jun 24 '23 11:06 allynl93

A quick google search yields: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable Have you tried that one?

macmiranda avatar Jun 27 '23 17:06 macmiranda

I used the default Windows tool sc.exe yes.

allynl93 avatar Jul 13 '23 17:07 allynl93

I actually meant http://nssm.cc/

macmiranda avatar Jul 13 '23 18:07 macmiranda

I actually meant http://nssm.cc/

But why Vault by HashiCorp can use default sc.exe without any second-party apps? https://developer.hashicorp.com/vault/tutorials/vault-agent/agent-windows-service#register-vault-agent-as-a-windows-service

1Rost avatar Nov 20 '23 11:11 1Rost

To support this Boundary would need to implement the Windows Service Manager syscall event loop. There is no support for this at the moment, but a user could theoretically write their own wrapper around the Boundary binary to implement the expected API and just manage the process. https://pkg.go.dev/golang.org/x/sys/windows/svc is a package that can help do this in Go.

johanbrandhorst avatar Mar 14 '24 20:03 johanbrandhorst