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 Help Show help. (Default: False)
-Version
VERSION Version Show version. (Default: False)
-Log
LOG Log Path where to keep log files.
-Config
CONFIG Config Configuration files.
-Defines
DEFINES Defines Run-time conditionals. (Default: n/a)
-WhatIf
–what-if=VALUE
WHATIF WhatIf Print effective configuration to console and then exit. (Default: False)
-Force
FORCE Force Force the Event Store to run in possibly harmful environments such as with Boehm GC. (Default: False)
-StatsPeriodSec
–stats-period-sec=VALUE
STATSPERIODSEC StatsPeriodSec The number of seconds between statistics gathers. (Default: 30)
-WorkerThreads
–worker-threads=VALUE
WORKERTHREADS WorkerThreads The number of threads to use for pool of worker services. (Default: 5)

Authentication Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-AuthenticationType
–authentication-type=VALUE
AUTHENTICATIONTYPE AuthenticationType The type of authentication to use. (Default: internal)

Certificate Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-CertificateStoreLocation
–certificate-store-location=VALUE
CERTIFICATESTORELOCATION CertificateStoreLocation The certificate store location name.
-CertificateStoreName
–certificate-store-name=VALUE
CERTIFICATESTORENAME CertificateStoreName The certificate store name.
-CertificateSubjectName
–certificate-subject-name=VALUE
CERTIFICATESUBJECTNAME CertificateSubjectName The certificate subject name.
-CertificateThumbprint
–certificate-thumbprint=VALUE
CERTIFICATETHUMBPRINT CertificateThumbprint The certificate fingerprint/thumbprint.
-CertificateFile
–certificate-file=VALUE
CERTIFICATEFILE CertificateFile The path to certificate file.
-CertificatePassword
–certificate-password=VALUE
CERTIFICATEPASSWORD CertificatePassword The password to certificate in file.

Cluster Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-ClusterSize
–cluster-size=VALUE
CLUSTERSIZE ClusterSize The number of nodes in the cluster. (Default: 1)
-NodePriority
–node-priority=VALUE
NODEPRIORITY NodePriority The node priority used during master election (Default: 0)
-CommitCount
–commit-count=VALUE
COMMITCOUNT CommitCount The number of nodes which must acknowledge commits before acknowledging to a client. (Default: -1)
-PrepareCount
–prepare-count=VALUE
PREPARECOUNT PrepareCount The number of nodes which must acknowledge prepares. (Default: -1)
-DiscoverViaDns
–discover-via-dns=VALUE
DISCOVERVIADNS DiscoverViaDns Whether to use DNS lookup to discover other cluster nodes. (Default: True)
-ClusterDns
–cluster-dns=VALUE
CLUSTERDNS ClusterDns DNS name from which other nodes can be discovered. (Default: fake.dns)
-ClusterGossipPort
–cluster-gossip-port=VALUE
CLUSTERGOSSIPPORT ClusterGossipPort The port on which cluster nodes’ managers are running. (Default: 30777)
-GossipSeed
–gossip-seed=VALUE
GOSSIPSEED GossipSeed Endpoints for other cluster nodes from which to seed gossip (Default: n/a)
-GossipIntervalMs
–gossip-interval-ms=VALUE
GOSSIPINTERVALMS GossipIntervalMs The interval nodes should try to gossip with each other in ms. (Default: 1000)
-GossipAllowedDifferenceMs
–gossip-allowed-difference-ms=VALUE
GOSSIPALLOWEDDIFFERENCEMS GossipAllowedDifferenceMs The amount of drift between clocks on nodes allowed before gossip is rejected in ms. (Default: 60000)
-GossipTimeoutMs
–gossip-timeout-ms=VALUE
GOSSIPTIMEOUTMS GossipTimeoutMs The timeout on gossip to another node in ms. (Default: 500)

Database Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-MinFlushDelayMs
–min-flush-delay-ms=VALUE
MINFLUSHDELAYMS MinFlushDelayMs The minimum flush delay in milliseconds. (Default: 2)
-DisableScavengeMerging
–disable-scavenge-merging=VALUE
DISABLESCAVENGEMERGING DisableScavengeMerging Disables the merging of chunks when scavenge is running (Default: False)
-CachedChunks
–cached-chunks=VALUE
CACHEDCHUNKS CachedChunks The number of chunks to cache in unmanaged memory. (Default: -1)
-ChunksCacheSize
–chunks-cache-size=VALUE
CHUNKSCACHESIZE ChunksCacheSize The amount of unmanaged memory to use for caching chunks. (Default: 536871424)
-MaxMemTableSize
–max-mem-table-size=VALUE
MAXMEMTABLESIZE MaxMemTableSize Adjusts the maximum size of a mem table. (Default: 1000000)
-Db
DB Db The path the db should be loaded/saved to.
-MemDb
–mem-db=VALUE
MEMDB MemDb Keep everything in memory, no directories or files are created. (Default: False)
-SkipDbVerify
–skip-db-verify=VALUE
SKIPDBVERIFY SkipDbVerify Bypasses the checking of file hashes of database during startup (allows for faster startup). (Default: False)
-PrepareTimeoutMs
–prepare-timeout-ms=VALUE
PREPARETIMEOUTMS PrepareTimeoutMs Prepare timeout (in milliseconds). (Default: 2000)
-CommitTimeoutMs
–commit-timeout-ms=VALUE
COMMITTIMEOUTMS CommitTimeoutMs Commit timeout (in milliseconds). (Default: 2000)
-UnsafeDisableFlushToDisk
–unsafe-disable-flush-to-disk=VALUE
UNSAFEDISABLEFLUSHTODISK UnsafeDisableFlushToDisk Disable flushing to disk. (UNSAFE: on power off) (Default: False)

