Event Store logo



Show Table of Contents

Command Line Arguments

The Event Store supports many configuration points. There are three distinct ways to set any parameter in the system. Items can be set via command line, environment variables, or put into YAML files. Each of these configuration options has its own trade offs.

To pass a configuration value over the command line you just add the configuration to the line executing the Event Store e.g. EventStore.ClusterNode.exe --log ~/logs

While command line arguments tend to be very useful in development scenarios, they are often not the preferred way to handle configuration in a production system.

All arguments can also be set as environment variables. This mechanism is often used in UNIX based systems.

The last way that arguments can be set is to put them into one or more config files. To tell the Event Store to use a config file you pass the files on the command line with --config=filename. The basic format of the YAML config file is as follows:

Log: "/home/Ouro/logs"
IntHttpPort: 2111

Files can be much nicer for large installations as they can easily be distributed/managed centrally, or generated by a configuration management system such as Puppet.

The order of precedence between the multiple config sources is also important as you could feasibly set them in multiple ways. The command line is the highest priority followed by environment variables. Files are the lowest precedence and are processed in the order they are given on the command line. When starting up the Event Store the major parameters are listed in the log (including where they were set from).

ES VERSION:               1.0.3 (dev/5488fa34228e283bad985966b700e1fc48a0780a, Tue, 2 Jul 2013 12:39:02 +0300)
OS:                       Linux (Unix
RUNTIME:                  3.0.10 (master/1166156 Tue Apr 23 14:56:42 EEST 2013) (EventStore build) (64-bit)
GC:                       2 GENERATIONS
LOGS:                     /home/greg/foo

SHOW HELP:                False (<DEFAULT>)
SHOW VERSION:             False (<DEFAULT>)
LOGS DIR:                 /home/greg/foo (--logsdir from command line)
CONFIGS:                  <empty> (<DEFAULT>)
DEFINES:                  <empty> (<DEFAULT>)
IP:              (<DEFAULT>)
TCP PORT:                 1113 (<DEFAULT>)
HTTP PORT:                2113 (<DEFAULT>)
CACHED CHUNKS:            -1 (<DEFAULT>)
CHUNKS CACHE SIZE:        536871424 (<DEFAULT>)
DB PATH:                  /tmp/foo (--db from command line)
SKIP DB VERIFY:           False (<DEFAULT>)
HTTP PREFIXES:            <empty> (<DEFAULT>)
CERTIFICATE NAME:         <empty> (<DEFAULT>)
CERTIFICATE FILE:         <empty> (<DEFAULT>)

User projections are not enabled by default, however the projections engine is used internally for account management. If you want to run user projections, it is necessary to start using the --run-projections=all command line parameter.

Projections are still experimental and as such we have not yet documented them here. However, there are two series of blog posts about how they can be used listed on the docs homepage.

The following parameters are supported by the Event Store:

Application Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
HELP Help Show help. (Default: False)
VERSION Version Show version. (Default: False)
LOG Log Path where to keep log files. (Default: See default directories)
CONFIG Config Configuration files.
DEFINES Defines Run-time conditionals. (Default: n/a)
WHAT_IF WhatIf Print effective configuration to console and then exit. (Default: False)
START_STANDARD_PROJECTIONS StartStandardProjections Start the built in system projections.
DISABLE_HTTP_CACHING DisableHTTPCaching Disable HTTP caching. (Default: False)
MONO_MIN_THREADPOOL_SIZE MonoMinThreadpoolSize Minimum number of worker threads when running under mono. Set to 0 to leave machine defaults. (Default: 10)
FORCE Force Force the Event Store to run in possibly harmful environments such as with Boehm GC. (Default: False)
STATS_PERIOD_SEC StatsPeriodSec The number of seconds between statistics gathers. (Default: 30)
WORKER_THREADS WorkerThreads The number of threads to use for pool of worker services. (Default: 5)
ENABLE_HISTOGRAMS EnableHistograms Enables the tracking of various histograms in the backend, typically only used for debugging etc (Default: False)
LOG_HTTP_REQUESTS LogHttpRequests Log Http Requests and Responses before processing them. (Default: False)

Authentication Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
AUTHENTICATION_TYPE AuthenticationType The type of authentication to use. (Default: internal)
AUTHENTICATION_CONFIG AuthenticationConfig Path to the configuration file for authentication configuration (if applicable).

Certificate Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
CERTIFICATE_STORE_LOCATION CertificateStoreLocation The certificate store location name.
CERTIFICATE_STORE_NAME CertificateStoreName The certificate store name.
CERTIFICATE_SUBJECT_NAME CertificateSubjectName The certificate subject name.
CERTIFICATE_THUMBPRINT CertificateThumbprint The certificate fingerprint/thumbprint.
CERTIFICATE_FILE CertificateFile The path to certificate file.
CERTIFICATE_PASSWORD CertificatePassword The password to certificate in file.

Cluster Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
CLUSTER_SIZE ClusterSize The number of nodes in the cluster. (Default: 1)
NODE_PRIORITY NodePriority The node priority used during master election (Default: 0)
COMMIT_COUNT CommitCount The number of nodes which must acknowledge commits before acknowledging to a client. (Default: -1)
PREPARE_COUNT PrepareCount The number of nodes which must acknowledge prepares. (Default: -1)
DISCOVER_VIA_DNS DiscoverViaDns Whether to use DNS lookup to discover other cluster nodes. (Default: True)
CLUSTER_DNS ClusterDns DNS name from which other nodes can be discovered. (Default: fake.dns)
CLUSTER_GOSSIP_PORT ClusterGossipPort The port on which cluster nodes’ managers are running. (Default: 30777)
GOSSIP_SEED GossipSeed Endpoints for other cluster nodes from which to seed gossip (Default: n/a)
GOSSIP_INTERVAL_MS GossipIntervalMs The interval, in ms, nodes should try to gossip with each other. (Default: 1000)
GOSSIP_ALLOWED_DIFFERENCE_MS GossipAllowedDifferenceMs The amount of drift, in ms, between clocks on nodes allowed before gossip is rejected. (Default: 60000)
GOSSIP_TIMEOUT_MS GossipTimeoutMs The timeout, in ms, on gossip to another node. (Default: 500)

Database Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
MIN_FLUSH_DELAY_MS MinFlushDelayMs The minimum flush delay in milliseconds. (Default: 2)
DISABLE_SCAVENGE_MERGING DisableScavengeMerging Disables the merging of chunks when scavenge is running (Default: False)
SCAVENGE_HISTORY_MAX_AGE ScavengeHistoryMaxAge The number of days to keep scavenge history (Default: 30)
CACHED_CHUNKS CachedChunks The number of chunks to cache in unmanaged memory. (Default: -1)
READER_THREADS_COUNT ReaderThreadsCount The number of reader threads to use for processing reads. (Default: 4)
CHUNKS_CACHE_SIZE ChunksCacheSize The amount of unmanaged memory to use for caching chunks. (Default: 536871424)
MAX_MEM_TABLE_SIZE MaxMemTableSize Adjusts the maximum size of a mem table. (Default: 1000000)
HASH_COLLISION_READ_LIMIT HashCollisionReadLimit The number of events to read per candidate in the case of a hash collision (Default: 100)
DB Db The path the db should be loaded/saved to. (Default: See default directories)
INDEX Index The path the index should be loaded/saved to.
MEM_DB MemDb Keep everything in memory, no directories or files are created. (Default: False)
SKIP_DB_VERIFY SkipDbVerify Bypasses the checking of file hashes of database during startup (allows for faster startup). (Default: False)
PREPARE_TIMEOUT_MS PrepareTimeoutMs Prepare timeout (in milliseconds). (Default: 2000)
COMMIT_TIMEOUT_MS CommitTimeoutMs Commit timeout (in milliseconds). (Default: 2000)
UNSAFE_DISABLE_FLUSH_TO_DISK UnsafeDisableFlushToDisk Disable flushing to disk. (UNSAFE: on power off) (Default: False)
BETTER_ORDERING BetterOrdering Enable Queue affinity on reads during write process to try to get better ordering. (Default: False)
UNSAFE_IGNORE_HARD_DELETE UnsafeIgnoreHardDelete Disables Hard Deletes (UNSAFE: use to remove hard deletes) (Default: False)
INDEX_CACHE_DEPTH IndexCacheDepth Sets the depth to cache for the mid point cache in index. (Default: 16)

Interface Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
INT_IP IntIp Internal IP Address. (Default:
EXT_IP ExtIp External IP Address. (Default:
INT_HTTP_PORT IntHttpPort Internal HTTP Port. (Default: 2112)
EXT_HTTP_PORT ExtHttpPort External HTTP Port. (Default: 2113)
INT_TCP_PORT IntTcpPort Internal TCP Port. (Default: 1112)
INT_SECURE_TCP_PORT IntSecureTcpPort Internal Secure TCP Port. (Default: 0)
EXT_TCP_PORT ExtTcpPort External TCP Port. (Default: 1113)
EXT_SECURE_TCP_PORT_ADVERTISE_AS ExtSecureTcpPortAdvertiseAs Advertise Secure External Tcp Port As. (Default: 0)
EXT_SECURE_TCP_PORT ExtSecureTcpPort External Secure TCP Port. (Default: 0)
EXT_IP_ADVERTISE_AS ExtIpAdvertiseAs Advertise External Tcp Address As.
EXT_TCP_PORT_ADVERTISE_AS ExtTcpPortAdvertiseAs Advertise External Tcp Port As. (Default: 0)
EXT_HTTP_PORT_ADVERTISE_AS ExtHttpPortAdvertiseAs Advertise External Http Port As. (Default: 0)
INT_IP_ADVERTISE_AS IntIpAdvertiseAs Advertise Internal Tcp Address As.
INT_SECURE_TCP_PORT_ADVERTISE_AS IntSecureTcpPortAdvertiseAs Advertise Secure Internal Tcp Port As. (Default: 0)
INT_TCP_PORT_ADVERTISE_AS IntTcpPortAdvertiseAs Advertise Internal Tcp Port As. (Default: 0)
INT_HTTP_PORT_ADVERTISE_AS IntHttpPortAdvertiseAs Advertise Internal Http Port As. (Default: 0)
INT_TCP_HEARTBEAT_TIMEOUT IntTcpHeartbeatTimeout Heartbeat timeout for internal TCP sockets (Default: 700)
EXT_TCP_HEARTBEAT_TIMEOUT ExtTcpHeartbeatTimeout Heartbeat timeout for external TCP sockets (Default: 1000)
INT_TCP_HEARTBEAT_INTERVAL IntTcpHeartbeatInterval Heartbeat interval for internal TCP sockets (Default: 700)
EXT_TCP_HEARTBEAT_INTERVAL ExtTcpHeartbeatInterval Heartbeat interval for external TCP sockets (Default: 2000)
ADMIN_ON_EXT AdminOnExt Whether or not to run the admin ui on the external HTTP endpoint (Default: True)
STATS_ON_EXT StatsOnExt Whether or not to accept statistics requests on the external HTTP endpoint, needed if you use admin ui (Default: True)
GOSSIP_ON_EXT GossipOnExt Whether or not to accept gossip requests on the external HTTP endpoint (Default: True)
INT_HTTP_PREFIXES IntHttpPrefixes The prefixes that the internal HTTP server should respond to. (Default: n/a)
EXT_HTTP_PREFIXES ExtHttpPrefixes The prefixes that the external HTTP server should respond to. (Default: n/a)
ENABLE_TRUSTED_AUTH EnableTrustedAuth Enables trusted authentication by an intermediary in the HTTP (Default: False)
ADD_INTERFACE_PREFIXES AddInterfacePrefixes Add interface prefixes (Default: True)
USE_INTERNAL_SSL UseInternalSsl Whether to use secure internal communication. (Default: False)
SSL_TARGET_HOST SslTargetHost Target host of server’s SSL certificate. (Default: n/a)
SSL_VALIDATE_SERVER SslValidateServer Whether to validate that server’s certificate is trusted. (Default: True)

Projections Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
RUN_PROJECTIONS RunProjections Enables the running of projections. System runs built-in projections, All runs user projections. (Default: None) Possible Values:None,System,All
PROJECTION_THREADS ProjectionThreads The number of threads to use for projections. (Default: 3)

Event Store docs are hosted on GitHub. The repository is public and it’s open to issues and pull requests. Contributions, corrections and feedback are all welcome.