DEV Community

kamlwaysadhead
kamlwaysadhead

Posted on

Is it possible to run a Golang app as Windows Service AND Linux deamon

#go

As golang provide the ability to build the Cross-Platform app with the same source code. I like to create the one Window-service kind of program with is run on Cross-Platforms like- Windows, Linux and Apple. I know outside programs exist to run exe as service, like NSSM, but it is a server that I'd like to avoid outside programs on and I'd like to know the "correct" way to go about this. Please guide.

Top comments (1)

Collapse
 
rendlerdenis profile image
Denis Rendler

Anything can be run as a service or daemon. Even shell scripts as long as you register them as windows services or as systemd daemons and the program/shell script can run unless stopped.