21 November 2014

Install EventStore as a service in Windows

Install Chocolatey
(optional, you can manually download NSSM)

Start a command prompt as administrator and run (copied from the website):
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Install NSSM

From command prompt:
choco install NSSM

Download EventStore

Get Event Store for Windows
Unzip and copy to C:\EventStore (or a location you prefer)

Note: EventStore is available from Chocolatey as well, but as of this writing it wouldn't install for me, and it’s slightly behind current version.

Install EventStore as a service

From command prompt:
nssm install EventStore C:\EventStore\EventStore.ClusterNode.exe --db ./db --log ./logs

Note: This uses the default ports and runs single node. The db and logs directories will be automatically created on startup if they don't exist.

2 comments:

Jeremy said...

Ran this with --config "path to my config yaml" but it won't start. Have you done this?

Jeremy said...

Disregard, I just needed to specify full paths. Noob mistake.