So at this point, we just don’t have any immediate plans to support running cockroach on Windows for anything other than just development purposes. So while we do provide an executable, it is not as thoroughly tested as our linux ones are and we suggest running it in production on a linux machine.
To provide CockroachDB as a Windows service, we would have to add a good amount of Windows service specialized code, an installer, and spend a lot more time testing it in Windows. All of these things are achievable, and we will provide them at some point, but not in the near future unless there is a fairly large response from the community for this.
So for this, I created a new issue to track it: https://github.com/cockroachdb/cockroach/issues/26510
All that being said, NSSM looks like a great way to wrap the executable and might just work. And we’ll gladly help you out as best we can.
If you do get it working, please post the steps here! (or in the linked issue)