-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run Vault agent as a Windows service #7609
Comments
I can confirm that this affects both Windows Server 2012 R2 as well as Windows Server 2019. |
As a workaround you can use NSSM - the Non-Sucking Service Manager to manage Vault Agent running as a service under Windows. |
It doesn't make sense to require Windows Server users to have to log onto the server and manually launch vault.exe. Then expect us to leave our account logged in so the program doesn't close. This is just not feasible. We need the option to run as a service. |
Any update on this please? We can already run Consul and Nomad as a native windows service. Why is Vault lagging behind? |
Apologies for the radio silence on this issue. Up until now, this work just hasn't been prioritized. I'm looking into what it would take, though, and hope to have a more meaningful update sometime soon. |
Not sure if this is related, but if I put a |
@iancward I'm not sure I'm following your point as it relates to running the agent as a windows service. Can you elaborate a bit? |
Just to follow up here for the people interested, this work has merged and should be available in 1.7. |
I'm testing v1.7.3 and the service immediately stops after being started. No useful detail in the event viewer. |
I've verified that Vault v1.7.3 works on Windows Server 2019 using the command However, Vault Server is still not able to be ran as a service... The commits that added this feature to Vault Agent will need to be applied in a similar fashion for Vault Server |
Describe the bug
Unable to run Vault agent as a Windows service using builtin mechanism (sc.exe). Vault agent run in background, perform authentication using AppRole and fetch token into the file, but service return error:
Vault agent can be also started manually using the same command as specified in service definition.
Probably Vault's Windows exe doesn't report status required by Windows Service Control Manager like i.e. Consul.
To Reproduce
Steps to reproduce the behavior:
PS C:\Program Files\vault> sc.exe start "Vault Agent"
Expected behavior
Be able to run Vault agent as a Windows service like in case of Consul:
Environment:
Vault agent configuration file(s):
The text was updated successfully, but these errors were encountered: