Event Store logo

Menu

Documentation

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 3.2.0.27)
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:                       127.0.0.1 (<DEFAULT>)
TCP PORT:                 1113 (<DEFAULT>)
SECURE TCP PORT:          0 (<DEFAULT>)
HTTP PORT:                2113 (<DEFAULT>)
STATS PERIOD SEC:         30 (<DEFAULT>)
CACHED CHUNKS:            -1 (<DEFAULT>)
CHUNKS CACHE SIZE:        536871424 (<DEFAULT>)
DB PATH:                  /tmp/foo (--db from command line)
SKIP DB VERIFY:           False (<DEFAULT>)
RUN PROJECTIONS:          True (<DEFAULT>)
PROJECTION THREADS:       3 (<DEFAULT>)
WORKER THREADS:           5 (<DEFAULT>)
HTTP PREFIXES:            <empty> (<DEFAULT>)
ENABLE TRUSTED AUTH:      False (<DEFAULT>)
CERTIFICATE STORE:        <empty> (<DEFAULT>)
CERTIFICATE NAME:         <empty> (<DEFAULT>)
CERTIFICATE FILE:         <empty> (<DEFAULT>)
CERTIFICATE PASSWORD:     <empty> (<DEFAULT>)
PREPARE TIMEOUT MS:       2000 (<DEFAULT>)
COMMIT TIMEOUT MS:        2000 (<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=VALUE
HELP Help Show help. (Default: False)
-Version
–version=VALUE
VERSION Version Show version. (Default: False)
-Log
–log=VALUE
LOG Log Path where to keep log files. (Default: See default directories)
-Config
–config=VALUE
CONFIG Config Configuration files.
-Defines
–defines=VALUE
DEFINES Defines Run-time conditionals. (Default: n/a)
-WhatIf
–what-if=VALUE
WHAT_IF WhatIf Print effective configuration to console and then exit. (Default: False)
-StartStandardProjections
–start-standard-projections=VALUE
START_STANDARD_PROJECTIONS StartStandardProjections Start the built in system projections. (Default: False)
-DisableHTTPCaching
–disable-http-caching=VALUE
DISABLE_HTTP_CACHING DisableHTTPCaching Disable HTTP caching. (Default: False)
-MonoMinThreadpoolSize
–mono-min-threadpool-size=VALUE
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=VALUE
FORCE Force Force the Event Store to run in possibly harmful environments such as with Boehm GC. (Default: False)
-StatsPeriodSec
–stats-period-sec=VALUE
STATS_PERIOD_SEC StatsPeriodSec The number of seconds between statistics gathers. (Default: 30)
-WorkerThreads
–worker-threads=VALUE
WORKER_THREADS WorkerThreads The number of threads to use for pool of worker services. (Default: 5)
-EnableHistograms
–enable-histograms=VALUE
ENABLE_HISTOGRAMS EnableHistograms Enables the tracking of various histograms in the backend, typically only used for debugging etc (Default: False)
-LogHttpRequests
–log-http-requests=VALUE
LOG_HTTP_REQUESTS LogHttpRequests Log Http Requests and Responses before processing them. (Default: False)

Authentication Options

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

Certificate Options

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

Cluster Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-ClusterSize
–cluster-size=VALUE
CLUSTER_SIZE ClusterSize The number of nodes in the cluster. (Default: 1)
-NodePriority
–node-priority=VALUE
NODE_PRIORITY NodePriority The node priority used during master election (Default: 0)
-CommitCount
–commit-count=VALUE
COMMIT_COUNT CommitCount The number of nodes which must acknowledge commits before acknowledging to a client. (Default: -1)
-PrepareCount
–prepare-count=VALUE
PREPARE_COUNT PrepareCount The number of nodes which must acknowledge prepares. (Default: -1)
-DiscoverViaDns
–discover-via-dns=VALUE
DISCOVER_VIA_DNS DiscoverViaDns Whether to use DNS lookup to discover other cluster nodes. (Default: True)
-ClusterDns
–cluster-dns=VALUE
CLUSTER_DNS ClusterDns DNS name from which other nodes can be discovered. (Default: fake.dns)
-ClusterGossipPort
–cluster-gossip-port=VALUE
CLUSTER_GOSSIP_PORT ClusterGossipPort The port on which cluster nodes’ managers are running. (Default: 30777)
-GossipSeed
–gossip-seed=VALUE
GOSSIP_SEED GossipSeed Endpoints for other cluster nodes from which to seed gossip (Default: n/a)
-GossipIntervalMs
–gossip-interval-ms=VALUE
GOSSIP_INTERVAL_MS GossipIntervalMs The interval, in ms, nodes should try to gossip with each other. (Default: 1000)
-GossipAllowedDifferenceMs
–gossip-allowed-difference-ms=VALUE
GOSSIP_ALLOWED_DIFFERENCE_MS GossipAllowedDifferenceMs The amount of drift, in ms, between clocks on nodes allowed before gossip is rejected. (Default: 60000)
-GossipTimeoutMs
–gossip-timeout-ms=VALUE
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
-MinFlushDelayMs
–min-flush-delay-ms=VALUE
MIN_FLUSH_DELAY_MS MinFlushDelayMs The minimum flush delay in milliseconds. (Default: 2)
-DisableScavengeMerging
–disable-scavenge-merging=VALUE
DISABLE_SCAVENGE_MERGING DisableScavengeMerging Disables the merging of chunks when scavenge is running (Default: False)
-ScavengeHistoryMaxAge
–scavenge-history-max-age=VALUE
SCAVENGE_HISTORY_MAX_AGE ScavengeHistoryMaxAge The number of days to keep scavenge history (Default: 30)
-CachedChunks
–cached-chunks=VALUE
CACHED_CHUNKS CachedChunks The number of chunks to cache in unmanaged memory. (Default: -1)
-ReaderThreadsCount
–reader-threads-count=VALUE
READER_THREADS_COUNT ReaderThreadsCount The number of reader threads to use for processing reads. (Default: 4)
-ChunksCacheSize
–chunks-cache-size=VALUE
CHUNKS_CACHE_SIZE ChunksCacheSize The amount of unmanaged memory to use for caching chunks. (Default: 536871424)
-MaxMemTableSize
–max-mem-table-size=VALUE
MAX_MEM_TABLE_SIZE MaxMemTableSize Adjusts the maximum size of a mem table. (Default: 1000000)
-HashCollisionReadLimit
–hash-collision-read-limit=VALUE
HASH_COLLISION_READ_LIMIT HashCollisionReadLimit The number of events to read per candidate in the case of a hash collision (Default: 100)
-Db
–db=VALUE
DB Db The path the db should be loaded/saved to. (Default: See default directories)
-Index
–index=VALUE
INDEX Index The path the index should be loaded/saved to.
-MemDb
–mem-db=VALUE
MEM_DB MemDb Keep everything in memory, no directories or files are created. (Default: False)
-SkipDbVerify
–skip-db-verify=VALUE
SKIP_DB_VERIFY SkipDbVerify Bypasses the checking of file hashes of database during startup (allows for faster startup). (Default: False)
-WriteThrough
–write-through=VALUE
WRITE_THROUGH WriteThrough Enables Write Through when writing to the file system, this bypasses filesystem caches. (Default: False)
-Unbuffered
–unbuffered=VALUE
UNBUFFERED Unbuffered Enables Unbuffered/DirectIO when writing to the file system, this bypasses filesystem caches. (Default: False)
-PrepareTimeoutMs
–prepare-timeout-ms=VALUE
PREPARE_TIMEOUT_MS PrepareTimeoutMs Prepare timeout (in milliseconds). (Default: 2000)
-CommitTimeoutMs
–commit-timeout-ms=VALUE
COMMIT_TIMEOUT_MS CommitTimeoutMs Commit timeout (in milliseconds). (Default: 2000)
-UnsafeDisableFlushToDisk
–unsafe-disable-flush-to-disk=VALUE
UNSAFE_DISABLE_FLUSH_TO_DISK UnsafeDisableFlushToDisk Disable flushing to disk. (UNSAFE: on power off) (Default: False)
-BetterOrdering
–better-ordering=VALUE
BETTER_ORDERING BetterOrdering Enable Queue affinity on reads during write process to try to get better ordering. (Default: False)
-UnsafeIgnoreHardDelete
–unsafe-ignore-hard-delete=VALUE
UNSAFE_IGNORE_HARD_DELETE UnsafeIgnoreHardDelete Disables Hard Deletes (UNSAFE: use to remove hard deletes) (Default: False)
-IndexCacheDepth
–index-cache-depth=VALUE
INDEX_CACHE_DEPTH IndexCacheDepth Sets the depth to cache for the mid point cache in index. (Default: 16)
-AlwaysKeepScavenged
–always-keep-scavenged=VALUE
ALWAYS_KEEP_SCAVENGED AlwaysKeepScavenged Always keeps the newer chunks from a scavenge operation. (Default: False)

Interface Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-IntIp
–int-ip=VALUE
INT_IP IntIp Internal IP Address. (Default: 127.0.0.1)
-ExtIp
–ext-ip=VALUE
EXT_IP ExtIp External IP Address. (Default: 127.0.0.1)
-IntHttpPort
–int-http-port=VALUE
INT_HTTP_PORT IntHttpPort Internal HTTP Port. (Default: 2112)
-ExtHttpPort
–ext-http-port=VALUE
EXT_HTTP_PORT ExtHttpPort External HTTP Port. (Default: 2113)
-IntTcpPort
–int-tcp-port=VALUE
INT_TCP_PORT IntTcpPort Internal TCP Port. (Default: 1112)
-IntSecureTcpPort
–int-secure-tcp-port=VALUE
INT_SECURE_TCP_PORT IntSecureTcpPort Internal Secure TCP Port. (Default: 0)
-ExtTcpPort
–ext-tcp-port=VALUE
EXT_TCP_PORT ExtTcpPort External TCP Port. (Default: 1113)
-ExtSecureTcpPortAdvertiseAs
–ext-secure-tcp-port-advertise-as=VALUE
EXT_SECURE_TCP_PORT_ADVERTISE_AS ExtSecureTcpPortAdvertiseAs Advertise Secure External Tcp Port As. (Default: 0)
-ExtSecureTcpPort
–ext-secure-tcp-port=VALUE
EXT_SECURE_TCP_PORT ExtSecureTcpPort External Secure TCP Port. (Default: 0)
-ExtIpAdvertiseAs
–ext-ip-advertise-as=VALUE
EXT_IP_ADVERTISE_AS ExtIpAdvertiseAs Advertise External Tcp Address As.
-ExtTcpPortAdvertiseAs
–ext-tcp-port-advertise-as=VALUE
EXT_TCP_PORT_ADVERTISE_AS ExtTcpPortAdvertiseAs Advertise External Tcp Port As. (Default: 0)
-ExtHttpPortAdvertiseAs
–ext-http-port-advertise-as=VALUE
EXT_HTTP_PORT_ADVERTISE_AS ExtHttpPortAdvertiseAs Advertise External Http Port As. (Default: 0)
-IntIpAdvertiseAs
–int-ip-advertise-as=VALUE
INT_IP_ADVERTISE_AS IntIpAdvertiseAs Advertise Internal Tcp Address As.
-IntSecureTcpPortAdvertiseAs
–int-secure-tcp-port-advertise-as=VALUE
INT_SECURE_TCP_PORT_ADVERTISE_AS IntSecureTcpPortAdvertiseAs Advertise Secure Internal Tcp Port As. (Default: 0)
-IntTcpPortAdvertiseAs
–int-tcp-port-advertise-as=VALUE
INT_TCP_PORT_ADVERTISE_AS IntTcpPortAdvertiseAs Advertise Internal Tcp Port As. (Default: 0)
-IntHttpPortAdvertiseAs
–int-http-port-advertise-as=VALUE
INT_HTTP_PORT_ADVERTISE_AS IntHttpPortAdvertiseAs Advertise Internal Http Port As. (Default: 0)
-IntTcpHeartbeatTimeout
–int-tcp-heartbeat-timeout=VALUE
INT_TCP_HEARTBEAT_TIMEOUT IntTcpHeartbeatTimeout Heartbeat timeout for internal TCP sockets (Default: 700)
-ExtTcpHeartbeatTimeout
–ext-tcp-heartbeat-timeout=VALUE
EXT_TCP_HEARTBEAT_TIMEOUT ExtTcpHeartbeatTimeout Heartbeat timeout for external TCP sockets (Default: 1000)
-IntTcpHeartbeatInterval
–int-tcp-heartbeat-interval=VALUE
INT_TCP_HEARTBEAT_INTERVAL IntTcpHeartbeatInterval Heartbeat interval for internal TCP sockets (Default: 700)
-ExtTcpHeartbeatInterval
–ext-tcp-heartbeat-interval=VALUE
EXT_TCP_HEARTBEAT_INTERVAL ExtTcpHeartbeatInterval Heartbeat interval for external TCP sockets (Default: 2000)
-GossipOnSingleNode
–gossip-on-single-node=VALUE
GOSSIP_ON_SINGLE_NODE GossipOnSingleNode When enabled tells a single node to run gossip as if it is a cluster (Default: False)
-AdminOnExt
–admin-on-ext=VALUE
ADMIN_ON_EXT AdminOnExt Whether or not to run the admin ui on the external HTTP endpoint (Default: True)
-StatsOnExt
–stats-on-ext=VALUE
STATS_ON_EXT StatsOnExt Whether or not to accept statistics requests on the external HTTP endpoint, needed if you use admin ui (Default: True)
-GossipOnExt
–gossip-on-ext=VALUE
GOSSIP_ON_EXT GossipOnExt Whether or not to accept gossip requests on the external HTTP endpoint (Default: True)
-IntHttpPrefixes
–int-http-prefixes=VALUE
INT_HTTP_PREFIXES IntHttpPrefixes The prefixes that the internal HTTP server should respond to. (Default: n/a)
-ExtHttpPrefixes
–ext-http-prefixes=VALUE
EXT_HTTP_PREFIXES ExtHttpPrefixes The prefixes that the external HTTP server should respond to. (Default: n/a)
-EnableTrustedAuth
–enable-trusted-auth=VALUE
ENABLE_TRUSTED_AUTH EnableTrustedAuth Enables trusted authentication by an intermediary in the HTTP (Default: False)
-AddInterfacePrefixes
–add-interface-prefixes=VALUE
ADD_INTERFACE_PREFIXES AddInterfacePrefixes Add interface prefixes (Default: True)
-UseInternalSsl
–use-internal-ssl=VALUE
USE_INTERNAL_SSL UseInternalSsl Whether to use secure internal communication. (Default: False)
-DisableInsecureTCP
–disable-insecure-tcp=VALUE
DISABLE_INSECURE_TCP DisableInsecureTCP Whether to disable insecure TCP communication (Default: False)
-SslTargetHost
–ssl-target-host=VALUE
SSL_TARGET_HOST SslTargetHost Target host of server’s SSL certificate. (Default: n/a)
-SslValidateServer
–ssl-validate-server=VALUE
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
-RunProjections
–run-projections=VALUE
RUN_PROJECTIONS RunProjections Enables the running of projections. System runs built-in projections, All runs user projections. (Default: None) Possible Values:None,System,All
-ProjectionThreads
–projection-threads=VALUE
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.