I currently have vault server set up on my machine. However, I would like it to have an Automatic Startup after my machine is restarted. Essentially, I would want it to automatically run the vault server start up script e.g.:
vault server -config C:\vault_0.6.2\config.hcl
and to unseal the vault using 3 keys.
I have previously used Windows Service Wrapper (winsv) to install Spring Boot Applications as windows services. Would it be possible to use winsv to run vault? or if winsv could be used to execute 2 bat files (one containing vault server and another for vault unseal)?
I am using Windows 10.
I appreciate the help, thanks!
In case someone attempts this in the future. The solution was to have a service start up the vault server. The service uses ProcessBuilder to run a bat script that contains this:
start /b vault server -config "C:\vault_0.6.2\config.hcl"
Then it uses another ProcessBuilder that runs a second bat script containing: vault unseal %1
,where %1 is a paramter that the service passes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With