Running Event Store
Event Store runs as a server that clients can connect to either over HTTP or using one of the client APIs. You can run both the open source and commercial versions as either a single node or a highly available cluster of nodes.
We distribute an open source version of Event Store as a console application. There are separate distributions for Windows on .NET and Linux/macOS on Mono.
Install and run Event Store
Unless you pass a database option with
--db, Event Store writes to a new database created in the host system's temporary files path each time it is started. For more information on Command Line Arguments read this guide.
The prerequisites for Installing on Windows are:
- NET Framework 4.0+
- Windows platform SDK with compilers (v7.1) or Visual C++ installed (Only required for a full build)
Event Store has Chocolatey packages available that you can install with the following command:
choco install eventstore-oss
You can also download a binary, unzip the archive and run from the folder location with an administrator console:
EventStore.ClusterNode.exe --db ./db --log ./logs
This command starts Event Store with the database stored at the path ./db and the logs in ./logs. You can view further command line arguments in the server docs.
Event Store runs in an administration context because it starts an HTTP server through
http.sys. For permanent or production instances you need to provide an ACL such as:
netsh http add urlacl url=http://+:2113/ user=DOMAIN\username
Solving 503 errors from the web admin UI
There is a known issue with the .NET
HTTPListener class (which Event Store uses) and bad URL ACL registrations which can cause servers to return 503 errors for every request. If you see this, you can issue the following commands:
netsh http show urlacl
Look for an entry on the port you're trying to use (
2113 unless you've specified a custom port), then issue:
netsh http delete urlacl <the entry you just found>
netsh http delete urlacl http://+:2113/
These steps should resolve the issue.
Shutting down an Event Store node
Event Store is designed to be safe by default, and it is expected that it will be shut down using
kill -9. It is also possible to initiate a shutdown via the web admin UI, by clicking on the Shutdown Server button located on the Admin page. This may be useful if you do not have console access to the node or need to script initiating a shutdown.
Securing Event Store
To secure Event Store, you can bind the server to the localhost interface and install a reverse proxy such as nginx or Varnish on the public IP. Read this guide for an example of setting up Event Store with Varnish.
The reverse proxy is your public interface. Internally it handles the authentication and route requests to Event Store. Event Store is only accessible through the localhost adapter and is not exposed publicly. The locally running reverse proxy is allowed to cache responses, and because of this, reverse proxies are more performant than calling Event Store directly.
Even if you use a reverse proxy, you can support external authentication from Event Store itself. You do this by enabling the ES-TrustedAuth trusted intermediary option in your configuration. This allows the intermediary to write a header with the user information that Event Store uses.