Interface Options

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-IntIp
–int-ip=VALUE
INTIP IntIp Internal IP Address. (Default: 127.0.0.1)
-ExtIp
–ext-ip=VALUE
EXTIP ExtIp External IP Address. (Default: 127.0.0.1)
-IntHttpPort
–int-http-port=VALUE
INTHTTPPORT IntHttpPort Internal HTTP Port. (Default: 2112)
-ExtHttpPort
–ext-http-port=VALUE
EXTHTTPPORT ExtHttpPort External HTTP Port. (Default: 2113)
-IntTcpPort
–int-tcp-port=VALUE
INTTCPPORT IntTcpPort Internal TCP Port. (Default: 1112)
-IntSecureTcpPort
–int-secure-tcp-port=VALUE
INTSECURETCPPORT IntSecureTcpPort Internal Secure TCP Port. (Default: 0)
-ExtTcpPort
–ext-tcp-port=VALUE
EXTTCPPORT ExtTcpPort External TCP Port. (Default: 1113)
-ExtSecureTcpPort
–ext-secure-tcp-port=VALUE
EXTSECURETCPPORT ExtSecureTcpPort External Secure TCP Port. (Default: 0)
-IntTcpHeartbeatTimeout
–int-tcp-heartbeat-timeout=VALUE
INTTCPHEARTBEATTIMEOUT IntTcpHeartbeatTimeout Heartbeat timeout for internal TCP sockets (Default: 700)
-ExtTcpHeartbeatTimeout
–ext-tcp-heartbeat-timeout=VALUE
EXTTCPHEARTBEATTIMEOUT ExtTcpHeartbeatTimeout Heartbeat timeout for external TCP sockets (Default: 1000)
-IntTcpHeartbeatInterval
–int-tcp-heartbeat-interval=VALUE
INTTCPHEARTBEATINTERVAL IntTcpHeartbeatInterval Heartbeat interval for internal TCP sockets (Default: 700)
-ExtTcpHeartbeatInterval
–ext-tcp-heartbeat-interval=VALUE
EXTTCPHEARTBEATINTERVAL ExtTcpHeartbeatInterval Heartbeat interval for external TCP sockets (Default: 2000)
-AdminOnExt
–admin-on-ext=VALUE
ADMINONEXT AdminOnExt Whether or not to run the admin ui on the external http endpoint (Default: True)
-StatsOnExt
–stats-on-ext=VALUE
STATSONEXT 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
GOSSIPONEXT GossipOnExt Whether or not to accept gossip requests on the external http endpoint (Default: True)
-HttpPrefixes
–http-prefixes=VALUE
HTTPPREFIXES HttpPrefixes The prefixes that the http server should respond to. (Default: n/a)
-EnableTrustedAuth
–enable-trusted-auth=VALUE
ENABLETRUSTEDAUTH EnableTrustedAuth Enables trusted authentication by an intermediary in the Http (Default: False)
-UseInternalSsl
–use-internal-ssl=VALUE
USEINTERNALSSL UseInternalSsl Whether to use secure internal communication. (Default: False)
-SslTargetHost
–ssl-target-host=VALUE
SSLTARGETHOST SslTargetHost Target host of server’s SSL certificate. (Default: n/a)
-SslValidateServer
–ssl-validate-server=VALUE
SSLVALIDATESERVER SslValidateServer Whether to validate that server’s certificate is trusted. (Default: True)

Projections Options

Projections are currently a BETA feature, you should avoid using them for critical production tasks.

Parameter Environment (all prefixed with EVENTSTORE_) Yaml Description
-RunProjections
–run-projections=VALUE
RUNPROJECTIONS RunProjections Enables the running of JavaScript projections. (Default: System) Possible Values: None,System,All
-ProjectionThreads
–projection-threads=VALUE
PROJECTIONTHREADS 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.