Skip to content
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

Windows service #50

Closed
chrispolley opened this issue Nov 26, 2019 · 8 comments
Closed

Windows service #50

chrispolley opened this issue Nov 26, 2019 · 8 comments

Comments

@chrispolley
Copy link

This is great - thanks!

My application is a blend of cloud (linux) and multi-site on-prem (mostly windows but also linux) machines. I found that I could get this installed as a service on Windows 7 and Windows 10 using cygwin's cygrunsrv, but was unable to using the built-in sc from Microsoft (see https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create and https://support.microsoft.com/en-us/help/251192/how-to-create-a-windows-service-by-using-sc-exe).

I suspect this is because the code doesn't use golang.org/x/sys/windows/svc to implement the Windows service hooks.

If you have got this to run as a service on Windows workstations, could please you include tips?
Thanks!

@rawdigits
Copy link
Collaborator

This may just make your day..... :)

check out #3, which already works fine on Windows. It not only allows nebula to run as one, but also lets nebula register itself as a service via the command line, so you don't need a wrapper like the one from cygwin.

@rawdigits
Copy link
Collaborator

rawdigits commented Nov 26, 2019

If anyone needs a precompiled binary for this, I'm happy to post one somewhere... If not, you just change branch and run make service bin-windows to create the service-aware version.

With the binary, you run nebula.exe -service install - currently it just points to the current directory as its working directory for the config by default, so it is "installed" wherever you run the command.

@chrispolley
Copy link
Author

Yes, it does, thanks!
Successfully built, I will try this out.

@chrispolley
Copy link
Author

OK, it seems to work. However, simply doing "nebula -service install" [in the config directory] doesn't work. Combining "nebula -config c:\nebula -service install" then "nebula -service start" works.

@SpaceEggs
Copy link

i use winsw to run nebula as a windows service.

@rawdigits
Copy link
Collaborator

merged in #3

@livid
Copy link

livid commented Jan 8, 2020

When installing the service, it seems the absolute path to config.yml is required.

nebula -service install -config c:\Example\Nebula\config.yml

@MADhase
Copy link

MADhase commented Jun 25, 2024

When installing the service, it seems the absolute path to config.yml is required.

nebula -service install -config c:\Example\Nebula\config.yml

The absolute path to the certificate-files is needed, too (inside the config.yml).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants