Skip to content

Running Geddy as a Windows Service

Andrew Kanieski edited this page Nov 15, 2013 · 1 revision

Some of the Geddy community has had the unfortunate requirement to run their production Geddy applications in a windows environment.

A quick way to run your node application as a windows service is to use the 'Non-Sucking Service Manager', NSSM. (http://nssm.cc/)

Using NSSM

Download nssm from the above website and place it somewhere in your windows path.

You can then issue a command like so to create your windows service:

nssm install "My Service" "c:\program files\NodeJS\node.exe" "c:\program files\My Node Service\server.js"

This will install a windows service called "My Service" and it will run the node binary with the first parameter of server.js.

This works well with most node applications.

However if you have more complicated command line parameter requirements OR if you need to run geddy (for reasons unknown to me), this may not work for you.

NSSM and Geddy

To get your geddy app running as a windows service with nssm you will need to first wrap the launching of your app in a windows batch file.

run_geddy.bat

node server.js <param1> <param2>

Then when you install your nssm windows service you simple point it to the batch file instead of node.

nssm install "My Service" "c:\program files\My Node Service\run_geddy.bat"

That should do it!